Mercurial > evolve
annotate tests/test-evolve-issue6097.t @ 4824:f9d436b64b3f stable
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
See issue6097.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Mon, 02 Sep 2019 11:17:23 +0700 |
parents | |
children | 9af212b8565a |
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 |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
32 rebasing 2:32acf8fb1b23 "apricot and coconut" (tip) |
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 |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
64 $ hg obslog |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
65 @ 2868fe6df617 (3) apricot and coconut |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
66 | |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
67 x 32acf8fb1b23 (2) apricot and coconut |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
68 | rewritten(parent, content) as 2868fe6df617 using rebase by test (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
|
69 | |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
70 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
|
71 rewritten(description, content) as 32acf8fb1b23 using amend by test (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
|
72 |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
73 |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
74 FIXME: obviously a traceback is not good |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
75 |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
76 $ hg evolve -r . 2>&1 | grep '^\S' |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
77 move:[3] apricot and coconut |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
78 atop:[3] apricot and coconut |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
79 ** unknown exception encountered, please report by visiting |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
80 ** https://mercurial-scm.org/wiki/BugTracker |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
81 ** Python * (glob) |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
82 ** Mercurial Distributed SCM (*) (glob) |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
83 ** Extensions loaded: rebase, evolve |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
84 ** ProgrammingError: tried to relocate a node on top of itself |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
85 ** (This shouldn't happen. If you still need to move changesets, please do so manually with nothing to rebase - working directory parent is also destination) |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
86 Traceback (most recent call last): |
f9d436b64b3f
tests: demonstrate an orphan changeset cause "relocate node on top of itself"
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
87 mercurial.error.ProgrammingError: tried to relocate a node on top of itself |