changeset 387:ed28dd69df61

git_handler: support versions of hg without bookmarks
author Augie Fackler <durin42@gmail.com>
date Sun, 15 May 2011 12:24:25 -0500
parents 525ffe284b0c
children bcc79fa3fe09
files hggit/git_handler.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/git_handler.py
+++ b/hggit/git_handler.py
@@ -110,9 +110,10 @@
             elif not self.paths:
                 # intial cloning
                 self.update_remote_branches('default', refs)
-                
+
                 # "Activate" a tipmost bookmark.
-                bms = self.repo['tip'].bookmarks()
+                bms = getattr(self.repo['tip'], 'bookmarks',
+                              lambda : None)()
                 if bms:
                     bookmarks.setcurrent(self.repo, bms[0])
         else: