changeset 41868:567892b4306c

verify: explicitly return 0 if no error are encountered Relying on the fact None is treated as 0 by other logics seems smarter than we should be.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 06 Mar 2019 11:38:54 +0100
parents e8c4a9f5b986
children 4da2261e949b
files mercurial/verify.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/verify.py	Wed Mar 06 11:35:34 2019 +0100
+++ b/mercurial/verify.py	Wed Mar 06 11:38:54 2019 +0100
@@ -134,7 +134,7 @@
 
         This method run all verifications, displaying issues as they are found.
 
-        return 1 if any error have been encountered"""
+        return 1 if any error have been encountered, 0 otherwise."""
         repo = self.repo
 
         ui = repo.ui
@@ -171,6 +171,7 @@
                 ui.warn(_("(first damaged changeset appears to be %d)\n")
                         % min(self.badrevs))
             return 1
+        return 0
 
     def _verifychangelog(self):
         ui = self.ui