mercurial/commands.py
changeset 7847 30cb79d84352
parent 7829 b61e918ea767
child 7848 89e05c02a4af
--- a/mercurial/commands.py	Mon Mar 09 11:41:38 2009 -0500
+++ b/mercurial/commands.py	Mon Mar 16 16:58:41 2009 -0500
@@ -2363,8 +2363,17 @@
             else:
                 wctx = repo[None]
                 mctx = wctx.parents()[-1]
+
+                # backup pre-resolve (merge uses .orig for its own purposes)
+                a = repo.wjoin(f)
+                util.copyfile(a, a + ".resolve")
+
+                # resolve file
                 ms.resolve(f, wctx, mctx)
 
+                # replace filemerge's .orig file with our resolve file
+                util.rename(a + ".resolve", a + ".orig")
+
 def revert(ui, repo, *pats, **opts):
     """restore individual files or dirs to an earlier state