Mercurial > hg
diff tests/hghave @ 7061:8b874f8cd29f
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).
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Thu, 02 Oct 2008 16:22:02 +0200 |
parents | 209ef5f3534c |
children | 408cf9eb9e5d |
line wrap: on
line diff
--- 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'