# HG changeset patch # User Pierre-Yves David # Date 1551877647 -3600 # Node ID 3f3f962457b20f9570e0b676a83ccc984ed27125 # Parent 9e737ca539f6878a14d5b10a78eb8abf1574bbf2 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. diff -r 9e737ca539f6 -r 3f3f962457b2 mercurial/revlog.py --- a/mercurial/revlog.py Wed Mar 06 12:20:50 2019 +0100 +++ b/mercurial/revlog.py Wed Mar 06 14:07:27 2019 +0100 @@ -2272,6 +2272,14 @@ self._nodepos = None def checksize(self): + """Check size of index and data files + + return a (dd, di) tuple. + - dd: extra bytes for the "data" file + - di: extra bytes for the "index" file + + A healthy revlog will return (0, 0). + """ expected = 0 if len(self): expected = max(0, self.end(len(self) - 1))