Permalink
Browse files

git_handler: add bookmark compatibility with new bmstore (issue #60)

Prior to this fix, tests against the latest hg codebase would fail with:
creating bookmarks failed, do you have bookmarks enabled?
  • Loading branch information...
1 parent c797923 commit 90904fffd50fa95cd9c0f4f9210a2e800b08a50d @davidmc24 davidmc24 committed Nov 22, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 hggit/git_handler.py
View
@@ -1044,7 +1044,10 @@ def update_hg_bookmarks(self, refs):
bookmarks.write(self.repo, bms)
else:
self.repo._bookmarks = bms
- bookmarks.write(self.repo)
+ if getattr(bms, 'write', None): # hg >= 2.5
+ bms.write()
+ else: # hg < 2.5
+ bookmarks.write(self.repo)
except AttributeError:
self.ui.warn(_('creating bookmarks failed, do you have'

0 comments on commit 90904ff

Please sign in to comment.