[PATCH 12 of 18 "] revlog: add some documentation to the `checksize` method
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Wed Mar 6 11:29:28 EST 2019
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1551877647 -3600
# Wed Mar 06 14:07:27 2019 +0100
# Node ID 2b4470cd927234cd028051e8ddee77dee82dccec
# Parent a09dc0dcd48c837b278e3603d05fd1036222cff9
# EXP-Topic verify
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 2b4470cd9272
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 --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -2272,6 +2272,14 @@ class revlog(object):
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))
More information about the Mercurial-devel
mailing list