510 raise error.ParseError(_("label expects two arguments")) |
510 raise error.ParseError(_("label expects two arguments")) |
511 |
511 |
512 # ignore args[0] (the label string) since this is supposed to be a a no-op |
512 # ignore args[0] (the label string) since this is supposed to be a a no-op |
513 yield args[1][0](context, mapping, args[1][1]) |
513 yield args[1][0](context, mapping, args[1][1]) |
514 |
514 |
|
515 def latesttag(context, mapping, args): |
|
516 """:latesttag([pattern]): The global tags matching the given pattern on the |
|
517 most recent globally tagged ancestor of this changeset.""" |
|
518 if len(args) > 1: |
|
519 # i18n: "latesttag" is a keyword |
|
520 raise error.ParseError(_("latesttag expects at most one argument")) |
|
521 |
|
522 pattern = None |
|
523 if len(args) == 1: |
|
524 pattern = stringify(args[0][0](context, mapping, args[0][1])) |
|
525 |
|
526 return templatekw.showlatesttags(pattern, **mapping) |
|
527 |
515 def localdate(context, mapping, args): |
528 def localdate(context, mapping, args): |
516 """:localdate(date[, tz]): Converts a date to the specified timezone. |
529 """:localdate(date[, tz]): Converts a date to the specified timezone. |
517 The default is local date.""" |
530 The default is local date.""" |
518 if not (1 <= len(args) <= 2): |
531 if not (1 <= len(args) <= 2): |
519 # i18n: "localdate" is a keyword |
532 # i18n: "localdate" is a keyword |