~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to command_classes.py

  • Committer: Aaron Bentley
  • Date: 2009-06-11 02:05:44 UTC
  • Revision ID: aaron@aaronbentley.com-20090611020544-d6wqib7gki68o3u0
Implement create-mirror command

Show diffs side-by-side

added added

removed removed

Lines of Context:
579
579
                source_tree.unlock()
580
580
        finally:
581
581
            target_tree.unlock()
 
582
 
 
583
 
 
584
class cmd_create_mirror(BzrToolsCommand):
 
585
    """Create a mirror of another branch.
 
586
 
 
587
    This is similar to `bzr branch`, but copies more settings.
 
588
 
 
589
    It sets the public branch and parent of the target to the source location.
 
590
    """
 
591
 
 
592
    takes_args = ['source', 'target']
 
593
 
 
594
    def run(self, source, target):
 
595
        source_branch = Branch.open(source)
 
596
        from bzrlib.plugins.bzrtools.mirror import create_mirror
 
597
        create_mirror(source_branch, target, [])