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