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 @@ 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