tests: avoid referring to commits by hash in a few places
This patch means that the next patch can be written without manual
editing of the test cases.
--- a/tests/test-evolve-content-divergent-basic.t Fri May 01 07:43:15 2020 -0700
+++ b/tests/test-evolve-content-divergent-basic.t Fri May 01 07:44:01 2020 -0700
@@ -269,7 +269,7 @@
$ echo bar > d
$ hg ci -Aqm "added a d with bar in it, expect some beers"
- $ hg prune -r 0ac42f1bc15c -s . --hidden
+ $ hg prune -r 'predecessors(desc("added d") - obsolete())' -s . --hidden
1 changesets pruned
2 new content-divergent changesets
@@ -311,7 +311,7 @@
$ echo foo > d
$ hg amend -m "foo to d"
- $ hg up a9d6fd6b5e40 --hidden
+ $ hg up 'predecessors(.)' --hidden
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
updated to hidden changeset a9d6fd6b5e40
(hidden revision 'a9d6fd6b5e40' was rewritten as: b10b07a394f1)
@@ -371,7 +371,7 @@
$ echo bar > d
$ hg amend -m "bar to d, expect beers"
- $ hg up 11175423b5dc --hidden
+ $ hg up 'predecessors(.)' --hidden
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
updated to hidden changeset 11175423b5dc
(hidden revision '11175423b5dc' was rewritten as: 27f0463f169a)
--- a/tests/test-evolve-content-divergent-relocation.t Fri May 01 07:43:15 2020 -0700
+++ b/tests/test-evolve-content-divergent-relocation.t Fri May 01 07:44:01 2020 -0700
@@ -157,13 +157,13 @@
(branches are permanent and global, did you want a bookmark?)
$ hg amend -m "added foo to x"
- $ hg up 71a392c714b5 --hidden
+ $ hg up 'predecessors(.)' --hidden
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
updated to hidden changeset 71a392c714b5
(hidden revision '71a392c714b5' was rewritten as: 1e1a50385a7d)
working directory parent is obsolete! (71a392c714b5)
(use 'hg evolve' to update to its successor: 1e1a50385a7d)
- $ hg rebase -r . -d 4ae4427ee9f8 --config experimental.evolution.allowdivergence=True
+ $ hg rebase -r . -d 'desc("added d")' --config experimental.evolution.allowdivergence=True
rebasing 11:71a392c714b5 "added x"
2 new content-divergent changesets
@@ -270,13 +270,13 @@
$ echo bar > y
$ hg amend
- $ hg up fc6ad2bac162 --hidden
+ $ hg up 'predecessors(.)' --hidden
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
updated to hidden changeset fc6ad2bac162
(hidden revision 'fc6ad2bac162' was rewritten as: 2a9f6ccbdeba)
working directory parent is obsolete! (fc6ad2bac162)
(use 'hg evolve' to update to its successor: 2a9f6ccbdeba)
- $ hg rebase -r . -d b006cf317e0e --config experimental.evolution.allowdivergence=True
+ $ hg rebase -r . -d 'desc("added foo to x")' --config experimental.evolution.allowdivergence=True
rebasing 16:fc6ad2bac162 "added y"
2 new content-divergent changesets
$ echo wat > y
@@ -375,7 +375,7 @@
checking that relocated commit is there
- $ hg exp 48f745db3f53 --hidden
+ $ hg exp 20 --hidden
# HG changeset patch
# User test
# Date 0 0
@@ -423,13 +423,13 @@
$ hg add y
$ hg amend
- $ hg up daf1de08f3b0 --hidden
+ $ hg up 'predecessors(.)' --hidden
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
updated to hidden changeset daf1de08f3b0
(hidden revision 'daf1de08f3b0' was rewritten as: 3f7a1f693080)
working directory parent is obsolete! (daf1de08f3b0)
(use 'hg evolve' to update to its successor: 3f7a1f693080)
- $ hg rebase -r . -d 7bbcf24ddecf --config experimental.evolution.allowdivergence=True
+ $ hg rebase -r . -d 'desc("added y")' --config experimental.evolution.allowdivergence=True
rebasing 22:daf1de08f3b0 "added z"
2 new content-divergent changesets
$ echo bar > z
--- a/tests/test-sharing.t Fri May 01 07:43:15 2020 -0700
+++ b/tests/test-sharing.t Fri May 01 07:44:01 2020 -0700
@@ -536,7 +536,7 @@
o 3:dd15 public fix bug 15 (v2)
|
~
- $ hg --hidden shortlog -r 'predecessors(aa82)'
+ $ hg --hidden shortlog -r 'predecessors(.)'
5:541f draft fix bug 24 (v2 by bob)
6:e3a5 draft fix bug 24 (v2 by alice)
$ cat file1
--- a/tests/test-topic-stack-complex.t Fri May 01 07:43:15 2020 -0700
+++ b/tests/test-topic-stack-complex.t Fri May 01 07:44:01 2020 -0700
@@ -179,5 +179,5 @@
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
working directory is now at 80b2ddbf01d3
- $ hg log -r 80b2ddbf01d3 -T '{date|hgdate}\n'
+ $ hg log -r . -T '{date|hgdate}\n'
0 1