Mercurial > public > mercurial-scm > hg
diff mercurial/extensions.py @ 48016:5caec48d9a01
extensions: prevent a crash on py3 with a `minimumhgversion` str value
The expectation is that this field is bytes, but unported extensions are a thing
and it shouldn't explode on a bad value. We already do this transformation in
the version reporting mechanism.
Differential Revision: https://phab.mercurial-scm.org/D11476
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 20 Sep 2021 14:21:18 -0400 |
parents | a9bedc56f025 |
children | c6d44457f7e3 |
line wrap: on
line diff
--- a/mercurial/extensions.py Mon Sep 20 14:16:10 2021 -0400 +++ b/mercurial/extensions.py Mon Sep 20 14:21:18 2021 -0400 @@ -224,7 +224,7 @@ minver = getattr(mod, 'minimumhgversion', None) if minver: curver = util.versiontuple(n=2) - extmin = util.versiontuple(minver, 2) + extmin = util.versiontuple(stringutil.forcebytestr(minver), 2) if None in extmin: extmin = (extmin[0] or 0, extmin[1] or 0)