Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 18639:5774732bb5e5
merge: apply non-interactive working dir updates in parallel
This has a big effect on the performance of working dir updates.
Here are the results of update from null to the given rev in several
repos, on a Linux 3.2 system with 32 cores running ext4, with the progress
extension enabled.
repo rev plain parallel speedup
hg 7068089c95a2 0.9 0.3 3
mozilla-central fe1600b22c77 42.8 7.7 5.5
linux-2.6 9ef4b770e069 31.4 4.9 6.4
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Sat, 09 Feb 2013 15:51:32 -0800 |
parents | 6390dd22b12f |
children | a8648f32b8ed |
comparison
equal
deleted
inserted
replaced
18638:047110c0e2a8 | 18639:5774732bb5e5 |
---|---|
5 # This software may be used and distributed according to the terms of the | 5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2 or any later version. | 6 # GNU General Public License version 2 or any later version. |
7 | 7 |
8 from node import nullid, nullrev, hex, bin | 8 from node import nullid, nullrev, hex, bin |
9 from i18n import _ | 9 from i18n import _ |
10 import error, util, filemerge, copies, subrepo | 10 import error, util, filemerge, copies, subrepo, worker |
11 import errno, os, shutil | 11 import errno, os, shutil |
12 | 12 |
13 class mergestate(object): | 13 class mergestate(object): |
14 '''track 3-way merge state of individual files''' | 14 '''track 3-way merge state of individual files''' |
15 def __init__(self, repo): | 15 def __init__(self, repo): |
430 hgsub = [a[1] for a in workeractions if a[0] == '.hgsubstate'] | 430 hgsub = [a[1] for a in workeractions if a[0] == '.hgsubstate'] |
431 if hgsub and hgsub[0] == 'r': | 431 if hgsub and hgsub[0] == 'r': |
432 subrepo.submerge(repo, wctx, mctx, wctx, overwrite) | 432 subrepo.submerge(repo, wctx, mctx, wctx, overwrite) |
433 | 433 |
434 z = 0 | 434 z = 0 |
435 for i, item in getremove(repo, mctx, overwrite, workeractions): | 435 prog = worker.worker(repo.ui, 0.001, getremove, (repo, mctx, overwrite), |
436 workeractions) | |
437 for i, item in prog: | |
436 z += i | 438 z += i |
437 repo.ui.progress(_('updating'), z, item=item, total=numupdates, | 439 repo.ui.progress(_('updating'), z, item=item, total=numupdates, |
438 unit=_('files')) | 440 unit=_('files')) |
439 | 441 |
440 if hgsub and hgsub[0] == 'g': | 442 if hgsub and hgsub[0] == 'g': |