diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -772,8 +772,8 @@ changesets. """ attrs = vars(self) - hastoprev = (r'_changeid' in attrs or r'_changectx' in attrs) - if hastoprev: + hasstoprev = (r'_changeid' in attrs or r'_changectx' in attrs) + if hasstoprev: return self._adjustlinkrev(self.rev(), inclusive=True) else: return self.linkrev()