Mercurial > public > mercurial-scm > hg
diff mercurial/extensions.py @ 40463:cfa564037789
extensions: include current version in "invalid version" message
It is "not so rare" for the mercurial version to be badly detected at build
time. In such case, version check for extensions gets confused.
To help pinpoint the error, we now include the Mercurial's version number in
the error message.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 20 Apr 2018 18:08:54 +0200 |
parents | 09a37a5d8f5d |
children | c93d046d4300 |
line wrap: on
line diff
--- a/mercurial/extensions.py Fri Oct 19 01:07:08 2018 +0200 +++ b/mercurial/extensions.py Fri Apr 20 18:08:54 2018 +0200 @@ -189,8 +189,9 @@ # of Mercurial. minver = getattr(mod, 'minimumhgversion', None) if minver and util.versiontuple(minver, 2) > util.versiontuple(n=2): - ui.warn(_('(third party extension %s requires version %s or newer ' - 'of Mercurial; disabling)\n') % (shortname, minver)) + msg = _('(third party extension %s requires version %s or newer ' + 'of Mercurial (current: %s); disabling)\n') + ui.warn(msg % (shortname, minver, util.version())) return log(' - validating extension tables: %s\n', shortname) _validatetables(ui, mod)