Show More
@@ -912,7 +912,8 b' class revlog(object):' | |||||
912 |
|
912 | |||
913 | # check rev flags |
|
913 | # check rev flags | |
914 | if self.index[rev][0] & 0xFFFF: |
|
914 | if self.index[rev][0] & 0xFFFF: | |
915 |
raise RevlogError(_('incompatible revision flag %x') % |
|
915 | raise RevlogError(_('incompatible revision flag %x') % | |
|
916 | (self.index[rev][0] & 0xFFFF)) | |||
916 |
|
917 | |||
917 | if self._inline: |
|
918 | if self._inline: | |
918 | # we probably have the whole chunk cached |
|
919 | # we probably have the whole chunk cached | |
@@ -1236,7 +1237,7 b' class revlog(object):' | |||||
1236 | def checksize(self): |
|
1237 | def checksize(self): | |
1237 | expected = 0 |
|
1238 | expected = 0 | |
1238 | if self.count(): |
|
1239 | if self.count(): | |
1239 | expected = self.end(self.count() - 1) |
|
1240 | expected = max(0, self.end(self.count() - 1)) | |
1240 |
|
1241 | |||
1241 | try: |
|
1242 | try: | |
1242 | f = self.opener(self.datafile) |
|
1243 | f = self.opener(self.datafile) | |
@@ -1253,12 +1254,12 b' class revlog(object):' | |||||
1253 | f.seek(0, 2) |
|
1254 | f.seek(0, 2) | |
1254 | actual = f.tell() |
|
1255 | actual = f.tell() | |
1255 | s = self._io.size |
|
1256 | s = self._io.size | |
1256 | i = actual / s |
|
1257 | i = max(0, actual / s) | |
1257 | di = actual - (i * s) |
|
1258 | di = actual - (i * s) | |
1258 | if self._inline: |
|
1259 | if self._inline: | |
1259 | databytes = 0 |
|
1260 | databytes = 0 | |
1260 | for r in xrange(self.count()): |
|
1261 | for r in xrange(self.count()): | |
1261 | databytes += self.length(r) |
|
1262 | databytes += max(0, self.length(r)) | |
1262 | dd = 0 |
|
1263 | dd = 0 | |
1263 | di = actual - self.count() * s - databytes |
|
1264 | di = actual - self.count() * s - databytes | |
1264 | except IOError, inst: |
|
1265 | except IOError, inst: |
General Comments 0
You need to be logged in to leave comments.
Login now