Thu, 23 Mar 2017 20:50:33 +0900 similar: get rid of quadratic addedfiles.remove()
Yuya Nishihara <yuya@tcha.org> [Thu, 23 Mar 2017 20:50:33 +0900] rev 31580
similar: get rid of quadratic addedfiles.remove() Instead, build a set of files to be removed and recreate addedfiles only if necessary. Benchmark with 50k added/removed files, on tmpfs: $ hg addremove --dry-run --time -q original: real 16.550 secs (user 15.000+0.000 sys 1.540+0.000) previous: real 16.730 secs (user 15.280+0.000 sys 1.440+0.000) this patch: real 16.070 secs (user 14.470+0.000 sys 1.580+0.000)
Sun, 15 Mar 2015 18:58:56 +0900 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org> [Sun, 15 Mar 2015 18:58:56 +0900] rev 31579
similar: sort files not by object id but by path for stable result Perhaps the original implementation would want to sort added/removed files alphabetically, but actually it did sort fctx objects by memory location. This patch removes the use of set()s in order to preserve the order of added/removed files. addedfiles.remove() becomes quadratic, but its cost appears not dominant. Anyway, the quadratic behavior will be eliminated by the next patch. Benchmark with 50k added/removed files, on tmpfs: $ mkdir src $ for n in `seq 0 49`; do > mkdir `printf src/%02d $n` > done $ for n in `seq 0 49999`; do > f=`printf src/%02d/%05d $(($n/1000)) $n` > dd if=/dev/urandom of=$f bs=8k count=1 status=none > done $ hg ci -qAm 'add 50k files of random content' $ mv src dest $ hg addremove --dry-run --time -q original: real 16.550 secs (user 15.000+0.000 sys 1.540+0.000) this patch: real 16.730 secs (user 15.280+0.000 sys 1.440+0.000)
Sun, 12 Mar 2017 01:34:17 -0800 debugfsinfo: print fstype information
Jun Wu <quark@fb.com> [Sun, 12 Mar 2017 01:34:17 -0800] rev 31578
debugfsinfo: print fstype information Since we have osutil.getfstype, it'll be handy if "debugfsinfo" prints it.
Sun, 12 Mar 2017 01:03:23 -0800 util: enable hardlink for copyfile
Jun Wu <quark@fb.com> [Sun, 12 Mar 2017 01:03:23 -0800] rev 31577
util: enable hardlink for copyfile This patch removes the global variable "allowhardlinks" that disables hardlink in all cases, so hardlink gets enabled if the filesystem type is whitelisted. Third party extensions wanting to enable hardlink support unconditionally can replace "_hardlinkfswhitelist.__contains__".
Sun, 12 Mar 2017 00:26:20 -0800 hghave: add a check about whitelisted filesystem that supports hardlink
Jun Wu <quark@fb.com> [Sun, 12 Mar 2017 00:26:20 -0800] rev 31576
hghave: add a check about whitelisted filesystem that supports hardlink This is needed for the test added by the next patch.
Sun, 12 Mar 2017 00:23:07 -0800 util: disable hardlink for copyfile if fstype is outside a whitelist
Jun Wu <quark@fb.com> [Sun, 12 Mar 2017 00:23:07 -0800] rev 31575
util: disable hardlink for copyfile if fstype is outside a whitelist Since osutil.getfstype is available, use it to detect filesystem types. The whitelist currently includes common local filesystems on Linux where they should have good hardlink support. We may add new filesystems for other platforms later.
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -6 +6 +10 +30 +100 +300 +1000 +3000 +10000 tip