D617: filemerge: use fctx.write() in the internal:dump tool, instead of copy

phillco (Phil Cohen) phabricator at mercurial-scm.org
Tue Sep 5 21:00:53 UTC 2017


phillco updated this revision to Diff 1617.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D617?vs=1593&id=1617

REVISION DETAIL
  https://phab.mercurial-scm.org/D617

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
@@ -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



To: phillco, #hg-reviewers
Cc: martinvonz, mercurial-devel


More information about the Mercurial-devel mailing list