Mercurial > public > mercurial-scm > hg
diff mercurial/revlog.py @ 38852:a3dacabd476b
index: don't allow index[len(index)] to mean nullid
Now everything else has been cleaned up and we can drop support for
getting the nullid from the end of the index (from *past* the end
actually, since we reduced the length in the previous patch).
Differential Revision: https://phab.mercurial-scm.org/D4023
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 20 Jul 2018 14:36:42 -0700 |
parents | 781b2720d2ac |
children | 18e866ae2a7d |
line wrap: on
line diff
--- a/mercurial/revlog.py Fri Jul 20 08:10:32 2018 -0700 +++ b/mercurial/revlog.py Fri Jul 20 14:36:42 2018 -0700 @@ -792,7 +792,7 @@ class revlogoldindex(list): def __getitem__(self, i): - if i == -1 or i == len(self): + if i == -1: return (0, 0, 0, -1, -1, -1, -1, nullid) return list.__getitem__(self, i)