Mercurial > hg-stable
diff mercurial/templater.py @ 26106:c568c4db036f
templatefilters: remove redundant 'date' and 'strip' filters
These filters are defined as 'date()' and 'strip()' functions. Help messages
are moved to the corresponding functions.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 04 Jul 2015 16:07:42 +0900 |
parents | d67341f55429 |
children | 604a7c941103 |
line wrap: on
line diff
--- a/mercurial/templater.py Sat Jul 04 16:03:36 2015 +0900 +++ b/mercurial/templater.py Sat Jul 04 16:07:42 2015 +0900 @@ -313,7 +313,8 @@ def date(context, mapping, args): """:date(date[, fmt]): Format a date. See :hg:`help dates` for formatting - strings.""" + strings. The default is a Unix date format, including the timezone: + "Mon Sep 04 15:13:13 2006 0700".""" if not (1 <= len(args) <= 2): # i18n: "date" is a keyword raise error.ParseError(_("date expects one or two arguments")) @@ -604,7 +605,8 @@ return shortest def strip(context, mapping, args): - """:strip(text[, chars]): Strip characters from a string.""" + """:strip(text[, chars]): Strip characters from a string. By default, + strips all leading and trailing whitespace.""" if not (1 <= len(args) <= 2): # i18n: "strip" is a keyword raise error.ParseError(_("strip expects one or two arguments"))