Patchwork D400: filemerge: move a util copy call to filectx.write

login
register
mail settings
Submitter phabricator
Date Aug. 25, 2017, 9:01 p.m.
Message ID <98ebd8f364e3ee424fdbeb8e3a3d120f@localhost.localdomain>
Download mbox | patch
Permalink /patch/23353/
State Not Applicable
Headers show

Comments

phabricator - Aug. 25, 2017, 9:01 p.m.
phillco updated this revision to Diff 1305.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D400?vs=1218&id=1305

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

AFFECTED FILES
  mercurial/filemerge.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -348,7 +348,9 @@ 
             return 0
         if premerge not in validkeep:
             # restore from backup and try again
-            util.copyfile(back, repo.wjoin(fcd.path()))
+            # TODO: Add a workingfilectx.write(otherfilectx) path so we can use
+            # util.copy here instead.
+            fcd.write(util.readfile(back), fcd.flags())
     return 1 # continue merging
 
 def _mergecheck(repo, mynode, orig, fcd, fco, fca, toolconf):