# HG changeset patch # User Siddharth Agarwal # Date 1444619080 25200 # Node ID f9f82c444ff79a87e902d859797daf2d505bf434 # Parent 47681e77e48477404c7383517af3963e999383e8 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. diff -r 47681e77e484 -r f9f82c444ff7 mercurial/filemerge.py --- 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