revlog.size() fix handling of rev == -1
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Sun, 29 Oct 2006 14:41:14 +0100
changeset 3582 9fb7d3a05882
parent 3581 be61bd32046c
child 3583 8ee579885d23
revlog.size() fix handling of rev == -1
mercurial/revlog.py
--- a/mercurial/revlog.py	Sun Oct 29 14:18:55 2006 +0100
+++ b/mercurial/revlog.py	Sun Oct 29 14:41:14 2006 +0100
@@ -500,6 +500,8 @@
 
     def size(self, rev):
         """return the length of the uncompressed text for a given revision"""
+        if rev == nullrev:
+            return 0
         l = -1
         if self.version != REVLOGV0:
             l = self.index[rev][2]