diff --git a/mercurial/templatefilters.py b/mercurial/templatefilters.py
--- a/mercurial/templatefilters.py
+++ b/mercurial/templatefilters.py
@@ -40,6 +40,9 @@ def age(date):
return 'in the future'
delta = max(1, int(now - then))
+ if delta > agescales[0][1] * 2:
+ return util.shortdate(date)
+
for t, s in agescales:
n = delta // s
if n >= 2 or s == 1:
diff --git a/tests/get-with-headers.py b/tests/get-with-headers.py
--- a/tests/get-with-headers.py
+++ b/tests/get-with-headers.py
@@ -22,7 +22,6 @@ for h in headers:
print "%s: %s" % (h, response.getheader(h))
print
data = response.read()
-data = re.sub('\d+ years', 'many years', data)
sys.stdout.write(data)
if 200 <= response.status <= 299:
diff --git a/tests/test-hgweb-commands.out b/tests/test-hgweb-commands.out
--- a/tests/test-hgweb-commands.out
+++ b/tests/test-hgweb-commands.out
@@ -210,17 +210,17 @@ files, or words in the commit messagedescription
- many years ago |
+ 1970-01-01 |
test |
branchstable tip |
- many years ago |
+ 1970-01-01 |
test |
Added tag 1.0 for changeset 2ef0ac749a14default |
- many years ago |
+ 1970-01-01 |
test |
base1.0 |
@@ -291,7 +291,7 @@ files, or words in the commit message
date |
- Thu Jan 01 00:00:00 1970 +0000 (many years ago) |
+ Thu Jan 01 00:00:00 1970 +0000 (1970-01-01) |
parents |
|
@@ -422,7 +422,7 @@ files, or words in the commit message
date |
- Thu Jan 01 00:00:00 1970 +0000 (many years ago) |
+ Thu Jan 01 00:00:00 1970 +0000 (1970-01-01) |
parents |
@@ -523,7 +523,7 @@ branches |
-many years ago |
+1970-01-01 |
1d22e65f027e |
stable |
@@ -533,7 +533,7 @@ branches |
|
-many years ago |
+1970-01-01 |
a4f92ed23982 |
default |
@@ -608,7 +608,7 @@ summary |
-many years ago |
+1970-01-01 |
test |
@@ -622,7 +622,7 @@ summary |
|
-many years ago |
+1970-01-01 |
test |
@@ -636,7 +636,7 @@ summary |
|
-many years ago |
+1970-01-01 |
test |
@@ -656,7 +656,7 @@ summary |
-many years ago |
+1970-01-01 |
1.0 |
changeset |
@@ -671,7 +671,7 @@ summary |
-many years ago |
+1970-01-01 |
1d22e65f027e |
stable |
@@ -681,7 +681,7 @@ summary |
|
-many years ago |
+1970-01-01 |
a4f92ed23982 |
default |
@@ -764,7 +764,7 @@ graph |
| | | |