changeset 34785:1af4561b6bfe

filemerge: add a missing flushall() Differential Revision: https://phab.mercurial-scm.org/D1060
author Phil Cohen <phillco@fb.com>
date Sun, 15 Oct 2017 20:36:29 -0700
parents 123a68e6b473
children 9c899660700a
files mercurial/filemerge.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/filemerge.py	Fri Oct 13 12:34:22 2017 -0700
+++ b/mercurial/filemerge.py	Sun Oct 15 20:36:29 2017 -0700
@@ -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())