aboutsummaryrefslogtreecommitdiffstats
path: root/libbe
diff options
context:
space:
mode:
authorW. Trevor King <wking@tremily.us>2012-10-27 11:38:20 -0400
committerW. Trevor King <wking@tremily.us>2012-10-27 11:43:19 -0400
commit29d5f3b11cad51fa4b4ffa20cdfc0681d11a0d23 (patch)
tree1f88cb066e75d84dc0e083995054c4a7aaac14c2 /libbe
parenteb241d26b14a29942094156072f80f109af3421a (diff)
downloadbugseverywhere-29d5f3b11cad51fa4b4ffa20cdfc0681d11a0d23.tar.gz
storage:vcs:git: don't accept pygit2 version 0.17.3.
My Repository.revparse_single() series was merged into pygit2 with: Merge: 3e9daa4 0238fb7 Author: J. David Ibáñez <jdavid.ibp@gmail.com> Date: Tue Sep 25 15:10:55 2012 +0200 Merge remote-tracking branch 'wking/revparse' But this happened after the 0.17.3 release. The next pygit2 release should contain the .revparse_single() code. The getattr() hackery works because versions of pygit2 before 0.17.3 lacked a __version__ attribute.
Diffstat (limited to 'libbe')
-rw-r--r--libbe/storage/vcs/git.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbe/storage/vcs/git.py b/libbe/storage/vcs/git.py
index 7cf4652..acdce15 100644
--- a/libbe/storage/vcs/git.py
+++ b/libbe/storage/vcs/git.py
@@ -36,10 +36,10 @@ except ImportError, error:
_pygit2 = None
_pygit2_import_error = error
else:
- if not hasattr(_pygit2, '__version__'):
+ if getattr(_pygit2, '__version__', '0.17.3') == '0.17.3':
_pygit2 = None
_pygit2_import_error = NotImplementedError(
- 'pygit2 <= 0.17.2 not supported')
+ 'pygit2 <= 0.17.3 not supported')
import libbe
from ...ui.util import user as _user