# HG changeset patch # User Martin von Zweigbergk # Date 2018-08-18 07:01:31 # Node ID ec6d5a9d1631701f64c735861bd4de318221510d # Parent eaa14dff32265d4c6fdc21eb18c955f3a8daf017 index: don't include nullid in boundary check in pure code Yet another change that should probably have been part of a3dacabd476b (index: don't allow index[len(index)] to mean nullid, 2018-07-20). Differential Revision: https://phab.mercurial-scm.org/D4333 diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py --- a/mercurial/pure/parsers.py +++ b/mercurial/pure/parsers.py @@ -47,7 +47,7 @@ class BaseIndexObject(object): def _fix_index(self, i): if not isinstance(i, int): raise TypeError("expecting int indexes") - if i < 0 or i >= len(self) + 1: + if i < 0 or i >= len(self): raise IndexError return i