changeset 3582:9fb7d3a05882

revlog.size() fix handling of rev == -1
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 29 Oct 2006 14:41:14 +0100
parents be61bd32046c
children 8ee579885d23
files mercurial/revlog.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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]