547
547
colordiff(check_style, *args, **kwargs)
550
class cmd_baz_import(BzrToolsCommand):
551
"""Import an Arch or Baz archive into a bzr repository.
553
This command should be used on local archives (or mirrors) only. It is
554
quite slow on remote archives.
556
reuse_history allows you to specify any previous imports you
557
have done of different archives, which this archive has branches
558
tagged from. This will dramatically reduce the time to convert
559
the archive as it will not have to convert the history already
560
converted in that other branch.
562
If you specify prefixes, only branches whose names start with that prefix
563
will be imported. Skipped branches will be listed, so you can import any
564
branches you missed by accident. Here's an example of doing a partial
565
import from thelove@canonical.com:
566
bzr baz-import thelove thelove@canonical.com --prefixes dists:talloc-except
568
WARNING: Encoding should not be specified unless necessary, because if you
569
specify an encoding, your converted branch will not interoperate with
570
independently-converted branches, unless the other branches were converted
571
with exactly the same encoding. Any encoding recognized by Python may
572
be specified. Aliases are not detected, so 'utf_8', 'U8', 'UTF' and 'utf8'
575
takes_args = ['to_root_dir', 'from_archive', 'reuse_history*']
576
takes_options = ['verbose', Option('prefixes', type=str,
577
help="Prefixes of branches to import, colon-separated."),
578
Option('encoding', type=str,
579
help='Force encoding to specified value. See WARNING.')]
581
def run(self, to_root_dir, from_archive, encoding=None, verbose=False,
582
reuse_history_list=[], prefixes=None):
583
from errors import NoPyBaz
586
baz_import.baz_import(to_root_dir, from_archive, encoding,
587
verbose, reuse_history_list, prefixes)
589
print "This command is disabled. Please install PyBaz."
592
class cmd_baz_import_branch(BzrToolsCommand):
593
"""Import an Arch or Baz branch into a bzr branch.
595
WARNING: Encoding should not be specified unless necessary, because if you
596
specify an encoding, your converted branch will not interoperate with
597
independently-converted branches, unless the other branches were converted
598
with exactly the same encoding. Any encoding recognized by Python may
599
be specified. Aliases are not detected, so 'utf_8', 'U8', 'UTF' and 'utf8'
602
takes_args = ['to_location', 'from_branch?', 'reuse_history*']
603
takes_options = ['verbose',
604
Option('max-count', type=int,
605
help='Maximim revisions to import at once.'),
606
Option('encoding', type=str,
607
help='Force encoding to specified value. See WARNING.')]
609
def run(self, to_location, from_branch=None, fast=False, max_count=None,
610
encoding=None, verbose=False, dry_run=False,
611
reuse_history_list=[]):
612
from errors import NoPyBaz
615
baz_import.baz_import_branch(to_location, from_branch, fast,
616
max_count, verbose, encoding, dry_run,
619
print "This command is disabled. Please install PyBaz."
622
550
class cmd_rspush(BzrToolsCommand):
623
551
"""Upload this branch to another location using rsync.