Patchwork D627: filemerge: flush if using deferred writes when running a merge tool

login
register
mail settings
Submitter phabricator
Date Sept. 7, 2017, 4:32 p.m.
Message ID <e1707bc1e058391a9cfee8821f2bc38b@localhost.localdomain>
Download mbox | patch
Permalink /patch/23725/
State Not Applicable
Headers show

Comments

phabricator - Sept. 7, 2017, 4:32 p.m.
phillco updated this revision to Diff 1668.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D627?vs=1608&id=1668

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

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
@@ -666,6 +666,11 @@ 
         onfailure = _("merging %s failed!\n")
         precheck = None
 
+        # Must flush any deferred contents if running an external merge tool.
+        from . import context
+        if isinstance(wctx, context.overlayworkingctx):
+            wctx.flushall()
+
     toolconf = tool, toolpath, binary, symlink
 
     if mergetype == nomerge: