Patchwork D1060: filemerge: add a missing flushall()

login
register
mail settings
Submitter phabricator
Date Oct. 13, 2017, 7:46 p.m.
Message ID <differential-rev-PHID-DREV-qbkj7uzyzytofhigqwnr-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/24852/
State Superseded
Headers show

Comments

phabricator - Oct. 13, 2017, 7:46 p.m.
phillco created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

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
@@ -467,6 +467,12 @@ 
     a = _workingpath(repo, fcd)
     fd = fcd.path()
 
+    # Run ``flushall()`` to make any missing folders the following wwrite
+    # calls might be depending on.
+    from . import context
+    if isinstance(fcd, context.overlayworkingfilectx):
+        fcd.ctx().flushall()
+
     util.writefile(a + ".local", fcd.decodeddata())
     repo.wwrite(fd + ".other", fco.data(), fco.flags())
     repo.wwrite(fd + ".base", fca.data(), fca.flags())