diff --git a/mercurial/linelog.py b/mercurial/linelog.py --- a/mercurial/linelog.py +++ b/mercurial/linelog.py @@ -296,6 +296,7 @@ else: ar = self.annotate(rev) # ar = self.annotate(self._maxrev) + programlen = self._program.__len__ if a1 > len(ar.lines): raise LineLogError( '%d contains %d lines, tried to access line %d' % ( @@ -308,7 +309,7 @@ else: a1info = ar.lines[a1] a1inst = self._program[a1info._offset] - oldproglen = len(self._program) + oldproglen = programlen() appendinst = self._program.append # insert