547 # i18n: "label" is a keyword |
547 # i18n: "label" is a keyword |
548 raise error.ParseError(_("label expects two arguments")) |
548 raise error.ParseError(_("label expects two arguments")) |
549 |
549 |
550 thing = evalstring(context, mapping, args[1]) |
550 thing = evalstring(context, mapping, args[1]) |
551 |
551 |
552 # apparently, repo could be a string that is the favicon? |
552 ui = mapping.get('ui', '') |
553 repo = mapping.get('repo', '') |
553 if isinstance(ui, str): |
554 if isinstance(repo, str): |
|
555 return thing |
554 return thing |
556 |
555 |
557 # preserve unknown symbol as literal so effects like 'red', 'bold', |
556 # preserve unknown symbol as literal so effects like 'red', 'bold', |
558 # etc. don't need to be quoted |
557 # etc. don't need to be quoted |
559 label = evalstringliteral(context, mapping, args[0]) |
558 label = evalstringliteral(context, mapping, args[0]) |
560 |
559 |
561 return repo.ui.label(thing, label) |
560 return ui.label(thing, label) |
562 |
561 |
563 def latesttag(context, mapping, args): |
562 def latesttag(context, mapping, args): |
564 """:latesttag([pattern]): The global tags matching the given pattern on the |
563 """:latesttag([pattern]): The global tags matching the given pattern on the |
565 most recent globally tagged ancestor of this changeset.""" |
564 most recent globally tagged ancestor of this changeset.""" |
566 if len(args) > 1: |
565 if len(args) > 1: |