changeset 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 9e737ca539f6
children 08d977451f26
files mercurial/revlog.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
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))