Tue, 07 Oct 2014 00:20:00 -0700 getgraphlogrevs: remove user of baseset.append
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 07 Oct 2014 00:20:00 -0700] rev 22807
getgraphlogrevs: remove user of baseset.append A `baseset` has multiple cached results and will get even more in the future. Making it an object "populated once" like the other smartsets makes it both safer and simpler. The append method will be removed at some point.
Tue, 07 Oct 2014 00:04:16 -0700 getlogrevs: remove user of baseset.append
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 07 Oct 2014 00:04:16 -0700] rev 22806
getlogrevs: remove user of baseset.append A `baseset` has multiple cached results and will get even more in the future. Making it an object "populated once" like the other smartsets makes it both safer and simpler. The append method will be removed at some point.
Wed, 08 Oct 2014 00:55:09 -0700 revset-last: remove user of baseset.append
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 08 Oct 2014 00:55:09 -0700] rev 22805
revset-last: remove user of baseset.append A `baseset` has multiple cached results and will get even more in the future. Making it an object "populated once" like the other smartsets makes it both safer and simpler. The append method will be removed at some point.
Mon, 06 Oct 2014 10:57:01 -0700 revset-limit: remove user of baseset.append
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 06 Oct 2014 10:57:01 -0700] rev 22804
revset-limit: remove user of baseset.append A `baseset` has multiple cached results and will get even more in the future. Making it an object "populated once" like the other smartsets makes it both safer and simpler. The append method will be removed at some point.
Tue, 07 Oct 2014 00:12:56 -0700 mq: use `revs.sort()` to ensure the set is ascending
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 07 Oct 2014 00:12:56 -0700] rev 22803
mq: use `revs.sort()` to ensure the set is ascending Sorting is super-cheap with the new smartset class, so we can use it to enforce the order. Otherwise all smartset classes would have to allow direct indexing.
Mon, 06 Oct 2014 10:41:43 -0700 baseset: use default value instead of [] when possible
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 06 Oct 2014 10:41:43 -0700] rev 22802
baseset: use default value instead of [] when possible For pure cleanup purposes, we replace all the occurences of `baseset([])` with `baseset()`.
Sat, 04 Oct 2014 06:17:18 -0700 generatorset: implement isascending and isdescending
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 04 Oct 2014 06:17:18 -0700] rev 22801
generatorset: implement isascending and isdescending
Fri, 03 Oct 2014 21:11:56 -0700 generatorset: explicitly track iteration order
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 03 Oct 2014 21:11:56 -0700] rev 22800
generatorset: explicitly track iteration order The expected iteration order may be different than the fast iteration order (eg: ancestors(42) is expected to be iterated upward but is fast/lazy to compute downward. So we explicitly track the iteration order and enforce it if the manual iteration is requested. Default expected iteration order of a generator set is ascending because I'm not aware of any descending revset that need a generatorset. The first to find such descending revset will have the pleasure to make this configurable.
Fri, 03 Oct 2014 20:23:02 -0700 addset: drop caching through generatorset
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 03 Oct 2014 20:23:02 -0700] rev 22799
addset: drop caching through generatorset The utility of this cache is debatable (no visible benchmark impact) and using generatorset for such purpose makes the code complicated. We drop it for now. Someone can reintroduce a smart version of it in the future if it is detected to be relevant.
Fri, 03 Oct 2014 21:01:30 -0700 generatorset: get list-based fast iterations after the generator is consumed
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 03 Oct 2014 21:01:30 -0700] rev 22798
generatorset: get list-based fast iterations after the generator is consumed When all revisions are known, we shortcut most of the class logic to use list iteration instead. The cost of the sort is expected to be non-significant. The list creation and sorting could be done lazily in the future. We have to copy the list to not break existing iterator created before we finished consuming the generator.
Fri, 03 Oct 2014 20:48:28 -0700 generatorset: move iteration code into _iterator
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 03 Oct 2014 20:48:28 -0700] rev 22797
generatorset: move iteration code into _iterator _iterator handles the generator iteration. The `__iter__` method will need changes to handle ordering-related information.
Fri, 03 Oct 2014 20:43:48 -0700 generatorset: stop using a base as the _genlist
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 03 Oct 2014 20:43:48 -0700] rev 22796
generatorset: stop using a base as the _genlist It does not add anything and makes it more complicated to have a simple baseset implementation.
Fri, 03 Oct 2014 20:12:02 -0700 generatorset: drop the leading underscore in the class name
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 03 Oct 2014 20:12:02 -0700] rev 22795
generatorset: drop the leading underscore in the class name This is a real smart set now.
Fri, 03 Oct 2014 20:14:43 -0700 generatorset: update the docstring now that it is a smartset
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 03 Oct 2014 20:14:43 -0700] rev 22794
generatorset: update the docstring now that it is a smartset The documentation was still stating that this class was not a smartset. We drop that part.
Fri, 03 Oct 2014 20:18:48 -0700 addset: drop the leading underscore from the class name
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 03 Oct 2014 20:18:48 -0700] rev 22793
addset: drop the leading underscore from the class name This class is now a real smartset.
Fri, 03 Oct 2014 20:17:12 -0700 addset: this is a smartset, update the docstring
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 03 Oct 2014 20:17:12 -0700] rev 22792
addset: this is a smartset, update the docstring The documentation was still stating that this class is a not a smartset. We drop that part.
Thu, 09 Oct 2014 05:27:23 -0700 addset: use the ascending argument in _iterordered
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 09 Oct 2014 05:27:23 -0700] rev 22791
addset: use the ascending argument in _iterordered Fix a bug where fastasc and fastdesc were iterator in the same order as self._ascending.
Wed, 08 Oct 2014 14:03:07 -0500 rebase: add help examples
Matt Mackall <mpm@selenic.com> [Wed, 08 Oct 2014 14:03:07 -0500] rev 22790
rebase: add help examples
Wed, 08 Oct 2014 13:40:50 -0500 rebase: attempt to clarify --base
Matt Mackall <mpm@selenic.com> [Wed, 08 Oct 2014 13:40:50 -0500] rev 22789
rebase: attempt to clarify --base
Wed, 08 Oct 2014 12:59:11 -0400 manifest: rearrange add() method and add comments for clarity
Augie Fackler <raf@durin42.com> [Wed, 08 Oct 2014 12:59:11 -0400] rev 22788
manifest: rearrange add() method and add comments for clarity Omit the check of bool(p1) since it's always true in practice: it will either be nullid or some valid manifest sha, and we know nullid won't ever be in the cache so we can simplify understanding of this code.
Wed, 08 Oct 2014 11:52:30 -0400 manifest: simplify manifest.add() by making args required
Augie Fackler <raf@durin42.com> [Wed, 08 Oct 2014 11:52:30 -0400] rev 22787
manifest: simplify manifest.add() by making args required I verified that changed was never false (it was always a 2-tuple) by adding @@ -220,6 +225,8 @@ class manifest(revlog.revlog): def add(self, map, transaction, link, p1=None, p2=None, changed=None): + if not changed: + assert False, 'changed was %r' % changed # if we're using the cache, make sure it is valid and # parented by the same node we're diffing against if not (changed and p1 and (p1 in self._mancache)): and observing that the test suite still passed. Making all the arguments required should help future readers understand what's going on here.
Thu, 25 Sep 2014 14:13:31 -0400 manifest: move manifest parsing to module-level
Augie Fackler <raf@durin42.com> [Thu, 25 Sep 2014 14:13:31 -0400] rev 22786
manifest: move manifest parsing to module-level We'll need this in the sharded manifest hashing routine, and I need to tweak it anyway, so make it module-level now.
Wed, 24 Sep 2014 15:14:44 -0400 revlog: move references to revlog.hash to inside the revlog class
Augie Fackler <raf@durin42.com> [Wed, 24 Sep 2014 15:14:44 -0400] rev 22785
revlog: move references to revlog.hash to inside the revlog class This will make it possible for subclasses to have different hashing schemes when appropriate. I anticipate using this in manifests. Note that there's still one client of mercurial.revlog.hash() outside of revlog: mercurial.context.memctx uses it to construct the file entries in an in-memory manifest. I don't think this will be a problem in the immediate future, so I've left it as-is.
Wed, 24 Sep 2014 15:10:52 -0400 revlog: mark nullhash as module-private
Augie Fackler <raf@durin42.com> [Wed, 24 Sep 2014 15:10:52 -0400] rev 22784
revlog: mark nullhash as module-private No other module should ever need this, so mark it with _ so nobody tries to use it.
Wed, 08 Oct 2014 20:51:01 +0900 ui: disable echo back of prompt input if ui is set to non-tty purposely
Yuya Nishihara <yuya@tcha.org> [Wed, 08 Oct 2014 20:51:01 +0900] rev 22783
ui: disable echo back of prompt input if ui is set to non-tty purposely 9ab18a912c44 is nice for test output, but it also affects command-server channel. Command-server client shouldn't receive echo-back message, which makes it harder to parse the output.
Fri, 03 Oct 2014 18:48:09 -0700 dirstate: cache util.normcase while constructing the foldmap
Siddharth Agarwal <sid0@fb.com> [Fri, 03 Oct 2014 18:48:09 -0700] rev 22782
dirstate: cache util.normcase while constructing the foldmap This is a small win on OS X. hg perfdirstatefoldmap: before: wall 0.399708 comb 0.410000 user 0.390000 sys 0.020000 (best of 25) after: wall 0.386331 comb 0.390000 user 0.370000 sys 0.020000 (best of 25)
Fri, 03 Oct 2014 18:47:28 -0700 normcase: for darwin, use fast ASCII lower
Siddharth Agarwal <sid0@fb.com> [Fri, 03 Oct 2014 18:47:28 -0700] rev 22781
normcase: for darwin, use fast ASCII lower Constructing the foldmap is much faster on OS X now. For a large real-world repo, hg perfdirstatefoldmap: before: wall 0.805278 comb 0.800000 user 0.790000 sys 0.010000 (best of 13) after: wall 0.399708 comb 0.410000 user 0.390000 sys 0.020000 (best of 25) This is a nice boost to 'hg status', especially with the third-party hgwatchman extension enabled (which eliminates stat calls). For the above repo, 'hg status' goes from 1.17 seconds to 0.74.
Fri, 03 Oct 2014 19:58:26 -0700 perf: add a way to measure the perf of constructing the foldmap
Siddharth Agarwal <sid0@fb.com> [Fri, 03 Oct 2014 19:58:26 -0700] rev 22780
perf: add a way to measure the perf of constructing the foldmap Constructing the foldmap is a necessary part of operations like 'hg status' on OS X. This command allows us to measure the perf of constructing it.
Fri, 03 Oct 2014 18:45:56 -0700 encoding.lower: use fast ASCII lower
Siddharth Agarwal <sid0@fb.com> [Fri, 03 Oct 2014 18:45:56 -0700] rev 22779
encoding.lower: use fast ASCII lower This benefits, among other things, the case collision auditor. On a Linux system with a large real-world repo where all filenames are ASCII, hg perfcca: before: wall 0.260157 comb 0.270000 user 0.230000 sys 0.040000 (best of 38) after: wall 0.164616 comb 0.160000 user 0.160000 sys 0.000000 (best of 54)
Fri, 03 Oct 2014 18:42:39 -0700 parsers: add a function to efficiently lowercase ASCII strings
Siddharth Agarwal <sid0@fb.com> [Fri, 03 Oct 2014 18:42:39 -0700] rev 22778
parsers: add a function to efficiently lowercase ASCII strings We need a way to efficiently lowercase ASCII strings. For example, 'hg status' needs to build up the fold map -- a map from a canonical case (for OS X, lowercase) to the actual case of each file and directory in the dirstate. The current way we do that is to try decoding to ASCII and then calling lower() on the string, labeled 'orig' below: str.decode('ascii') return str.lower() This is pretty inefficient, and it turns out we can do much better. I also tested out a condition-based approach, labeled 'cond' below: (c >= 'A' && c <= 'Z') ? (c + ('a' - 'A')) : c 'cond' turned out to be slower in all cases. A 256-byte lookup table with invalid values for everything past 127 performed similarly, but this was less verbose. On OS X 10.9 with LLVM version 6.0 (clang-600.0.51), the asciilower function was run against two corpuses. Corpus 1 (list of files from real-world repo, > 100k files): orig: wall 0.428567 comb 0.430000 user 0.430000 sys 0.000000 (best of 24) cond: wall 0.077204 comb 0.070000 user 0.070000 sys 0.000000 (best of 100) lookup: wall 0.060714 comb 0.060000 user 0.060000 sys 0.000000 (best of 100) Corpus 2 (mozilla-central, 113k files): orig: wall 0.238406 comb 0.240000 user 0.240000 sys 0.000000 (best of 42) cond: wall 0.040779 comb 0.040000 user 0.040000 sys 0.000000 (best of 100) lookup: wall 0.037623 comb 0.040000 user 0.040000 sys 0.000000 (best of 100) On a Linux server-class machine with GCC 4.4.6 20120305 (Red Hat 4.4.6-4): Corpus 1 (real-world repo, > 100k files): orig: wall 0.260899 comb 0.260000 user 0.260000 sys 0.000000 (best of 38) cond: wall 0.054818 comb 0.060000 user 0.060000 sys 0.000000 (best of 100) lookup: wall 0.048489 comb 0.050000 user 0.050000 sys 0.000000 (best of 100) Corpus 2 (mozilla-central, 113k files): orig: wall 0.153082 comb 0.150000 user 0.150000 sys 0.000000 (best of 65) cond: wall 0.031007 comb 0.040000 user 0.040000 sys 0.000000 (best of 100) lookup: wall 0.028793 comb 0.030000 user 0.030000 sys 0.000000 (best of 100) SSE instructions might help even more, but I didn't experiment with those.
(0) -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip