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())
1298
1284
last_revision = wt.last_revision()
1300
1286
revision_ids = b.repository.get_ancestry(last_revision)
1301
assert revision_ids[0] is None
1302
1287
revision_ids.pop(0)
1303
1288
for revision_id in revision_ids:
1304
1289
self.outf.write(revision_id + '\n')
1725
1710
from bzrlib.log import show_log
1726
assert message is None or isinstance(message, basestring), \
1727
"invalid message argument %r" % message
1728
1711
direction = (forward and 'forward') or 'reverse'
1730
1713
# log everything
2653
2636
'known failures.'),
2654
2637
Option('load-list', type=str, argname='TESTLISTFILE',
2655
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.'),
2657
2642
encoding_type = 'replace'
2661
2646
lsprof_timed=None, cache_dir=None,
2662
2647
first=False, list_only=False,
2663
2648
randomize=None, exclude=None, strict=False,
2649
load_list=None, debugflag=None):
2665
2650
import bzrlib.ui
2666
2651
from bzrlib.tests import selftest
2667
2652
import bzrlib.benchmarks as benchmarks
2917
2903
merger.show_base = show_base
2918
2904
self.sanity_check_merger(merger)
2919
2905
if (merger.base_rev_id == merger.other_rev_id and
2920
merger.other_rev_id != None):
2906
merger.other_rev_id is not None):
2921
2907
note('Nothing to do.')
2978
2964
possible_transports, pb):
2979
2965
"""Produce a merger from a location, assuming it refers to a branch."""
2980
2966
from bzrlib.tag import _merge_tags_if_possible
2981
assert revision is None or len(revision) < 3
2982
2967
# find the branch locations
2983
2968
other_loc, user_location = self._select_branch_location(tree, location,
3665
3650
specified revision. For example, "bzr uncommit -r 15" will leave the
3666
3651
branch at revision 15.
3668
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
3672
3658
# TODO: jam 20060108 Add an option to allow uncommit to remove