changeset 38123:a4942675de6b

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
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 19 May 2018 18:59:21 +0530
parents f0fadc5bea21
children 42476b8b738b
files mercurial/revlog.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Sat May 19 18:58:35 2018 +0530
+++ b/mercurial/revlog.py	Sat May 19 18:59:21 2018 +0530
@@ -846,7 +846,7 @@
     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)