##// END OF EJS Templates
hghave: use strings instead of floats for version numbers passed to checkvers...
Manuel Jacob -
r52266:7d313b25 default
parent child Browse files
Show More
@@ -67,7 +67,7 b' def checkvers(name, desc, vers):'
67 67 return f
68 68
69 69 for v in vers:
70 v = str(v)
70 assert isinstance(v, str)
71 71 f = funcv(v)
72 72 checks['%s%s' % (name, v.replace('.', ''))] = (f, desc % v)
73 73 return func
@@ -355,7 +355,9 b' def gethgversion():'
355 355 return _hgversion
356 356
357 357
358 @checkvers("hg", "Mercurial >= %s", [(1.0 * x) / 10 for x in range(9, 99)])
358 @checkvers(
359 "hg", "Mercurial >= %s", ['%d.%d' % divmod(x, 10) for x in range(9, 99)]
360 )
359 361 def has_hg_range(v):
360 362 major, minor = v.split('.')[0:2]
361 363 return gethgversion() >= (int(major), int(minor))
@@ -433,7 +435,7 b' def has_lfsserver():'
433 435 )
434 436
435 437
436 @checkvers("git", "git client (with ext::sh support) version >= %s", (1.9,))
438 @checkvers("git", "git client (with ext::sh support) version >= %s", ('1.9',))
437 439 def has_git_range(v):
438 440 major, minor = v.split('.')[0:2]
439 441 return getgitversion() >= (int(major), int(minor))
@@ -457,7 +459,7 b' def getsvnversion():'
457 459 return (int(m.group(1)), int(m.group(2)))
458 460
459 461
460 @checkvers("svn", "subversion client and admin tools >= %s", (1.3, 1.5))
462 @checkvers("svn", "subversion client and admin tools >= %s", ('1.3', '1.5'))
461 463 def has_svn_range(v):
462 464 major, minor = v.split('.')[0:2]
463 465 return getsvnversion() >= (int(major), int(minor))
@@ -660,7 +662,7 b' def getpygmentsversion():'
660 662 return (0, 0)
661 663
662 664
663 @checkvers("pygments", "Pygments version >= %s", (2.5, 2.11, 2.14))
665 @checkvers("pygments", "Pygments version >= %s", ('2.5', '2.11', '2.14'))
664 666 def has_pygments_range(v):
665 667 major, minor = v.split('.')[0:2]
666 668 return getpygmentsversion() >= (int(major), int(minor))
@@ -866,7 +868,7 b' def has_demandimport():'
866 868
867 869 # Add "py36", "py37", ... as possible feature checks. Note that there's no
868 870 # punctuation here.
869 @checkvers("py", "Python >= %s", (3.6, 3.7, 3.8, 3.9, 3.10, 3.11))
871 @checkvers("py", "Python >= %s", ('3.6', '3.7', '3.8', '3.9', '3.10', '3.11'))
870 872 def has_python_range(v):
871 873 major, minor = v.split('.')[0:2]
872 874 py_major, py_minor = sys.version_info.major, sys.version_info.minor
General Comments 0
You need to be logged in to leave comments. Login now