From 5380ac35daeb0635e5d3fef0a6ce791a5aff440a Mon Sep 17 00:00:00 2001 From: Siddharth Agarwal Date: Wed, 18 Nov 2015 23:43:18 -0800 Subject: [PATCH] resolve: fix incorrect merge The merge from stable into default was semantically incomplete -- a couple of changes in preceding code had to be rewritten here. This code only triggers for change/delete conflicts, so we can't test it yet. We will soon be able to do it, though. --- mercurial/commands.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mercurial/commands.py b/mercurial/commands.py index 3ad6f29157..739067a83c 100644 --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -5704,7 +5704,11 @@ def resolve(ui, repo, *pats, **opts): # replace filemerge's .orig file with our resolve file a = repo.wjoin(f) - util.rename(a + ".resolve", a + ".orig") + try: + util.rename(a + ".resolve", cmdutil.origpath(ui, repo, a)) + except OSError as inst: + if inst.errno != errno.ENOENT: + raise ms.commit()