587
584
colordiff(check_style, *args, **kwargs)
590
class cmd_baz_import(BzrToolsCommand):
591
"""Import an Arch or Baz archive into a bzr repository.
593
This command should be used on local archives (or mirrors) only. It is
594
quite slow on remote archives.
596
reuse_history allows you to specify any previous imports you
597
have done of different archives, which this archive has branches
598
tagged from. This will dramatically reduce the time to convert
599
the archive as it will not have to convert the history already
600
converted in that other branch.
602
If you specify prefixes, only branches whose names start with that prefix
603
will be imported. Skipped branches will be listed, so you can import any
604
branches you missed by accident. Here's an example of doing a partial
605
import from thelove@canonical.com:
606
bzr baz-import thelove thelove@canonical.com --prefixes dists:talloc-except
608
WARNING: Encoding should not be specified unless necessary, because if you
609
specify an encoding, your converted branch will not interoperate with
610
independently-converted branches, unless the other branches were converted
611
with exactly the same encoding. Any encoding recognized by Python may
612
be specified. Aliases are not detected, so 'utf_8', 'U8', 'UTF' and 'utf8'
615
takes_args = ['to_root_dir', 'from_archive', 'reuse_history*']
616
takes_options = ['verbose', Option('prefixes', type=str,
617
help="Prefixes of branches to import, colon-separated."),
618
Option('encoding', type=str,
619
help='Force encoding to specified value. See WARNING.')]
621
def run(self, to_root_dir, from_archive, encoding=None, verbose=False,
622
reuse_history_list=[], prefixes=None):
623
from errors import NoPyBaz
626
baz_import.baz_import(to_root_dir, from_archive, encoding,
627
verbose, reuse_history_list, prefixes)
629
print "This command is disabled. Please install PyBaz."
632
class cmd_baz_import_branch(BzrToolsCommand):
633
"""Import an Arch or Baz branch into a bzr branch.
635
WARNING: Encoding should not be specified unless necessary, because if you
636
specify an encoding, your converted branch will not interoperate with
637
independently-converted branches, unless the other branches were converted
638
with exactly the same encoding. Any encoding recognized by Python may
639
be specified. Aliases are not detected, so 'utf_8', 'U8', 'UTF' and 'utf8'
642
takes_args = ['to_location', 'from_branch?', 'reuse_history*']
643
takes_options = ['verbose',
644
Option('max-count', type=int,
645
help='Maximim revisions to import at once.'),
646
Option('encoding', type=str,
647
help='Force encoding to specified value. See WARNING.')]
649
def run(self, to_location, from_branch=None, fast=False, max_count=None,
650
encoding=None, verbose=False, dry_run=False,
651
reuse_history_list=[]):
652
from errors import NoPyBaz
655
baz_import.baz_import_branch(to_location, from_branch, fast,
656
max_count, verbose, encoding, dry_run,
659
print "This command is disabled. Please install PyBaz."
662
587
class cmd_rspush(BzrToolsCommand):
663
588
"""Upload this branch to another location using rsync.
751
677
result = TestSuite()
752
678
result.addTest(DocTestSuite(bzrtools, optionflags=ELLIPSIS))
753
679
result.addTest(tests.clean_tree.test_suite())
756
result.addTest(DocTestSuite(baz_import))
759
680
result.addTest(tests.test_suite())
760
681
result.addTest(TestLoader().loadTestsFromModule(tests.shelf_tests))
761
682
result.addTest(tests.blackbox.test_suite())
762
683
result.addTest(tests.upstream_import.test_suite())
763
684
result.addTest(zap.test_suite())
685
result.addTest(TestLoader().loadTestsFromModule(tests.test_dotgraph))
764
686
result.addTest(TestLoader().loadTestsFromModule(tests.is_clean))
765
687
result.addTest(TestLoader().loadTestsFromModule(tests.test_link_tree))
766
688
result.addTest(TestLoader().loadTestsFromModule(tests.test_patch))
767
689
result.addTest(TestLoader().loadTestsFromModule(tests.test_rspush))
690
result.addTest(TestLoader().loadTestsFromModule(tests.test_cbranch))