From 2f9a035003014be583b756906b4f9fabaa795648 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 5 Nov 2009 14:44:29 +0100 Subject: [PATCH] templater: put 'ago' inside the age template filter --- mercurial/templatefilters.py | 2 +- templates/gitweb/changelogentry.tmpl | 2 +- templates/gitweb/changeset.tmpl | 2 +- templates/gitweb/fileannotate.tmpl | 2 +- templates/gitweb/filerevision.tmpl | 2 +- templates/gitweb/map | 10 +++++----- templates/monoblue/changelogentry.tmpl | 2 +- templates/monoblue/changeset.tmpl | 2 +- templates/monoblue/fileannotate.tmpl | 2 +- templates/monoblue/filerevision.tmpl | 2 +- templates/monoblue/map | 10 +++++----- templates/paper/changeset.tmpl | 2 +- templates/paper/fileannotate.tmpl | 2 +- templates/paper/filediff.tmpl | 2 +- templates/paper/filerevision.tmpl | 2 +- templates/paper/map | 2 +- templates/spartan/changelogentry.tmpl | 2 +- templates/spartan/changeset.tmpl | 2 +- templates/spartan/fileannotate.tmpl | 2 +- templates/spartan/filelogentry.tmpl | 2 +- templates/spartan/filerevision.tmpl | 2 +- templates/static/style-paper.css | 2 +- tests/test-hgweb-commands.out | 8 ++++---- tests/test-hgweb-filelog.out | 12 ++++++------ 24 files changed, 40 insertions(+), 40 deletions(-) diff --git a/mercurial/templatefilters.py b/mercurial/templatefilters.py index 7d60209462..454c5836de 100644 --- a/mercurial/templatefilters.py +++ b/mercurial/templatefilters.py @@ -43,7 +43,7 @@ def age(date): for t, s in agescales: n = delta // s if n >= 2 or s == 1: - return fmt(t, n) + return '%s ago' % fmt(t, n) para_re = None space_re = None diff --git a/templates/gitweb/changelogentry.tmpl b/templates/gitweb/changelogentry.tmpl index 2a7c3cb253..bb11704530 100644 --- a/templates/gitweb/changelogentry.tmpl +++ b/templates/gitweb/changelogentry.tmpl @@ -1,5 +1,5 @@
-{date|age} ago{desc|strip|firstline|escape|nonempty} {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag} +{date|age}{desc|strip|firstline|escape|nonempty} {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}