From patchwork Wed Mar 6 16:29:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [13,of,18,"] verify: document the `checklog` method From: Pierre-Yves David X-Patchwork-Id: 39098 Message-Id: <4390cbb4a01be93907ec.1551889769@nodosa.octopoid.net> To: mercurial-devel@mercurial-scm.org Date: Wed, 06 Mar 2019 17:29:29 +0100 # HG changeset patch # User Pierre-Yves David # Date 1551877823 -3600 # Wed Mar 06 14:10:23 2019 +0100 # Node ID 4390cbb4a01be93907ec49c5dce2599fe5a272df # Parent 2b4470cd927234cd028051e8ddee77dee82dccec # EXP-Topic verify # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 4390cbb4a01b verify: document the `checklog` method Let us add details about what the function is expected to do. diff --git a/mercurial/verify.py b/mercurial/verify.py --- a/mercurial/verify.py +++ b/mercurial/verify.py @@ -77,6 +77,13 @@ class verifier(object): self._err(linkrev, "%s: %s" % (msg, fmsg), filename) def checklog(self, obj, name, linkrev): + """verify high level property of a revlog + + - revlog is present, + - revlog is non-empty, + - sizes (index and data) are correct, + - revlog's format version is correct. + """ if not len(obj) and (self.havecl or self.havemf): self._err(linkrev, _("empty or missing %s") % name) return