Fri, 20 Jul 2018 08:10:32 -0700 index: don't include nullid in len()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 20 Jul 2018 08:10:32 -0700] rev 38851
index: don't include nullid in len() I suspect the reason the nullid is in the index in the last position is that it lets index[i] for regular revision number, even when index was just a regular Python list. An alternative solution would have been to reserve revision number 0 for the null revision. I don't know why that wasn't done. Now that we have classes backing the index, we can easily make index[-1] get the nullid without having to put it last in the list and including it in the len(). This patch just hides the nullid -- it will still be accessible at index[len(index)]. I realize that this will be annoying when checking out across this commit for debugging (including bisection). Differential Revision: https://phab.mercurial-scm.org/D4022
Wed, 01 Aug 2018 10:57:14 -0700 index: replace insert(-1, e) method by append(e) method
Martin von Zweigbergk <martinvonz@google.com> [Wed, 01 Aug 2018 10:57:14 -0700] rev 38850
index: replace insert(-1, e) method by append(e) method I want to make index[len(index) - 1] be the tip revision, not null revision as it is today. insert(-1, e) will then make little sense. Since insert() currently requires the first argument to be -1, it seems simpler to replace it by a method that allows insertion only at the end. Note that revlogoldindex already has this method (by virtue of extending list). Differential Revision: https://phab.mercurial-scm.org/D4021
Fri, 20 Jul 2018 14:25:59 -0700 pure: create type for revlog v0 index
Martin von Zweigbergk <martinvonz@google.com> [Fri, 20 Jul 2018 14:25:59 -0700] rev 38849
pure: create type for revlog v0 index The new type takes care of hiding the nullid entry. This type helps us transition away from including that entry at index[len(index)-1]. Differential Revision: https://phab.mercurial-scm.org/D4020
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -3 +3 +10 +30 +100 +300 +1000 +3000 +10000 tip