Mercurial > hg-stable
diff 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 |
line wrap: on
line diff
--- 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))