merge: remove calls to flushall()
authorPhil Cohen <phillco@fb.com>
Fri, 01 Dec 2017 00:07:23 -0800
changeset 35283 46510597d266
parent 35282 46d7f0713a87
child 35284 1b03407e808d
merge: remove calls to flushall() Since D1105, these are unnecessary since IMM will now never use workers. Differential Revision: https://phab.mercurial-scm.org/D1213
mercurial/merge.py
--- a/mercurial/merge.py	Fri Dec 01 00:07:23 2017 -0800
+++ b/mercurial/merge.py	Fri Dec 01 00:07:23 2017 -0800
@@ -1333,10 +1333,6 @@
         repo.ui.warn(_("current directory was removed\n"
                        "(consider changing to repo root: %s)\n") % repo.root)
 
-    # It's necessary to flush here in case we're inside a worker fork and will
-    # quit after this function.
-    wctx.flushall()
-
 def batchget(repo, mctx, wctx, actions):
     """apply gets to the working directory
 
@@ -1376,9 +1372,6 @@
     if i > 0:
         yield i, f
 
-    # It's necessary to flush here in case we're inside a worker fork and will
-    # quit after this function.
-    wctx.flushall()
 
 def applyupdates(repo, actions, wctx, mctx, overwrite, labels=None):
     """apply the merge action list to the working directory
@@ -1479,10 +1472,6 @@
         z += 1
         progress(_updating, z, item=f, total=numupdates, unit=_files)
 
-    # We should flush before forking into worker processes, since those workers
-    # flush when they complete, and we don't want to duplicate work.
-    wctx.flushall()
-
     # get in parallel
     prog = worker.worker(repo.ui, cost, batchget, (repo, mctx, wctx),
                          actions['g'])
@@ -2004,7 +1993,6 @@
                   'see "hg help -e fsmonitor")\n'))
 
         stats = applyupdates(repo, actions, wc, p2, overwrite, labels=labels)
-        wc.flushall()
 
         if not partial:
             with repo.dirstate.parentchange():