testing: implement hghave checks for Mercurial 4.0+ and 4.1+ (bug 1333616); r?glob draft
authorGregory Szorc <gps@mozilla.com>
Fri, 31 Mar 2017 16:01:48 -0700
changeset 10630 934b7c31da137a1de83bced31a0dbfcc8b71cf8f
parent 10629 224ed8d7c4a8fb0c1dc66023222283d60cf7e987
child 10631 194192d0392968cf0339af9f716af64c77a4fe39
push id1600
push userbmo:gps@mozilla.com
push dateMon, 03 Apr 2017 23:38:00 +0000
reviewersglob
bugs1333616
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
testing/hghave.py
--- 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