changeset 28759:2348ca49aaee

hghave: replace has_svn13/has_svn15 with checkvers This would make it possible to easily add a svn14 or svn16 or...
author timeless <timeless@mozdev.org>
date Fri, 01 Apr 2016 13:04:41 +0000
parents 44e076a12bd3
children cef86c3c82d2
files tests/hghave.py
diffstat 1 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/tests/hghave.py	Fri Apr 01 13:04:16 2016 +0000
+++ b/tests/hghave.py	Fri Apr 01 13:04:41 2016 +0000
@@ -248,13 +248,10 @@
         return (0, 0)
     return (int(m.group(1)), int(m.group(2)))
 
-@check("svn15", "subversion client and admin tools >= 1.5")
-def has_svn15():
-    return getsvnversion() >= (1, 5)
-
-@check("svn13", "subversion client and admin tools >= 1.3")
-def has_svn13():
-    return getsvnversion() >= (1, 3)
+@checkvers("svn", "subversion client and admin tools >= %s", (1.3, 1.5))
+def has_svn_range(v):
+    major, minor = v.split('.')[0:2]
+    return getsvnversion() >= (int(major), int(minor))
 
 @check("svn", "subversion client and admin tools")
 def has_svn():