Mercurial > hg
changeset 28760:cef86c3c82d2
hghave: use checkvers for bzr114
author | timeless <timeless@mozdev.org> |
---|---|
date | Fri, 01 Apr 2016 13:19:29 +0000 |
parents | 2348ca49aaee |
children | be13a0fb84e8 |
files | tests/hghave.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/hghave.py Fri Apr 01 13:04:41 2016 +0000 +++ b/tests/hghave.py Fri Apr 01 13:19:29 2016 +0000 @@ -114,12 +114,13 @@ except ImportError: return False -@check("bzr114", "Canonical's Bazaar client >= 1.14") -def has_bzr114(): +@checkvers("bzr", "Canonical's Bazaar client >= %s", (1.14,)) +def has_bzr_range(v): + major, minor = v.split('.')[0:2] try: import bzrlib return (bzrlib.__doc__ is not None - and bzrlib.version_info[:2] >= (1, 14)) + and bzrlib.version_info[:2] >= (int(major), int(minor))) except ImportError: return False