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
$ hg init
$ touch a
$ unset HGUSER
$ echo "[ui]" >> .hg/hgrc
$ echo "username= foo" >> .hg/hgrc
$ echo " bar1" >> .hg/hgrc
$ hg ci -Am m
adding a
abort: username 'foo\nbar1' contains a newline
[255]
$ rm .hg/hgrc
$ HGUSER=`(echo foo; echo bar2)` hg ci -Am m
abort: username 'foo\nbar2' contains a newline
[255]
$ hg ci -Am m -u "`(echo foo; echo bar3)`"
transaction abort!
rollback completed
abort: username 'foo\nbar3' contains a newline!
[255]