hghave: replace has_svn13/has_svn15 with checkvers

This would make it possible to easily add a svn14 or svn16 or...
This commit is contained in:
timeless 2016-04-01 13:04:41 +00:00
parent 048ac3436b
commit 620c0a80fe

View File

@ -248,13 +248,10 @@ def getsvnversion():
return (0, 0) return (0, 0)
return (int(m.group(1)), int(m.group(2))) return (int(m.group(1)), int(m.group(2)))
@check("svn15", "subversion client and admin tools >= 1.5") @checkvers("svn", "subversion client and admin tools >= %s", (1.3, 1.5))
def has_svn15(): def has_svn_range(v):
return getsvnversion() >= (1, 5) major, minor = v.split('.')[0:2]
return getsvnversion() >= (int(major), int(minor))
@check("svn13", "subversion client and admin tools >= 1.3")
def has_svn13():
return getsvnversion() >= (1, 3)
@check("svn", "subversion client and admin tools") @check("svn", "subversion client and admin tools")
def has_svn(): def has_svn():