tests: check for bzr support by importing bzrlib
This is better than starting bzr --version, because it works correctly when
running tests with a non-default Python (version).
--- a/tests/hghave Thu Oct 02 15:48:57 2008 +0200
+++ b/tests/hghave Thu Oct 02 16:22:02 2008 +0200
@@ -25,7 +25,11 @@
return matchoutput('baz --version 2>&1', r'baz Bazaar version')
def has_bzr():
- return matchoutput('bzr --version 2>&1', r'Bazaar \(bzr\)')
+ try:
+ import bzrlib
+ return True
+ except ImportError:
+ return False
def has_cvs():
re = r'Concurrent Versions System.*?server'