Show More
@@ -224,8 +224,12 b' def load(ui, name, path, loadingtime=Non' | |||
|
224 | 224 | minver = getattr(mod, 'minimumhgversion', None) |
|
225 | 225 | if minver: |
|
226 | 226 | curver = util.versiontuple(n=2) |
|
227 | extmin = util.versiontuple(minver, 2) | |
|
227 | 228 | |
|
228 | if None in curver or util.versiontuple(minver, 2) > curver: | |
|
229 | if None in extmin: | |
|
230 | extmin = (extmin[0] or 0, extmin[1] or 0) | |
|
231 | ||
|
232 | if None in curver or extmin > curver: | |
|
229 | 233 | msg = _( |
|
230 | 234 | b'(third party extension %s requires version %s or newer ' |
|
231 | 235 | b'of Mercurial (current: %s); disabling)\n' |
@@ -1692,6 +1692,25 b' Can load minimum version identical to cu' | |||
|
1692 | 1692 | $ hg --config extensions.minversion=minversion3.py version 2>&1 | egrep '\(third' |
|
1693 | 1693 | [1] |
|
1694 | 1694 | |
|
1695 | Don't explode on py3 with a bad version number | |
|
1696 | ||
|
1697 | $ cat > minversion4.py << EOF | |
|
1698 | > from mercurial import util | |
|
1699 | > util.version = lambda: b'3.5' | |
|
1700 | > minimumhgversion = b'3' | |
|
1701 | > EOF | |
|
1702 | $ hg --config extensions.minversion=minversion4.py version -v | |
|
1703 | Mercurial Distributed SCM (version 3.5) | |
|
1704 | (see https://mercurial-scm.org for more information) | |
|
1705 | ||
|
1706 | Copyright (C) 2005-* Olivia Mackall and others (glob) | |
|
1707 | This is free software; see the source for copying conditions. There is NO | |
|
1708 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
|
1709 | ||
|
1710 | Enabled extensions: | |
|
1711 | ||
|
1712 | minversion external | |
|
1713 | ||
|
1695 | 1714 | Restore HGRCPATH |
|
1696 | 1715 | |
|
1697 | 1716 | $ HGRCPATH=$ORGHGRCPATH |
General Comments 0
You need to be logged in to leave comments.
Login now