[PATCH 7 of 8] test: prepare tests for removing date aliases

Boris Feld boris.feld at octobus.net
Mon May 22 14:46:27 EDT 2017


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1495474127 -7200
#      Mon May 22 19:28:47 2017 +0200
# Node ID 3f99909fc9ab881157bbac1ecd84f4f0483d4345
# Parent  ac0b3a1ed91a847242bdc1c722f383030eaea369
# EXP-Topic develforcedate
test: prepare tests for removing date aliases

In the next patch, I'm gonna removing the global command aliases that force
the epoch date but some tests either fail or their output change after that.
Instead I'm copying the needed aliases in the test files that will otherwise
change.

Update test-rebase-obsolete.t because a revision hash is based on the epoch
date after a 'commit --amend' and the output will change after removing date
aliases.

Update test-subrepo-git.t as the git subrepo doesn't use traditional date
mechanisms. I'm not sure that updating the git subrepo to support default-date
make sense. Add the commit alias to the test in order for making it pass after
removing the date aliases globally.

diff -r ac0b3a1ed91a847242bdc1c722f383030eaea369 -r 3f99909fc9ab881157bbac1ecd84f4f0483d4345 tests/test-rebase-obsolete.t
--- a/tests/test-rebase-obsolete.t	Tue May 16 18:36:08 2017 +0200
+++ b/tests/test-rebase-obsolete.t	Mon May 22 19:28:47 2017 +0200
@@ -902,7 +902,7 @@
   $ hg up 9520eea781bc
   1 files updated, 0 files merged, 2 files removed, 0 files unresolved
   $ echo 1 >> E
-  $ hg commit --amend -m "E'"
+  $ hg commit --amend -m "E'" -d "0 0"
   $ hg log -G
   @  9:69abe8906104 E'
   |
diff -r ac0b3a1ed91a847242bdc1c722f383030eaea369 -r 3f99909fc9ab881157bbac1ecd84f4f0483d4345 tests/test-subrepo-git.t
--- a/tests/test-subrepo-git.t	Tue May 16 18:36:08 2017 +0200
+++ b/tests/test-subrepo-git.t	Mon May 22 19:28:47 2017 +0200
@@ -2,6 +2,11 @@
 
 make git commits repeatable
 
+  $ cat >> $HGRCPATH <<EOF
+  > [defaults]
+  > commit = -d "0 0"
+  > EOF
+
   $ echo "[core]" >> $HOME/.gitconfig
   $ echo "autocrlf = false" >> $HOME/.gitconfig
   $ GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME


More information about the Mercurial-devel mailing list