~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Robert Collins
  • Date: 2005-12-24 02:20:45 UTC
  • mto: (1185.50.57 bzr-jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1550.
  • Revision ID: robertc@robertcollins.net-20051224022045-14efc8dfa0e1a4e9
Start tests for api usage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
226
226
        self.conflict("Three-way conflict merging %s" % filename)
227
227
 
228
228
    def finalize(self):
229
 
        if not self.ignore_zero:
 
229
        if self.conflicts == 0:
 
230
            if not self.ignore_zero:
 
231
                note("All changes applied successfully.")
 
232
        else:
230
233
            note("%d conflicts encountered." % self.conflicts)
231
234
            
232
235
def get_tree(treespec, local_branch=None):
310
313
    clients might prefer to call merge_inner(), which has less magic behavior.
311
314
    """
312
315
    if this_dir is None:
313
 
        this_dir = '.'
 
316
        this_dir = u'.'
314
317
    this_branch = Branch.open_containing(this_dir)[0]
315
318
    if show_base and not merge_type is ApplyMerge3:
316
319
        raise BzrCommandError("Show-base is not supported for this merge"
554
557
        adjust_ids = []
555
558
        for id, path in inv_changes.iteritems():
556
559
            if path is not None:
557
 
                if path == '.':
558
 
                    path = ''
 
560
                if path == u'.':
 
561
                    path = u''
559
562
                else:
560
 
                    assert path.startswith('.' + os.sep), "path is %s" % path
 
563
                    assert path.startswith('.' + '/') or path.startswith('.' + '\\'), "path is %s" % path
561
564
                path = path[2:]
562
565
            adjust_ids.append((path, id))
563
566
        if len(adjust_ids) > 0: