diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-04-06 00:15:34 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-04-06 00:15:34 +0200 |
commit | 6ed0a15262d26ff262311afb48a79c95bb1ce3bb (patch) | |
tree | c9dd94ec384ed25115106a44a97ef77637b34385 /etckeeper-bzr | |
parent | 5e96f3fad80a1c654d61ca917d9c5154de457570 (diff) |
Test whether required hook is present rather than depending on a specific version of Bazaar.
Diffstat (limited to 'etckeeper-bzr')
-rwxr-xr-x | etckeeper-bzr/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etckeeper-bzr/__init__.py b/etckeeper-bzr/__init__.py index a5381c5..a656dc5 100755 --- a/etckeeper-bzr/__init__.py +++ b/etckeeper-bzr/__init__.py @@ -9,8 +9,8 @@ from bzrlib.errors import BzrError, NotLocalUrl import os import subprocess -if bzrlib.version_info[:2] < (1,4): - raise "Version of Bazaar to old. Need at least 1.4." +if not (hasattr(MutableTree, "hooks") and "start_commit" in MutableTree.hooks): + raise "Version of Bazaar installed does not support required hooks." def etckeeper_startcommit_hook(tree): if not os.path.exists(tree.abspath(".etckeeper")): |