Mercurial > hg-stable
changeset 1912:b288b4bb8448
hide some functions behind lambdas, so demandload is useful.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Tue, 28 Feb 2006 07:24:54 -0800 |
parents | c6014ff742c5 |
children | 74cf2b2f43d4 |
files | mercurial/templater.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/templater.py Mon Feb 27 21:37:57 2006 -0800 +++ b/mercurial/templater.py Tue Feb 28 07:24:54 2006 -0800 @@ -213,16 +213,16 @@ "date": lambda x: util.datestr(x), "domain": domain, "escape": lambda x: cgi.escape(x, True), - "firstline": (lambda x: x.splitlines(1)[0]), + "firstline": lambda x: x.splitlines(1)[0].rstrip('\r\n'), "isodate": isodate, "obfuscate": obfuscate, - "permissions": (lambda x: x and "-rwxr-xr-x" or "-rw-r--r--"), + "permissions": lambda x: x and "-rwxr-xr-x" or "-rw-r--r--", "person": person, "rfc822date": lambda x: util.datestr(x, "%a, %d %b %Y %H:%M:%S"), - "short": (lambda x: x[:12]), + "short": lambda x: x[:12], "strip": lambda x: x.strip(), - "urlescape": urllib.quote, - "user": util.shortuser, + "urlescape": lambda x: urllib.quote(x), + "user": lambda x: util.shortuser(x), } def templatepath(name=None):