annotate tests/test-evolve-issue6097.t @ 6893:858b4ca88ea7 stable

tests: check that installed evolve works in test-version-install.t
author Anton Shestakov <av6@dwimlabs.net>
date Sun, 06 Oct 2024 20:29:03 +0400
parents c2fab88e6d60
children 03410b04cf10
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4824
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
1 Orphan changeset and trying to relocate a node on top of itself (issue6097)
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
2 https://bz.mercurial-scm.org/show_bug.cgi?id=6097
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
3
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
4 $ . $TESTDIR/testlib/common.sh
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
5
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
6 $ cat << EOF >> $HGRCPATH
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
7 > [extensions]
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
8 > rebase =
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
9 > evolve =
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
10 > EOF
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
11
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
12 $ hg init issue6097
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
13 $ cd issue6097
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
14
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
15 $ echo apricot > a
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
16 $ hg ci -qAm apricot
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
17
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
18 $ echo banana > b
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
19 $ hg ci -qAm banana
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
20
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
21 Let's go back to amend 0 and make an orphan out of 1
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
22
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
23 $ hg up -q 0
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
24 $ echo coconut > c
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
25 $ hg add -q c
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
26 $ hg ci --amend -m 'apricot and coconut'
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
27 1 new orphan changesets
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
28
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
29 Now rebase the successor of 0 on top of 1
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
30
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
31 $ hg rebase -r . -d 1
5647
c2fab88e6d60 tests: rebase now produces different "one-line summary" output
Martin von Zweigbergk <martinvonz@google.com>
parents: 5301
diff changeset
32 rebasing 2:32acf8fb1b23 tip "apricot and coconut"
4824
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
33 1 new orphan changesets
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
34
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
35 Pruning 1 just to get it out of the way
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
36
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
37 $ hg prune -q 1
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
38
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
39 Note how both the regular DAG and the obsolescence graph are linear, but the
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
40 paths from 3 to 0 are different: 3-1-0 and 3-2-0
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
41
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
42 $ hg log -G
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
43 @ changeset: 3:2868fe6df617
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
44 | tag: tip
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
45 | parent: 1:e0486f65907d
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
46 | user: test
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
47 | date: Thu Jan 01 00:00:00 1970 +0000
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
48 | instability: orphan
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
49 | summary: apricot and coconut
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
50 |
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
51 x changeset: 1:e0486f65907d
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
52 | user: test
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
53 | date: Thu Jan 01 00:00:00 1970 +0000
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
54 | obsolete: pruned using prune
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
55 | summary: banana
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
56 |
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
57 x changeset: 0:692cc7b6212c
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
58 user: test
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
59 date: Thu Jan 01 00:00:00 1970 +0000
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
60 obsolete: rewritten using amend, rebase as 3:2868fe6df617
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
61 summary: apricot
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
62
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
63
5275
417503ef667d tests: add debugobsolete calls before many obslog calls
Martin von Zweigbergk <martinvonz@google.com>
parents: 5123
diff changeset
64 $ hg debugobsolete
417503ef667d tests: add debugobsolete calls before many obslog calls
Martin von Zweigbergk <martinvonz@google.com>
parents: 5123
diff changeset
65 692cc7b6212c102a9eafcf04ed2e4bfca5023754 32acf8fb1b2325c727135dcd65153745a031a125 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'}
417503ef667d tests: add debugobsolete calls before many obslog calls
Martin von Zweigbergk <martinvonz@google.com>
parents: 5123
diff changeset
66 32acf8fb1b2325c727135dcd65153745a031a125 2868fe6df617a3045cf668e4ab1c486a8692abd1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '12', 'operation': 'rebase', 'user': 'test'}
417503ef667d tests: add debugobsolete calls before many obslog calls
Martin von Zweigbergk <martinvonz@google.com>
parents: 5123
diff changeset
67 e0486f65907dac7107e72a247386845e6a9fd83b 0 {692cc7b6212c102a9eafcf04ed2e4bfca5023754} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
4824
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
68 $ hg obslog
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
69 @ 2868fe6df617 (3) apricot and coconut
5301
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
70 | rewritten(parent, content) from 32acf8fb1b23 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
4824
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
71 |
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
72 x 32acf8fb1b23 (2) apricot and coconut
5301
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
73 | rewritten(description, content) from 692cc7b6212c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
4824
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
74 |
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
75 x 692cc7b6212c (0) apricot
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
76
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
77
4825
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
78 $ hg evolve -r .
4824
f9d436b64b3f tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
79 move:[3] apricot and coconut
4825
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
80 atop:[-1]
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
81 working directory is now at bb847d1d3a5f
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
82
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
83 $ hg log -G
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
84 @ changeset: 4:bb847d1d3a5f
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
85 tag: tip
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
86 parent: -1:000000000000
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
87 user: test
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
88 date: Thu Jan 01 00:00:00 1970 +0000
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
89 summary: apricot and coconut
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
90
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
91
5275
417503ef667d tests: add debugobsolete calls before many obslog calls
Martin von Zweigbergk <martinvonz@google.com>
parents: 5123
diff changeset
92 $ hg debugobsolete
417503ef667d tests: add debugobsolete calls before many obslog calls
Martin von Zweigbergk <martinvonz@google.com>
parents: 5123
diff changeset
93 692cc7b6212c102a9eafcf04ed2e4bfca5023754 32acf8fb1b2325c727135dcd65153745a031a125 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'}
417503ef667d tests: add debugobsolete calls before many obslog calls
Martin von Zweigbergk <martinvonz@google.com>
parents: 5123
diff changeset
94 32acf8fb1b2325c727135dcd65153745a031a125 2868fe6df617a3045cf668e4ab1c486a8692abd1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '12', 'operation': 'rebase', 'user': 'test'}
417503ef667d tests: add debugobsolete calls before many obslog calls
Martin von Zweigbergk <martinvonz@google.com>
parents: 5123
diff changeset
95 e0486f65907dac7107e72a247386845e6a9fd83b 0 {692cc7b6212c102a9eafcf04ed2e4bfca5023754} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
417503ef667d tests: add debugobsolete calls before many obslog calls
Martin von Zweigbergk <martinvonz@google.com>
parents: 5123
diff changeset
96 2868fe6df617a3045cf668e4ab1c486a8692abd1 bb847d1d3a5f3de90f4fd5e845b69d848568401a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
4825
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
97 $ hg obslog
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
98 @ bb847d1d3a5f (4) apricot and coconut
5301
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
99 | rebased(parent) from 2868fe6df617 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
4825
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
100 |
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
101 x 2868fe6df617 (3) apricot and coconut
5301
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
102 | rewritten(parent, content) from 32acf8fb1b23 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
4825
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
103 |
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
104 x 32acf8fb1b23 (2) apricot and coconut
5301
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5275
diff changeset
105 | rewritten(description, content) from 692cc7b6212c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
4825
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
106 |
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
107 x 692cc7b6212c (0) apricot
9af212b8565a evolve: test that target is not orig in _solveunstable() (issue6097)
Anton Shestakov <av6@dwimlabs.net>
parents: 4824
diff changeset
108