~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to baz_import.py

  • Committer: Robert Collins
  • Date: 2005-09-13 12:26:29 UTC
  • mto: (147.2.6) (364.1.3 bzrtools)
  • mto: This revision was merged to the branch mainline in revision 324.
  • Revision ID: robertc@robertcollins.net-20050913122628-ed9a4571550e16f9
move baz-import to baz-import-branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
556
556
    return bzr_inv
557
557
 
558
558
 
559
 
class cmd_baz_import(Command):
 
559
class cmd_baz_import_branch(Command):
560
560
    """Import an Arch or Baz branch into a bzr branch"""
561
561
    takes_args = ['to_location', 'from_branch?']
562
562
    takes_options = ['verbose']
571
571
                print "%s is not a valid Arch branch." % from_branch
572
572
                return 1
573
573
        import_version(to_location, from_branch)
 
574
 
 
575
class cmd_baz_import(Command):
 
576
    """Import an Arch or Baz archive into bzr branches."""
 
577
    takes_args = ['to_root_dir', 'from_archive']
 
578
    takes_options = ['verbose']
 
579
 
 
580
    def run(self, to_root_dir, from_archive, verbose=False):
 
581
        raise "foo"
 
582
        to_location = os.path.realpath(str(to_location))
 
583
        if from_branch is not None:
 
584
            try:
 
585
                from_branch = pybaz.Version(from_branch)
 
586
            except pybaz.errors.NamespaceError:
 
587
                print "%s is not a valid Arch branch." % from_branch
 
588
                return 1
 
589
        import_version(to_location, from_branch)