From patchwork Wed Mar 6 16:29:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [08,of,18,"] verify: explicitly return 0 if no error are encountered From: Pierre-Yves David X-Patchwork-Id: 39102 Message-Id: <33e3e6c86203f9ddecff.1551889764@nodosa.octopoid.net> To: mercurial-devel@mercurial-scm.org Date: Wed, 06 Mar 2019 17:29:24 +0100 # HG changeset patch # User Pierre-Yves David # Date 1551868734 -3600 # Wed Mar 06 11:38:54 2019 +0100 # Node ID 33e3e6c86203f9ddecff5843b51bd6b43b5883ec # Parent feeaebe5aa639ce0d8df7e42ea2540046565aee5 # EXP-Topic verify # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 33e3e6c86203 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. diff --git a/mercurial/verify.py b/mercurial/verify.py --- a/mercurial/verify.py +++ b/mercurial/verify.py @@ -134,7 +134,7 @@ class verifier(object): 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 @@ class verifier(object): ui.warn(_("(first damaged changeset appears to be %d)\n") % min(self.badrevs)) return 1 + return 0 def _verifychangelog(self): ui = self.ui