# HG changeset patch # User Phil Cohen # Date 1504638242 25200 # Node ID cd38b83bfb2308c25deb48ec5452e0417d52e471 # Parent a9d8caf95941ff03466c7087f3d8ae92ebe61713 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 diff -r a9d8caf95941 -r cd38b83bfb23 mercurial/filemerge.py --- 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