diff -r 2444285ec338 -r 30cb79d84352 mercurial/commands.py --- 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