~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

[merge] from robert and newformat

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
from bzrlib.errors import BzrCommandError, UnrelatedBranches, NoCommonAncestor
30
30
from bzrlib.errors import NoCommits
31
31
from bzrlib.delta import compare_trees
32
 
from bzrlib.trace import mutter, warning
 
32
from bzrlib.trace import mutter, warning, note
33
33
from bzrlib.fetch import greedy_fetch, fetch
34
34
from bzrlib.revision import is_ancestor
35
35
from bzrlib.osutils import rename
39
39
# TODO: build_working_dir can be built on something simpler than merge()
40
40
 
41
41
# FIXME: merge() parameters seem oriented towards the command line
 
42
# NOTABUG: merge is a helper for commandline functions.  merge_inner is the
 
43
#          the core functionality.
42
44
 
43
45
# comments from abentley on irc: merge happens in two stages, each
44
46
# of which generates a changeset object
140
142
    def rem_contents_conflict(self, filename, this_contents, base_contents):
141
143
        base_contents(filename+".BASE", self, False)
142
144
        this_contents(filename+".THIS", self, False)
 
145
        return ReplaceContents(this_contents, None)
 
146
 
 
147
    def rem_contents_conflict(self, filename, this_contents, base_contents):
 
148
        base_contents(filename+".BASE", self, False)
 
149
        this_contents(filename+".THIS", self, False)
143
150
        self.conflict("Other branch deleted locally modified file %s" %
144
151
                      filename)
145
152
        return ReplaceContents(this_contents, None)
185
192
 
186
193
    def finalize(self):
187
194
        if not self.ignore_zero:
188
 
            print "%d conflicts encountered.\n" % self.conflicts
 
195
            note("%d conflicts encountered.\n" % self.conflicts)
189
196
            
190
197
def get_tree(treespec, temp_root, label, local_branch=None):
191
198
    location, revno = treespec