Commits

Steve Borho committed 7bf7897

repomodel: follow behavior of bookmarks command (refs #177)

Even though localrepo._bookmarkcurrent has a value, it is not considered a real
current bookmark unless the bookmarked revision is also the working parent.

Comments (0)

Files changed (1)

tortoisehg/hgqt/repomodel.py

             parts.append(qtlib.applyeffects(u' %s ' % branchu, effects))
 
         for mark in ctx.bookmarks():
+            style = 'log.bookmark'
             if mark == self.repo._bookmarkcurrent:
-                style = 'log.curbookmark'
-            else:
-                style = 'log.bookmark'
+                bn = self.repo._bookmarks[self.repo._bookmarkcurrent]
+                if bn in self.repo.dirstate.parents():
+                    style = 'log.curbookmark'
             marku = hglib.tounicode(mark)
             effects = qtlib.geteffect(style)
             parts.append(qtlib.applyeffects(u' %s ' % marku, effects))