~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2006-05-18 15:48:22 UTC
  • Revision ID: abentley@panoramicfeedback.com-20060518154822-7faf0c05951fb95b
Got import working decently

Show diffs side-by-side

added added

removed removed

Lines of Context:
370
370
        branch_mark(mark, branch, delete)
371
371
 
372
372
class cmd_import(bzrlib.commands.Command):
373
 
    takes_args = ['source']
374
 
    def run(self, source):
 
373
    """Import sources from a tarball <BZRTOOLS>
 
374
    
 
375
    This command will import a tarball into a bzr tree, replacing any versioned
 
376
    files already present.  If a directory is specified, it is used as the
 
377
    target.  If the directory does not exist, or is not versioned, it is
 
378
    created.
 
379
 
 
380
    Tarballs may be gzip or bzip2 compressed.  This is autodetected.
 
381
 
 
382
    If the tarball has a single root directory, that directory is stripped
 
383
    when extracting the tarball.
 
384
    """
 
385
    
 
386
    takes_args = ['source', 'tree?']
 
387
    def run(self, source, tree=None):
375
388
        from upstream_import import do_import
376
 
        do_import(source)
377
 
                
378
 
 
 
389
        do_import(source, tree)
379
390
 
380
391
 
381
392
commands = [cmd_shelve, cmd_unshelve, cmd_shelf, cmd_clean_tree,
384
395
            cmd_multi_pull, cmd_switch, cmd_branch_mark, cmd_import]
385
396
 
386
397
 
387
 
 
388
 
 
389
398
import bzrlib.builtins
390
399
commands.append(rspush.cmd_rspush)
391
400