[Updated] D11473: util: eliminate the possibility of returning None from `versiontuple()`

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Wed Sep 22 07:57:29 UTC 2021


Closed by commit rHG376d08ae904f: util: eliminate the possibility of returning None from `versiontuple()` (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11473?vs=30347&id=30365

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11473/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D11473

AFFECTED FILES
  mercurial/util.py

CHANGE DETAILS

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -1225,6 +1225,8 @@
     if n == 4:
         return (vints[0], vints[1], vints[2], extra)
 
+    raise error.ProgrammingError(b"invalid version part request: %d" % n)
+
 
 def cachefunc(func):
     '''cache the result of function calls'''



To: mharbison72, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210922/ad445d90/attachment-0002.html>


More information about the Mercurial-patches mailing list