comparison mercurial/revlog.py @ 41877:3f3f962457b2

revlog: add some documentation to the `checksize` method I had to look at it, so I figured I would leave some documentation for the next person seeking information.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 06 Mar 2019 14:07:27 +0100
parents afd37ed731f1
children 1fac9b931d46
comparison
equal deleted inserted replaced
41876:9e737ca539f6 41877:3f3f962457b2
2270 2270
2271 del self.index[rev:-1] 2271 del self.index[rev:-1]
2272 self._nodepos = None 2272 self._nodepos = None
2273 2273
2274 def checksize(self): 2274 def checksize(self):
2275 """Check size of index and data files
2276
2277 return a (dd, di) tuple.
2278 - dd: extra bytes for the "data" file
2279 - di: extra bytes for the "index" file
2280
2281 A healthy revlog will return (0, 0).
2282 """
2275 expected = 0 2283 expected = 0
2276 if len(self): 2284 if len(self):
2277 expected = max(0, self.end(len(self) - 1)) 2285 expected = max(0, self.end(len(self) - 1))
2278 2286
2279 try: 2287 try: