hgext/bookmarks.py
changeset 10820 da809085bc9f
parent 10597 153d688cdd06
child 10826 717c35d55fb3
equal deleted inserted replaced
10819:36c6a667d733 10820:da809085bc9f
   150             ui.status(_("no bookmarks set\n"))
   150             ui.status(_("no bookmarks set\n"))
   151         else:
   151         else:
   152             for bmark, n in marks.iteritems():
   152             for bmark, n in marks.iteritems():
   153                 if ui.configbool('bookmarks', 'track.current'):
   153                 if ui.configbool('bookmarks', 'track.current'):
   154                     current = repo._bookmarkcurrent
   154                     current = repo._bookmarkcurrent
   155                     prefix = (bmark == current and n == cur) and '*' or ' '
   155                     if bmark == current and n == cur:
       
   156                         prefix, label = '*', 'bookmarks.current'
       
   157                     else:
       
   158                         prefix, label = ' ', ''
   156                 else:
   159                 else:
   157                     prefix = (n == cur) and '*' or ' '
   160                     if n == cur:
       
   161                         prefix, label = '*', 'bookmarks.current'
       
   162                     else:
       
   163                         prefix, label = ' ', ''
   158 
   164 
   159                 if ui.quiet:
   165                 if ui.quiet:
   160                     ui.write("%s\n" % bmark)
   166                     ui.write("%s\n" % bmark, label=label)
   161                 else:
   167                 else:
   162                     ui.write(" %s %-25s %d:%s\n" % (
   168                     ui.write(" %s %-25s %d:%s\n" % (
   163                         prefix, bmark, repo.changelog.rev(n), hexfn(n)))
   169                         prefix, bmark, repo.changelog.rev(n), hexfn(n)),
       
   170                         label=label)
   164         return
   171         return
   165 
   172 
   166 def _revstostrip(changelog, node):
   173 def _revstostrip(changelog, node):
   167     srev = changelog.rev(node)
   174     srev = changelog.rev(node)
   168     tostrip = [srev]
   175     tostrip = [srev]