changeset 41869:4da2261e949b

verify: add some inline documentation to the top level `verify` method The goal is to clarify each section goal.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 06 Mar 2019 11:43:21 +0100
parents 567892b4306c
children 00c9fde75c1a
files mercurial/verify.py
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/verify.py	Wed Mar 06 11:38:54 2019 +0100
+++ b/mercurial/verify.py	Wed Mar 06 11:43:21 2019 +0100
@@ -135,10 +135,9 @@
         This method run all verifications, displaying issues as they are found.
 
         return 1 if any error have been encountered, 0 otherwise."""
+        # initial validation and generic report
         repo = self.repo
-
         ui = repo.ui
-
         if not repo.url().startswith('file:'):
             raise error.Abort(_("cannot verify bundle or remote repos"))
 
@@ -149,15 +148,14 @@
             ui.status(_("repository uses revlog format %d\n") %
                            (self.revlogv1 and 1 or 0))
 
+        # data verification
         mflinkrevs, filelinkrevs = self._verifychangelog()
-
         filenodes = self._verifymanifest(mflinkrevs)
         del mflinkrevs
-
         self._crosscheckfiles(filelinkrevs, filenodes)
-
         totalfiles, filerevisions = self._verifyfiles(filenodes, filelinkrevs)
 
+        # final report
         ui.status(_("checked %d changesets with %d changes to %d files\n") %
                        (len(repo.changelog), filerevisions, totalfiles))
         if self.warnings: