merge: flush any deferred writes just before recordupdates()
``recordupdates`` calls into the dirstate which requires the files to be
there, so this is the last possible moment we can flush anything.
Differential Revision: https://phab.mercurial-scm.org/D673
--- a/mercurial/merge.py Mon Sep 11 13:03:27 2017 -0700
+++ b/mercurial/merge.py Mon Sep 11 13:17:43 2017 -0700
@@ -1712,6 +1712,7 @@
repo.vfs.write('updatestate', p2.hex())
stats = applyupdates(repo, actions, wc, p2, overwrite, labels=labels)
+ wc.flushall()
if not partial:
with repo.dirstate.parentchange():