phillco created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Since merge tools might read from the filesystem, we need to write out our
  deferred writes here.
  
  No-ops if not using deferred writes.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/filemerge.py

CHANGE DETAILS

diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -496,6 +496,12 @@
         repo.ui.warn(_('warning: %s cannot merge change/delete conflict '
                        'for %s\n') % (tool, fcd.path()))
         return False, 1, None
+
+    # Must flush any deferred contents if running a merge tool.
+    from . import context
+    if isinstance(wctx, context.overlayworkingctx):
+        wctx.flushall()
+
     unused, unused, unused, back = files
     a = _workingpath(repo, fcd)
     b, c = _maketempfiles(repo, fco, fca)



To: phillco, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to