Mercurial > hg-stable
changeset 41125:14271b524d76
test-amend: remove uninteresting fields from log output to deduplicate tests
We aren't testing the behavior of obsolescence-based amend.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 07 Jan 2019 21:57:23 +0900 |
parents | 5967995c32bb |
children | b153a4aa06f8 |
files | tests/test-amend.t |
diffstat | 1 files changed, 9 insertions(+), 61 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-amend.t Wed Dec 26 17:36:53 2018 +0300 +++ b/tests/test-amend.t Mon Jan 07 21:57:23 2019 +0900 @@ -396,97 +396,45 @@ $ hg init $TESTTMP/repo5 $ cd $TESTTMP/repo5 + $ cat <<'EOF' >> .hg/hgrc + > [ui] + > logtemplate = 'user: {user} + > date: {date|date} + > summary: {desc|firstline}\n' + > EOF + $ echo a>a $ hg ci -Am 'commit 1' adding a -#if obsstore-on When updatetimestamp is False $ hg amend --date '1997-1-1 0:1' $ hg log --limit 1 - changeset: 1:036a159be19d - tag: tip - parent: -1:000000000000 user: test date: Wed Jan 01 00:01:00 1997 +0000 summary: commit 1 - + When update-timestamp is True and no other change than the date $ hg amend --config rewrite.update-timestamp=True nothing changed [1] $ hg log --limit 1 - changeset: 1:036a159be19d - tag: tip - parent: -1:000000000000 user: test date: Wed Jan 01 00:01:00 1997 +0000 summary: commit 1 - + When update-timestamp is True and there is other change than the date $ hg amend --user foobar --config rewrite.update-timestamp=True $ hg log --limit 1 - changeset: 2:3ba48b892280 - tag: tip - parent: -1:000000000000 user: foobar date: Thu Jan 01 00:00:02 1970 +0000 summary: commit 1 - When date option is applicable and update-timestamp is True $ hg amend --date '1998-1-1 0:1' --config rewrite.update-timestamp=True $ hg log --limit 1 - changeset: 3:626aee031885 - tag: tip - parent: -1:000000000000 user: foobar date: Thu Jan 01 00:01:00 1998 +0000 summary: commit 1 - -#else - -When updatetimestamp is False - - $ hg amend --date '1997-1-1 0:1' - $ hg log --limit 1 - changeset: 0:036a159be19d - tag: tip - user: test - date: Wed Jan 01 00:01:00 1997 +0000 - summary: commit 1 - - When update-timestamp is True and no other change than the date - - $ hg amend --config rewrite.update-timestamp=True - nothing changed - [1] - $ hg log --limit 1 - changeset: 0:036a159be19d - tag: tip - user: test - date: Wed Jan 01 00:01:00 1997 +0000 - summary: commit 1 - -When update-timestamp is True and there is other change than the date - $ hg amend --user foobar --config rewrite.update-timestamp=True - $ hg log --limit 1 - changeset: 0:3ba48b892280 - tag: tip - user: foobar - date: Thu Jan 01 00:00:02 1970 +0000 - summary: commit 1 - - -When date option is applicable and update-timestamp is True - $ hg amend --date '1998-1-1 0:1' --config rewrite.update-timestamp=True - $ hg log --limit 1 - changeset: 0:626aee031885 - tag: tip - user: foobar - date: Thu Jan 01 00:01:00 1998 +0000 - summary: commit 1 - -#endif