Fri, 17 Oct 2014 21:25:48 -0700 transaction: only generate file when we actually close the transaction stable
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 17 Oct 2014 21:25:48 -0700] rev 23103
transaction: only generate file when we actually close the transaction Before this change, the file were written for every call to `tr.close()` exposing data to reader far too early.
Mon, 29 Sep 2014 00:59:25 -0700 transaction: extract file generation into its own function stable
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 29 Sep 2014 00:59:25 -0700] rev 23102
transaction: extract file generation into its own function We extract the code generating files into its own function. We are about to move this code around to fix a bug. We'll need it in a function soon to reuse it for "pending" logic. So we move the code into a function instead of moving it twice.
Tue, 28 Oct 2014 23:05:19 -0400 amend: abort early if no username is configured with evolve enabled (issue4211) stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 28 Oct 2014 23:05:19 -0400] rev 23101
amend: abort early if no username is configured with evolve enabled (issue4211) Amend will reuse the original username if a new one is not provided with -U, but obsolete.createmarkers() only considers ui.username() for the obsolete marker's metadata. Allowing the metadata field to be spoofed seems to defeat the point of the field in the first place. This covers 'evolve amend' and 'ci --amend' with evolve enabled. Without this, the transaction aborts but the parent changeset is set to -1. The corresponding test will be added to evolve separately.
Tue, 28 Oct 2014 14:06:06 -0700 revset: fix O(2^n) perf regression in addset stable
Durham Goode <durham@fb.com> [Tue, 28 Oct 2014 14:06:06 -0700] rev 23100
revset: fix O(2^n) perf regression in addset hg log -r 1 ... -r 100 was never returning due to a regression in the way addset computes __nonzero__. It used 'bool(self._r1 or self._r2)' which required executing self._r1.__nonzero__ twice (once for the or, once for the bool). hg log with a lot of -r's happens to build a one sided addset tree of N length, which ends up being 2^N performance. This patch fixes it by converting to bool before or'ing. This problem can be repro'd with something as simple as: hg log `for x in $(seq 1 50) ; do echo "-r $x "; done` Adding '1 + 2 + ... + 20' to the revsetbenchmark.txt didn't seem to repro the problem, so I wasn't able to add a revset benchmark for this issue.
Mon, 27 Oct 2014 23:47:41 -0500 tests: add missing glob for Windows stable
Matt Mackall <mpm@selenic.com> [Mon, 27 Oct 2014 23:47:41 -0500] rev 23099
tests: add missing glob for Windows
Mon, 27 Oct 2014 18:44:05 -0500 test-convert-svn-sink: properly isolate symlink section stable
Matt Mackall <mpm@selenic.com> [Mon, 27 Oct 2014 18:44:05 -0500] rev 23098
test-convert-svn-sink: properly isolate symlink section This was fixed earlier by moving all the symlink bits to a section to the end of the file, but then it was broken (by the same person) by adding more tests at the end.
Fri, 24 Oct 2014 11:39:39 -0700 util.fspath: use a dict rather than a linear scan for lookups stable
Siddharth Agarwal <sid0@fb.com> [Fri, 24 Oct 2014 11:39:39 -0700] rev 23097
util.fspath: use a dict rather than a linear scan for lookups Previously, we'd scan through the entire directory listing looking for a normalized match. This is O(N) in the number of files in the directory. If we decide to call util.fspath on each file in it, the overall complexity works out to O(N^2). This becomes a problem with directories a few thousand files or larger. Switch to using a dictionary instead. There is a slightly higher upfront cost to pay, but for cases like the above this is amortized O(1). Plus there is a lower constant factor because generator comprehensions are faster than for loops, so overall it works out to be a very small loss in performance for 1 file, and a huge gain when there's more. For a large repo with around 200k files in it on a case-insensitive file system, for a large directory with over 30,000 files in it, the following command was tested: ls | shuf -n $COUNT | xargs hg status This command leads to util.fspath being called on $COUNT files in the directory. COUNT before after 1 0.77s 0.78s 100 1.42s 0.80s 1000 6.3s 0.96s I also tested with COUNT=10000, but before took too long so I gave up.
Mon, 27 Oct 2014 16:53:01 -0500 test-clone.t: drop message about listing bookmarks with no hardlinks stable
Matt Mackall <mpm@selenic.com> [Mon, 27 Oct 2014 16:53:01 -0500] rev 23096
test-clone.t: drop message about listing bookmarks with no hardlinks
(0) -10000 -3000 -1000 -300 -100 -30 -10 -8 +8 +10 +30 +100 +300 +1000 +3000 +10000 tip