~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2007-11-23 15:13:59 UTC
  • Revision ID: abentley@panoramicfeedback.com-20071123151359-yrjc6ta2fkbtu9ht
Remove switch (now in bzr itself)

Show diffs side-by-side

added added

removed removed

Lines of Context:
622
622
                      working_tree=not no_tree)
623
623
 
624
624
 
625
 
class cmd_switch(BzrToolsCommand):
626
 
    """Set the branch of a lightweight checkout and update."""
627
 
 
628
 
    takes_args = ['to_location']
629
 
 
630
 
    def run(self, to_location):
631
 
        from bzrlib.plugins.bzrtools.switch import switch
632
 
        to_branch = Branch.open(to_location)
633
 
        tree_location = '.'
634
 
        control_dir = BzrDir.open_containing(tree_location)[0]
635
 
        switch(control_dir, to_branch)
636
 
        note('Switched to branch: %s',
637
 
            urlutils.unescape_for_display(to_branch.base, 'utf-8'))
638
 
 
639
 
 
640
625
commands = [
641
626
            cmd_baz_import,
642
627
            cmd_baz_import_branch,
654
639
            cmd_shelf,
655
640
            cmd_shell,
656
641
            cmd_shelve,
657
 
            cmd_switch,
658
642
            cmd_unshelve,
659
643
            cmd_zap,
660
644
            ]
678
662
    import zap
679
663
    import tests.blackbox
680
664
    import tests.shelf_tests
681
 
    import tests.test_switch
682
665
    result = TestSuite()
683
666
    result.addTest(DocTestSuite(bzrtools, optionflags=ELLIPSIS))
684
667
    result.addTest(tests.clean_tree.test_suite())
693
676
    result.addTest(tests.upstream_import.test_suite())
694
677
    result.addTest(zap.test_suite())
695
678
    result.addTest(TestLoader().loadTestsFromModule(tests.is_clean))
696
 
    result.addTest(TestLoader().loadTestsFromModule(tests.test_switch))
697
679
    result.addTest(TestLoader().loadTestsFromModule(tests.test_rspush))
698
680
    return result