Mercurial > public > mercurial-scm > hg
comparison mercurial/filemerge.py @ 34123:9c07cff039bc
filemerge: flush if using deferred writes when running a merge tool
Since merge tools might read from the filesystem, we need to write out our
deferred writes here.
No-ops if not using deferred writes.
Differential Revision: https://phab.mercurial-scm.org/D627
author | Phil Cohen <phillco@fb.com> |
---|---|
date | Mon, 11 Sep 2017 13:03:27 -0700 |
parents | c0ce60459d84 |
children | 1d804c22c671 |
comparison
equal
deleted
inserted
replaced
34122:c0ce60459d84 | 34123:9c07cff039bc |
---|---|
664 func = _xmerge | 664 func = _xmerge |
665 mergetype = fullmerge | 665 mergetype = fullmerge |
666 onfailure = _("merging %s failed!\n") | 666 onfailure = _("merging %s failed!\n") |
667 precheck = None | 667 precheck = None |
668 | 668 |
669 # If using deferred writes, must flush any deferred contents if running | |
670 # an external merge tool since it has arbitrary access to the working | |
671 # copy. | |
672 wctx.flushall() | |
673 | |
669 toolconf = tool, toolpath, binary, symlink | 674 toolconf = tool, toolpath, binary, symlink |
670 | 675 |
671 if mergetype == nomerge: | 676 if mergetype == nomerge: |
672 r, deleted = func(repo, mynode, orig, fcd, fco, fca, toolconf, labels) | 677 r, deleted = func(repo, mynode, orig, fcd, fco, fca, toolconf, labels) |
673 return True, r, deleted | 678 return True, r, deleted |