Patchwork D1060: filemerge: add a missing flushall()

login
register
mail settings
Submitter phabricator
Date Oct. 17, 2017, 1:46 a.m.
Message ID <f71ec95b652f05e57d5af9d657f6372d@localhost.localdomain>
Download mbox | patch
Permalink /patch/25051/
State Not Applicable
Headers show

Comments

phabricator - Oct. 17, 2017, 1:46 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa25f886e1b8b: filemerge: add a missing flushall() (authored by phillco, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1060?vs=2699&id=2865

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

AFFECTED FILES
  mercurial/filemerge.py

CHANGE DETAILS




To: phillco, #hg-reviewers, durin42
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())