mercurial/commands.py
branchstable
changeset 26959 ed5f20f9c22e
parent 26826 39dbf495880b
child 27010 f4fec0940278
child 27320 59d5f619e69e
--- a/mercurial/commands.py	Thu Nov 12 13:16:04 2015 -0800
+++ b/mercurial/commands.py	Fri Nov 13 15:56:02 2015 -0800
@@ -5670,10 +5670,10 @@
                     ui.setconfig('ui', 'forcemerge', '', 'resolve')
                     ms.commit()
 
-                # replace filemerge's .orig file with our resolve file
-                # for files in tocomplete, ms.resolve will not overwrite
-                # .orig -- only preresolve does
-                util.rename(a + ".resolve", a + ".orig")
+                # replace filemerge's .orig file with our resolve file, but only
+                # for merges that are complete
+                if complete:
+                    util.rename(a + ".resolve", a + ".orig")
 
         for f in tocomplete:
             try:
@@ -5687,6 +5687,10 @@
                 ui.setconfig('ui', 'forcemerge', '', 'resolve')
                 ms.commit()
 
+            # replace filemerge's .orig file with our resolve file
+            a = repo.wjoin(f)
+            util.rename(a + ".resolve", a + ".orig")
+
         ms.commit()
 
         if not didwork and pats: