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:56 p.m.
Message ID <f22209206a12b15750f685f2895d27d9@localhost.localdomain>
Download mbox | patch
Permalink /patch/23678/
State Not Applicable
Headers show

Comments

phabricator - Sept. 5, 2017, 9:56 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGcd38b83bfb23: filemerge: use fctx.write() in the internal:dump tool, instead of copy (authored by phillco).

REPOSITORY
  rHG Mercurial

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

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