Skip to content

Commit

Permalink
configwizard: normalize hg version; r=sheehan
Browse files Browse the repository at this point in the history
Otherwise our tuple compares with (X, Y, None) and (X, Y, 0) fail.

Differential Revision: https://phabricator.services.mozilla.com/D11512

--HG--
extra : moz-landing-system : lando
  • Loading branch information
indygreg committed Nov 9, 2018
1 parent e198c2b commit 7138a79
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hgext/configwizard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,11 @@ def configwizard(ui, repo, statedir=None, **opts):

hgversion = util.versiontuple(n=3)

# The point release version can be None for e.g. X.Y versions. Normalize
# to make tuple compares work.
if hgversion[2] is None:
hgversion = (hgversion[0], hgversion[1], 0)

if hgversion < MINIMUM_SUPPORTED_VERSION:
ui.warn(VERSION_TOO_OLD % (
hgversion[0], hgversion[1],
Expand Down

0 comments on commit 7138a79

Please sign in to comment.