96
96
return tree, new_list
99
@symbol_versioning.deprecated_function(symbol_versioning.zero_fifteen)
100
def get_format_type(typestring):
101
"""Parse and return a format specifier."""
102
# Have to use BzrDirMetaFormat1 directly, so that
103
# RepositoryFormat.set_default_format works
104
if typestring == "default":
105
return bzrdir.BzrDirMetaFormat1()
107
return bzrdir.format_registry.make_bzrdir(typestring)
109
msg = 'Unknown bzr format "%s". See "bzr help formats".' % typestring
110
raise errors.BzrCommandError(msg)
113
99
# TODO: Make sure no commands unconditionally use the working directory as a
114
100
# branch. If a filename argument is used, the first of them should be used to
115
101
# specify the branch. (Perhaps this can be factored out into some kind of
669
655
raise errors.BzrCommandError(
670
656
'bzr pull --revision takes one value.')
673
old_rh = branch_to.revision_history()
674
if tree_to is not None:
675
change_reporter = delta._ChangeReporter(
676
unversioned_filter=tree_to.is_ignored)
677
result = tree_to.pull(branch_from, overwrite, revision_id,
679
possible_transports=possible_transports)
681
result = branch_to.pull(branch_from, overwrite, revision_id)
658
branch_to.lock_write()
660
if tree_to is not None:
661
change_reporter = delta._ChangeReporter(
662
unversioned_filter=tree_to.is_ignored)
663
result = tree_to.pull(branch_from, overwrite, revision_id,
665
possible_transports=possible_transports)
667
result = branch_to.pull(branch_from, overwrite, revision_id)
683
result.report(self.outf)
685
new_rh = branch_to.revision_history()
686
log.show_changed_revisions(branch_to, old_rh, new_rh,
669
result.report(self.outf)
670
if verbose and result.old_revid != result.new_revid:
672
branch_to.repository.iter_reverse_revision_history(
675
new_rh = branch_to.revision_history()
676
log.show_changed_revisions(branch_to, old_rh, new_rh,
690
682
class cmd_push(Command):
957
945
to_transport.delete_tree('.')
958
946
msg = "The branch %s has no revision %s." % (from_location, revision[0])
959
947
raise errors.BzrCommandError(msg)
961
branch.control_files.put_utf8('branch-name', name)
962
948
_merge_tags_if_possible(br_from, branch)
963
949
note('Branched %d revision(s).' % branch.revno())
2650
2636
'known failures.'),
2651
2637
Option('load-list', type=str, argname='TESTLISTFILE',
2652
2638
help='Load a test id list from a text file.'),
2639
ListOption('debugflag', type=str, short_name='E',
2640
help='Turn on a selftest debug flag.'),
2654
2642
encoding_type = 'replace'
2658
2646
lsprof_timed=None, cache_dir=None,
2659
2647
first=False, list_only=False,
2660
2648
randomize=None, exclude=None, strict=False,
2649
load_list=None, debugflag=None):
2662
2650
import bzrlib.ui
2663
2651
from bzrlib.tests import selftest
2664
2652
import bzrlib.benchmarks as benchmarks
2716
2705
"""Show version of bzr."""
2718
2707
encoding_type = 'replace'
2709
Option("short", help="Print just the version number."),
2720
2712
@display_command
2713
def run(self, short=False):
2722
2714
from bzrlib.version import show_version
2723
show_version(to_file=self.outf)
2716
self.outf.write(bzrlib.version_string + '\n')
2718
show_version(to_file=self.outf)
2726
2721
class cmd_rocks(Command):
3655
3650
specified revision. For example, "bzr uncommit -r 15" will leave the
3656
3651
branch at revision 15.
3658
In the future, uncommit will create a revision bundle, which can then
3653
Uncommit leaves the working tree ready for a new commit. The only change
3654
it may make is to restore any pending merges that were present before
3662
3658
# TODO: jam 20060108 Add an option to allow uncommit to remove
4103
4099
'rather than the one containing the working directory.',
4104
4100
short_name='f',
4106
Option('output', short_name='o', help='Write directive to this file.',
4102
Option('output', short_name='o',
4103
help='Write merge directive to this file; '
4104
'use - for stdout.',
4108
4106
Option('mail-to', help='Mail the request to this address.',