diff mercurial/commands.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 7f865a94691e
children 710c2755e66a 2d183dd54384
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Feb 25 18:54:47 2014 -0800
+++ b/mercurial/commands.py	Tue Feb 25 18:45:01 2014 -0800
@@ -4961,7 +4961,6 @@
                 ms.mark(f, "u")
             else:
                 wctx = repo[None]
-                mctx = wctx.parents()[-1]
 
                 # backup pre-resolve (merge uses .orig for its own purposes)
                 a = repo.wjoin(f)
@@ -4970,7 +4969,7 @@
                 try:
                     # resolve file
                     ui.setconfig('ui', 'forcemerge', opts.get('tool', ''))
-                    if ms.resolve(f, wctx, mctx):
+                    if ms.resolve(f, wctx):
                         ret = 1
                 finally:
                     ui.setconfig('ui', 'forcemerge', '')