Mercurial > hg
diff mercurial/unionrepo.py @ 38850:6104b203bec8
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
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 01 Aug 2018 10:57:14 -0700 |
parents | df5f6881cebd |
children | 089fc0db0954 |
line wrap: on
line diff
--- a/mercurial/unionrepo.py Fri Jul 20 14:25:59 2018 -0700 +++ b/mercurial/unionrepo.py Wed Aug 01 10:57:14 2018 -0700 @@ -73,7 +73,7 @@ # I have no idea if csize is valid in the base revlog context. e = (flags, None, rsize, base, link, self.rev(p1node), self.rev(p2node), node) - self.index.insert(-1, e) + self.index.append(e) self.nodemap[node] = n self.bundlerevs.add(n) n += 1