~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

MergeĀ mainline.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
from bzrlib.log import show_one_log
36
36
from bzrlib.merge import Merge3Merger
37
37
from bzrlib.option import Option
 
38
from bzrlib.progress import DummyProgress
38
39
from bzrlib.revisionspec import RevisionSpec
39
40
import bzrlib.trace
40
41
from bzrlib.trace import mutter, note, log_error, warning, is_quiet
41
42
from bzrlib.transport.local import LocalTransport
 
43
import bzrlib.ui
42
44
from bzrlib.workingtree import WorkingTree
43
45
 
44
46
 
1746
1748
        try:
1747
1749
            conflict_count = merge(other, base, check_clean=(not force),
1748
1750
                                   merge_type=merge_type, reprocess=reprocess,
1749
 
                                   show_base=show_base)
 
1751
                                   show_base=show_base, 
 
1752
                                   pb=bzrlib.ui.ui_factory.progress_bar())
1750
1753
            if conflict_count != 0:
1751
1754
                return 1
1752
1755
            else:
1849
1852
        else:
1850
1853
            rev_id = revision[0].in_history(tree.branch).rev_id
1851
1854
        tree.revert(file_list, tree.branch.repository.revision_tree(rev_id),
1852
 
                    not no_backup)
 
1855
                    not no_backup, bzrlib.ui.ui_factory.progress_bar())
1853
1856
 
1854
1857
 
1855
1858
class cmd_assert_fail(Command):
2156
2159
def merge(other_revision, base_revision,
2157
2160
          check_clean=True, ignore_zero=False,
2158
2161
          this_dir=None, backup_files=False, merge_type=Merge3Merger,
2159
 
          file_list=None, show_base=False, reprocess=False):
 
2162
          file_list=None, show_base=False, reprocess=False, 
 
2163
          pb=DummyProgress()):
2160
2164
    """Merge changes into a tree.
2161
2165
 
2162
2166
    base_revision
2196
2200
                              " type. %s" % merge_type)
2197
2201
    if reprocess and show_base:
2198
2202
        raise BzrCommandError("Cannot reprocess and show base.")
2199
 
    merger = Merger(this_tree.branch, this_tree=this_tree)
 
2203
    merger = Merger(this_tree.branch, this_tree=this_tree, pb=pb)
2200
2204
    merger.check_basis(check_clean)
2201
2205
    merger.set_other(other_revision)
2202
2206
    merger.set_base(base_revision)