# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-05-19 13:29:21 # Node ID a4942675de6bd3565060c6977552d5281e067f02 # Parent f0fadc5bea21b2514de37469a3077d0acb34e506 py3: check for None before comparing with integers Comparing None and integers on Python 3 is not allowed and raise error. Differential Revision: https://phab.mercurial-scm.org/D3614 diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -846,7 +846,7 @@ class revlog(object): def rawsize(self, rev): """return the length of the uncompressed text for a given revision""" l = self.index[rev][2] - if l >= 0: + if l is not None and l >= 0: return l t = self.revision(rev, raw=True)