diff mercurial/merge.py @ 20594:ba619c50a355 stable

resolve: use "other" changeset from merge state (issue4163) We can use the "other" data from the recorded merge state instead of inferring what the other could be from working copy parent. This will allow resolve to fulfil its duty even when the second parent have been dropped. Most direct benefit is fixing a regression in backout.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 25 Feb 2014 18:45:01 -0800
parents 3678707e4017
children abd448767465 b96cb15ec9e0
line wrap: on
line diff
--- a/mercurial/merge.py	Tue Feb 25 18:54:47 2014 -0800
+++ b/mercurial/merge.py	Tue Feb 25 18:45:01 2014 -0800
@@ -186,11 +186,12 @@
     def mark(self, dfile, state):
         self._state[dfile][0] = state
         self._dirty = True
-    def resolve(self, dfile, wctx, octx):
+    def resolve(self, dfile, wctx):
         if self[dfile] == 'r':
             return 0
         stateentry = self._state[dfile]
         state, hash, lfile, afile, anode, ofile, onode, flags = stateentry
+        octx = self._repo[self._other]
         fcd = wctx[dfile]
         fco = octx[ofile]
         fca = self._repo.filectx(afile, fileid=anode)
@@ -641,7 +642,7 @@
                                  overwrite)
                 continue
             audit(fd)
-            r = ms.resolve(fd, wctx, mctx)
+            r = ms.resolve(fd, wctx)
             if r is not None and r > 0:
                 unresolved += 1
             else: