testing: implement hghave checks for Mercurial 4.0+ and 4.1+ (
bug 1333616); r?glob
This is in preparation of upgrading to 4.1.
MozReview-Commit-ID: LnWEJkp05Qj
--- a/testing/hghave.py
+++ b/testing/hghave.py
@@ -113,16 +113,26 @@ def has_38_plus():
v = tuple(hgversion()[0:2])
return v >= (3, 8)
@check('hg39+', 'Running with Mercurial 3.9+')
def has_39_plus():
v = tuple(hgversion()[0:2])
return v >= (3, 9)
+@check('hg40+', 'Running with Mercurial 4.0+')
+def has_40_plus():
+ v = tuple(hgversion()[0:2])
+ return v >= (4, 0)
+
+@check('hg41+', 'Running with Mercurial 4.1+')
+def has_41_plus():
+ v = tuple(hgversion()[0:2])
+ return v >= (4, 1)
+
# Now we reimplement the command line syntax of the CLI hghave script.
failures = 0
def error(msg):
global failures
sys.stderr.write('%s\n' % msg)
failures += 1