Mercurial > hg
changeset 34786:9c899660700a
merge: don't use workers in in-memory mode
The worker processes can't share memory, so workers should not be used.
Differential Revision: https://phab.mercurial-scm.org/D1105
author | Phil Cohen <phillco@fb.com> |
---|---|
date | Sun, 15 Oct 2017 20:36:29 -0700 |
parents | 1af4561b6bfe |
children | 754b5117622f |
files | mercurial/merge.py |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Sun Oct 15 20:36:29 2017 -0700 +++ b/mercurial/merge.py Sun Oct 15 20:36:29 2017 -0700 @@ -1427,8 +1427,12 @@ z += 1 progress(_updating, z, item=f, total=numupdates, unit=_files) + # When merging in-memory, we can't support worker processes, so set the + # per-item cost at 0 in that case. + cost = 0 if wctx.isinmemory() else 0.001 + # remove in parallel (must come before resolving path conflicts and getting) - prog = worker.worker(repo.ui, 0.001, batchremove, (repo, wctx), + prog = worker.worker(repo.ui, cost, batchremove, (repo, wctx), actions['r']) for i, item in prog: z += i @@ -1452,7 +1456,7 @@ wctx.flushall() # get in parallel - prog = worker.worker(repo.ui, 0.001, batchget, (repo, mctx, wctx), + prog = worker.worker(repo.ui, cost, batchget, (repo, mctx, wctx), actions['g']) for i, item in prog: z += i