filemerge: use fctx.write() in the internal:dump tool, instead of copy
This is slower but allows this tool to work with the "deferred writes"
milestone of in-memory merge.
The performance hit is not too noticiable since this only used for the :dump
merge tool during a conflict.
Differential Revision: https://phab.mercurial-scm.org/D617
--- a/mercurial/filemerge.py Thu Aug 31 22:39:10 2017 -0700
+++ b/mercurial/filemerge.py Tue Sep 05 12:04:02 2017 -0700
@@ -468,7 +468,7 @@
a = _workingpath(repo, fcd)
fd = fcd.path()
- util.copyfile(a, a + ".local")
+ util.writefile(a + ".local", fcd.decodeddata())
repo.wwrite(fd + ".other", fco.data(), fco.flags())
repo.wwrite(fd + ".base", fca.data(), fca.flags())
return False, 1, False