Commits

David Carr committed 96e75ca

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?

Comments (0)

Files changed (1)

                     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'