changeset 25005:5ddbb024c2e9

tests: fix hidden repeatability problem with age filter test This test was corrupting later cases in mysterious ways because the hash of the changeset was changing every day at midnight. This made it hard to figure out why tests were consistently breaking after they were consistently working.
author Matt Mackall <mpm@selenic.com>
date Tue, 12 May 2015 12:33:42 -0500
parents e264d4c9629b
children 517763f87141
files tests/test-command-template.t
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-command-template.t	Sat May 02 15:51:57 2015 +0900
+++ b/tests/test-command-template.t	Tue May 12 12:33:42 2015 -0500
@@ -1938,6 +1938,8 @@
 
 Age filter:
 
+  $ hg init unstable-hash
+  $ cd unstable-hash
   $ hg log --template '{date|age}\n' > /dev/null || exit 1
 
   >>> from datetime import datetime, timedelta
@@ -1951,6 +1953,15 @@
   $ hg log -l1 --template '{date|age}\n'
   7 years from now
 
+  $ cd ..
+  $ rm -rf unstable-hash
+
+Add a dummy commit to make up for the instability of the above:
+
+  $ echo a > a
+  $ hg add a
+  $ hg ci -m future
+
 Count filter:
 
   $ hg log -l1 --template '{node|count} {node|short|count}\n'