D400: filemerge: move a util copy call to filectx.write
phillco (Phil Cohen)
phabricator at mercurial-scm.org
Tue Aug 15 05:28:15 UTC 2017
phillco created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
This way a future in-memory-merge context can intercept them.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D400
AFFECTED FILES
mercurial/filemerge.py
CHANGE DETAILS
diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -360,7 +360,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):
To: phillco, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list