Tue, 07 Oct 2014 00:38:14 -0700 strip: stop calling `remove` on smartset
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 07 Oct 2014 00:38:14 -0700] rev 22824
strip: stop calling `remove` on smartset The `remove` method is not part of the smartset specification. We use a plain old list comprehension instead.
Tue, 07 Oct 2014 00:31:53 -0700 rebase: transform the smartset to a list before comparing with a list
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 07 Oct 2014 00:31:53 -0700] rev 22823
rebase: transform the smartset to a list before comparing with a list This is highly suboptimal but smartsets are not comparable to lists yet.
Tue, 07 Oct 2014 00:41:58 -0700 merge.update: use `first` instead of direct indexing
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 07 Oct 2014 00:41:58 -0700] rev 22822
merge.update: use `first` instead of direct indexing This makes it compatible with all smartset classes.
Tue, 07 Oct 2014 00:33:47 -0700 qimport: use `first` and `last` instead of direct indexing
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 07 Oct 2014 00:33:47 -0700] rev 22821
qimport: use `first` and `last` instead of direct indexing This makes it compatible with all smartset classes.
Tue, 07 Oct 2014 00:16:59 -0700 rebase: use `last` instead of direct indexing
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 07 Oct 2014 00:16:59 -0700] rev 22820
rebase: use `last` instead of direct indexing This makes it compatible with all smartset classes.
Tue, 07 Oct 2014 00:14:53 -0700 mq: use `last` instead of direct indexing
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 07 Oct 2014 00:14:53 -0700] rev 22819
mq: use `last` instead of direct indexing This makes it compatible with all smartset classes.
Tue, 07 Oct 2014 00:09:50 -0700 repair: use `first` instead of direct indexing
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 07 Oct 2014 00:09:50 -0700] rev 22818
repair: use `first` instead of direct indexing This makes it compatible with all smartset classes.
Mon, 06 Oct 2014 23:45:07 -0700 rangeset: use `first` and `last` instead of direct indexing
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 06 Oct 2014 23:45:07 -0700] rev 22817
rangeset: use `first` and `last` instead of direct indexing This makes it compatible with all smarsets classes.
Mon, 06 Oct 2014 23:37:39 -0700 revpair: use `first` and `last` instead of direct indexing
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 06 Oct 2014 23:37:39 -0700] rev 22816
revpair: use `first` and `last` instead of direct indexing This makes it compatible with all smarsets classes.
Mon, 06 Oct 2014 23:37:08 -0700 revsingle: use `last` instead of direct indexing
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 06 Oct 2014 23:37:08 -0700] rev 22815
revsingle: use `last` instead of direct indexing This makes it compatible with all smarsets classes.
Mon, 06 Oct 2014 11:43:32 -0700 revset-limit: use boolean testing instead of `len(revs) < 1`
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 06 Oct 2014 11:43:32 -0700] rev 22814
revset-limit: use boolean testing instead of `len(revs) < 1` I'm not sure why we wrote it that way. But smartsets have faster/lazier non-zero testing than length computation.
Tue, 07 Oct 2014 00:18:08 -0700 filteredset: implement `first` and `last`
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 07 Oct 2014 00:18:08 -0700] rev 22813
filteredset: implement `first` and `last`
Mon, 06 Oct 2014 14:42:00 -0700 baseset: implement `first` and `last` methods
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 06 Oct 2014 14:42:00 -0700] rev 22812
baseset: implement `first` and `last` methods
Mon, 06 Oct 2014 12:52:36 -0700 generatorset: implement first and last methods
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 06 Oct 2014 12:52:36 -0700] rev 22811
generatorset: implement first and last methods
Mon, 06 Oct 2014 11:57:59 -0700 addset: implement first and last methods
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 06 Oct 2014 11:57:59 -0700] rev 22810
addset: implement first and last methods The implementation is non-lazy for now. One may want to make it more lazy in the future.
Mon, 06 Oct 2014 11:54:53 -0700 spanset: implement `first` and `last` methods
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 06 Oct 2014 11:54:53 -0700] rev 22809
spanset: implement `first` and `last` methods
Mon, 06 Oct 2014 11:46:53 -0700 smartset: add first and last methods
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 06 Oct 2014 11:46:53 -0700] rev 22808
smartset: add first and last methods In multiple places in the code, we use `someset[0]` or `someset[-1]`. This works only because the `someset` is usually a baseset. For the same reason we introduce a `first` and `last` methods to be implemented for all smartset classes.
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.
(0) -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip