changeset 12010:ce818cf215dc

merge with stable
author Matt Mackall <mpm@selenic.com>
date Sat, 21 Aug 2010 10:48:49 -0500
parents 652f71b235bf (current diff) b20211b307b3 (diff)
children f38b0a3308b6 479458f2483e
files mercurial/filemerge.py mercurial/merge.py
diffstat 3 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/filemerge.py	Fri Aug 20 21:28:14 2010 -0500
+++ b/mercurial/filemerge.py	Sat Aug 21 10:48:49 2010 -0500
@@ -138,9 +138,6 @@
     if not fco.cmp(fcd): # files identical?
         return None
 
-    if fca == fco: # backwards, use working dir parent as ancestor
-        fca = fcd.parents()[0]
-
     ui = repo.ui
     fd = fcd.path()
     binary = isbin(fcd) or isbin(fco) or isbin(fca)
--- a/mercurial/merge.py	Fri Aug 20 21:28:14 2010 -0500
+++ b/mercurial/merge.py	Sat Aug 21 10:48:49 2010 -0500
@@ -270,7 +270,12 @@
             repo.ui.debug("preserving %s for resolve of %s\n" % (f, fd))
             fcl = wctx[f]
             fco = mctx[f2]
-            fca = fcl.ancestor(fco, actx) or repo.filectx(f, fileid=nullrev)
+            if mctx == actx: # backwards, use working dir parent as ancestor
+                fca = fcl.parents()[0]
+            else:
+                fca = fcl.ancestor(fco, actx)
+            if not fca:
+                fca = repo.filectx(f, fileid=nullrev)
             ms.add(fcl, fco, fca, fd, flags)
             if f != fd and move:
                 moves.append(f)
--- a/tests/test-bisect.out	Fri Aug 20 21:28:14 2010 -0500
+++ b/tests/test-bisect.out	Sat Aug 21 10:48:49 2010 -0500
@@ -237,7 +237,7 @@
 date:        Thu Jan 01 00:00:01 1970 +0000
 summary:     msg 1
 
-abort: Inconsistent state, 31:58c80a7c8a40 is good and bad
+abort: starting revisions are not directly related
 error
 Testing changeset 15:e7fa0811edb0 (32 changesets remaining, ~5 tests)
 5cd978ea5149