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: