--- a/mercurial/commands.py Sun Nov 01 14:43:25 2015 +0900
+++ b/mercurial/commands.py Wed Nov 18 20:59:17 2015 -0600
@@ -5680,14 +5680,15 @@
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
- try:
- util.rename(a + ".resolve", cmdutil.origpath(ui, repo, a))
- except OSError as inst:
- if inst.errno != errno.ENOENT:
- raise
+ # replace filemerge's .orig file with our resolve file, but only
+ # for merges that are complete
+ if complete:
+ try:
+ util.rename(a + ".resolve",
+ cmdutil.origpath(ui, repo, a))
+ except OSError as inst:
+ if inst.errno != errno.ENOENT:
+ raise
for f in tocomplete:
try:
@@ -5701,6 +5702,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: