Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 27010:f4fec0940278
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 18 Nov 2015 20:59:17 -0600 |
parents | a4c26918fb23 ed5f20f9c22e |
children | ec37257341a9 |
line wrap: on
line diff
--- 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: