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

login
register
mail settings
Submitter phabricator
Date Sept. 5, 2017, 9 p.m.
Message ID <754781d1a647878905d15867891144f1@localhost.localdomain>
Download mbox | patch
Permalink /patch/23677/
State Not Applicable
Headers show

Comments

phabricator - Sept. 5, 2017, 9 p.m.
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




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

Patch

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