hgext/bookmarks.py
branchstable
changeset 12881 161fe4879bfc
parent 12851 765c98f068d3
child 13031 3da456d0c885
child 13103 6e79a3bb8c79
equal deleted inserted replaced
12880:b70b5f3e33e2 12881:161fe4879bfc
   539 
   539 
   540 def bmrevset(repo, subset, x):
   540 def bmrevset(repo, subset, x):
   541     """``bookmark([name])``
   541     """``bookmark([name])``
   542     The named bookmark or all bookmarks.
   542     The named bookmark or all bookmarks.
   543     """
   543     """
       
   544     # i18n: "bookmark" is a keyword
   544     args = revset.getargs(x, 0, 1, _('bookmark takes one or no arguments'))
   545     args = revset.getargs(x, 0, 1, _('bookmark takes one or no arguments'))
   545     if args:
   546     if args:
   546         bm = revset.getstring(args[0],
   547         bm = revset.getstring(args[0],
       
   548                               # i18n: "bookmark" is a keyword
   547                               _('the argument to bookmark must be a string'))
   549                               _('the argument to bookmark must be a string'))
   548         bmrev = listbookmarks(repo).get(bm, None)
   550         bmrev = listbookmarks(repo).get(bm, None)
   549         if bmrev:
   551         if bmrev:
   550             bmrev = repo.changelog.rev(bin(bmrev))
   552             bmrev = repo.changelog.rev(bin(bmrev))
   551         return [r for r in subset if r == bmrev]
   553         return [r for r in subset if r == bmrev]