run-tests.py: add a default --date "0 0" argument to commit et al
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Fri, 09 Nov 2007 20:21:35 -0200
changeset 5524 453acf64f71f
parent 5523 5db730475d6d
child 5525 dcbda0c4c3eb
run-tests.py: add a default --date "0 0" argument to commit et al Part of test-tags was modified just to be sure this works. The change in test-archive-symlinks is necessary to avoid a "helpful" warning from GNU tar ("implausibly old time stamp 1970-01-01 00:00:00").
tests/run-tests.py
tests/test-archive-symlinks
tests/test-tags
--- a/tests/run-tests.py	Fri Nov 09 20:21:35 2007 -0200
+++ b/tests/run-tests.py	Fri Nov 09 20:21:35 2007 -0200
@@ -276,6 +276,11 @@
     hgrc = file(HGRCPATH, 'w+')
     hgrc.write('[ui]\n')
     hgrc.write('slash = True\n')
+    hgrc.write('[defaults]\n')
+    hgrc.write('backout = -d "0 0"\n')
+    hgrc.write('commit = -d "0 0"\n')
+    hgrc.write('debugrawcommit = -d "0 0"\n')
+    hgrc.write('tag = -d "0 0"\n')
     hgrc.close()
 
     err = os.path.join(TESTDIR, test+".err")
--- a/tests/test-archive-symlinks	Fri Nov 09 20:21:35 2007 -0200
+++ b/tests/test-archive-symlinks	Fri Nov 09 20:21:35 2007 -0200
@@ -15,7 +15,8 @@
 hg init repo
 cd repo
 ln -s nothing dangling
-hg ci -qAm 'add symlink'
+# avoid tar warnings about old timestamp
+hg ci -d '2000-01-01 00:00:00 +0000' -qAm 'add symlink'
 
 hg archive -t files ../archive
 hg archive -t tar -p tar ../archive.tar
--- a/tests/test-tags	Fri Nov 09 20:21:35 2007 -0200
+++ b/tests/test-tags	Fri Nov 09 20:21:35 2007 -0200
@@ -116,13 +116,13 @@
 cd t4
 echo foo > foo
 hg add
-hg ci -m 'add foo' -d '0 0'                # rev 0
-hg tag -d '0 0' bar                        # rev 1 bar -> 0
-hg tag -d '0 0' -f bar                     # rev 2 bar -> 1
+hg ci -m 'add foo'                 # rev 0
+hg tag bar                         # rev 1 bar -> 0
+hg tag -f bar                      # rev 2 bar -> 1
 hg up -qC 0
-hg tag -d '0 0' -fr 2 bar                  # rev 3 bar -> 2
+hg tag -fr 2 bar                   # rev 3 bar -> 2
 hg tags
 hg up -qC 0
-hg tag -d '0 0' -m 'retag rev 0' -fr 0 bar # rev 4 bar -> 0, but bar stays at 2
+hg tag -m 'retag rev 0' -fr 0 bar  # rev 4 bar -> 0, but bar stays at 2
 echo % bar should still point to rev 2
 hg tags