filemerge: only copy to backup during premerge step
The premerge might leave the original file in an unclean state. Therefore it's
important to only copy the file in the beginning.
--- a/mercurial/filemerge.py Sun Oct 11 20:02:53 2015 -0700
+++ b/mercurial/filemerge.py Sun Oct 11 20:04:40 2015 -0700
@@ -505,7 +505,8 @@
b = temp("base", fca)
c = temp("other", fco)
back = a + ".orig"
- util.copyfile(a, back)
+ if premerge:
+ util.copyfile(a, back)
files = (a, b, c, back)
r = 1