# HG changeset patch # User Phil Cohen # Date 1504204139 25200 # Node ID d37f1bb681691a789f67d5bd9672830792512122 # Parent 67cfffbfb6a0b9c798c8d245091e15aa3025bfa5 filemerge: move a util copy call to filectx.write This way a future in-memory-merge context can intercept them. Differential Revision: https://phab.mercurial-scm.org/D400 diff -r 67cfffbfb6a0 -r d37f1bb68169 mercurial/filemerge.py --- a/mercurial/filemerge.py Thu Aug 31 11:28:59 2017 -0700 +++ b/mercurial/filemerge.py Thu Aug 31 11:28:59 2017 -0700 @@ -348,7 +348,9 @@ return 0 if premerge not in validkeep: # restore from backup and try again - util.copyfile(back, repo.wjoin(fcd.path())) + # TODO: Add a workingfilectx.write(otherfilectx) path so we can use + # util.copy here instead. + fcd.write(util.readfile(back), fcd.flags()) return 1 # continue merging def _mergecheck(repo, mynode, orig, fcd, fco, fca, toolconf):