[PATCH 4 of 5 v2] hghave: use checkrange for bzr114
timeless
timeless at mozdev.org
Fri Apr 1 18:25:24 EDT 2016
# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1459516769 0
# Fri Apr 01 13:19:29 2016 +0000
# Node ID 933f28781c43d5504c7dc609126bc513f5553958
# Parent 34bee8cb756c7887935989ea2d2004ddfe1c29cb
hghave: use checkrange for bzr114
diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -110,12 +110,13 @@
except ImportError:
return False
- at check("bzr114", "Canonical's Bazaar client >= 1.14")
-def has_bzr114():
+ at checkrange("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
More information about the Mercurial-devel
mailing list