author | Pierre-Yves David <pierre-yves.david@fb.com> |
Mon, 04 Apr 2016 00:22:20 -0700 | |
changeset 1960 | a9a1abc7dd75 |
parent 1959 | 6789d5d9f2b0 |
child 1961 | d9c7fced94fc |
permissions | -rw-r--r-- |
1895
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
1 |
$ . "$TESTDIR/testlib" |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
2 |
|
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
3 |
Initial setup |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
4 |
|
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
5 |
|
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
6 |
$ cat << EOF >> $HGRCPATH |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
7 |
> [ui] |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
8 |
> logtemplate = {rev} {branch} \{{get(namespaces, "topics")}} {phase} {desc|firstline}\n |
1896
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
9 |
> [experimental] |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
10 |
> evolution=createmarkers,exchange,allowunstable |
1895
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
11 |
> EOF |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
12 |
|
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
13 |
$ hg init main |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
14 |
$ cd main |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
15 |
$ hg topic other |
1895
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
16 |
$ echo aaa > aaa |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
17 |
$ hg add aaa |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
18 |
$ hg commit -m c_a |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
19 |
$ echo aaa > bbb |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
20 |
$ hg add bbb |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
21 |
$ hg commit -m c_b |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
22 |
$ hg topic foo |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
23 |
$ echo aaa > ccc |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
24 |
$ hg add ccc |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
25 |
$ hg commit -m c_c |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
26 |
$ echo aaa > ddd |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
27 |
$ hg add ddd |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
28 |
$ hg commit -m c_d |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
29 |
$ echo aaa > eee |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
30 |
$ hg add eee |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
31 |
$ hg commit -m c_e |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
32 |
$ echo aaa > fff |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
33 |
$ hg add fff |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
34 |
$ hg commit -m c_f |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
35 |
$ hg log -G |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
36 |
@ 5 default {foo} draft c_f |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
37 |
| |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
38 |
o 4 default {foo} draft c_e |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
39 |
| |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
40 |
o 3 default {foo} draft c_d |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
41 |
| |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
42 |
o 2 default {foo} draft c_c |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
43 |
| |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
44 |
o 1 default {other} draft c_b |
1895
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
45 |
| |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
46 |
o 0 default {other} draft c_a |
1895
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
47 |
|
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
48 |
|
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
49 |
$ hg phase --public 'topic("other")' |
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
50 |
|
1895
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
51 |
Simple test |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
52 |
----------- |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
53 |
|
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
54 |
hg topic -l list all changeset in the topic |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
55 |
|
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
56 |
$ hg topic |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
57 |
* foo |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
58 |
$ hg topic --list |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
59 |
t4@ c_f (current) |
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
60 |
t3: c_e |
1954
61f36480740f
stack: start indexing at 't1' instead of 't0'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1953
diff
changeset
|
61 |
t2: c_d |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
62 |
t1: c_c |
1957
ea5553e47027
stack: change the ascii symbold for base
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1956
diff
changeset
|
63 |
^ c_b |
1895
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
64 |
|
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
65 |
error case, nothing to list |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
66 |
|
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
67 |
$ hg topic --clear |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
68 |
$ hg topic --list |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
69 |
abort: no active topic to list |
c8e4c6e03957
stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
70 |
[255] |
1896
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
71 |
|
1904
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
72 |
Test "t#" reference |
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
73 |
------------------- |
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
74 |
|
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
75 |
|
1958
62d5d4206840
stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1957
diff
changeset
|
76 |
$ hg up t2 |
62d5d4206840
stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1957
diff
changeset
|
77 |
abort: cannot resolve "t2": no active topic |
1904
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
78 |
[255] |
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
79 |
$ hg topic foo |
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
80 |
$ hg up t42 |
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
81 |
abort: cannot resolve "t42": topic "foo" has only 4 changesets |
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
82 |
[255] |
1958
62d5d4206840
stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1957
diff
changeset
|
83 |
$ hg up t2 |
1904
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
84 |
0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
1958
62d5d4206840
stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1957
diff
changeset
|
85 |
$ hg summary |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
86 |
parent: 3:e629654d7050 |
1958
62d5d4206840
stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1957
diff
changeset
|
87 |
c_d |
62d5d4206840
stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1957
diff
changeset
|
88 |
branch: default |
62d5d4206840
stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1957
diff
changeset
|
89 |
commit: (clean) |
62d5d4206840
stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1957
diff
changeset
|
90 |
update: (current) |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
91 |
phases: 4 draft |
1958
62d5d4206840
stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1957
diff
changeset
|
92 |
topic: foo |
1904
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
93 |
|
1896
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
94 |
Case with some of the topic unstable |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
95 |
------------------------------------ |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
96 |
|
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
97 |
$ echo bbb > ddd |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
98 |
$ hg commit --amend |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
99 |
$ hg log -G |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
100 |
@ 7 default {foo} draft c_d |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
101 |
| |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
102 |
| o 5 default {foo} draft c_f |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
103 |
| | |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
104 |
| o 4 default {foo} draft c_e |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
105 |
| | |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
106 |
| x 3 default {foo} draft c_d |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
107 |
|/ |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
108 |
o 2 default {foo} draft c_c |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
109 |
| |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
110 |
o 1 default {} public c_b |
1896
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
111 |
| |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
112 |
o 0 default {} public c_a |
1896
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
113 |
|
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
114 |
$ hg topic --list |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
115 |
t4$ c_f (unstable) |
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
116 |
t3$ c_e (unstable) |
1954
61f36480740f
stack: start indexing at 't1' instead of 't0'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1953
diff
changeset
|
117 |
t2@ c_d (current) |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
118 |
t1: c_c |
1957
ea5553e47027
stack: change the ascii symbold for base
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1956
diff
changeset
|
119 |
^ c_b |
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
120 |
|
1910
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
121 |
Also test the revset: |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
122 |
|
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
123 |
$ hg log -r 'stack()' |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
124 |
2 default {foo} draft c_c |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
125 |
7 default {foo} draft c_d |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
126 |
4 default {foo} draft c_e |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
127 |
5 default {foo} draft c_f |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
128 |
|
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
129 |
Case with multiple heads on the topic |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
130 |
------------------------------------- |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
131 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
132 |
Make things linear again |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
133 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
134 |
$ hg rebase -s 'desc(c_e)' -d 'desc(c_d) - obsolete()' |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
135 |
rebasing 4:0f9ac936c87d "c_e" |
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
136 |
rebasing 5:6559e6d93aea "c_f" |
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
137 |
$ hg log -G |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
138 |
o 9 default {foo} draft c_f |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
139 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
140 |
o 8 default {foo} draft c_e |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
141 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
142 |
@ 7 default {foo} draft c_d |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
143 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
144 |
o 2 default {foo} draft c_c |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
145 |
| |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
146 |
o 1 default {} public c_b |
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
147 |
| |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
148 |
o 0 default {} public c_a |
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
149 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
150 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
151 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
152 |
Create the second branch |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
153 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
154 |
$ hg up 'desc(c_d)' |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
155 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
156 |
$ echo aaa > ggg |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
157 |
$ hg add ggg |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
158 |
$ hg commit -m c_g |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
159 |
$ echo aaa > hhh |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
160 |
$ hg add hhh |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
161 |
$ hg commit -m c_h |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
162 |
$ hg log -G |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
163 |
@ 11 default {foo} draft c_h |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
164 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
165 |
o 10 default {foo} draft c_g |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
166 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
167 |
| o 9 default {foo} draft c_f |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
168 |
| | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
169 |
| o 8 default {foo} draft c_e |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
170 |
|/ |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
171 |
o 7 default {foo} draft c_d |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
172 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
173 |
o 2 default {foo} draft c_c |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
174 |
| |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
175 |
o 1 default {} public c_b |
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
176 |
| |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
177 |
o 0 default {} public c_a |
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
178 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
179 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
180 |
Test output |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
181 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
182 |
$ hg top -l |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
183 |
t6: c_f |
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
184 |
t5: c_e |
1957
ea5553e47027
stack: change the ascii symbold for base
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1956
diff
changeset
|
185 |
^ c_d |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
186 |
t4@ c_h (current) |
1954
61f36480740f
stack: start indexing at 't1' instead of 't0'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1953
diff
changeset
|
187 |
t3: c_g |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
188 |
t2: c_d |
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
189 |
t1: c_c |
1957
ea5553e47027
stack: change the ascii symbold for base
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1956
diff
changeset
|
190 |
^ c_b |
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
191 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
192 |
Case with multiple heads on the topic with unstability involved |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
193 |
--------------------------------------------------------------- |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
194 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
195 |
We amend the message to make sure the display base pick the right changeset |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
196 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
197 |
$ hg up 'desc(c_d)' |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
198 |
0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
199 |
$ echo ccc > ddd |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
200 |
$ hg commit --amend -m 'c_D' |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
201 |
$ hg rebase -d . -s 'desc(c_g)' |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
202 |
rebasing 10:81264ae8a36a "c_g" |
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
203 |
rebasing 11:fde5f5941642 "c_h" |
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
204 |
$ hg log -G |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
205 |
o 15 default {foo} draft c_h |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
206 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
207 |
o 14 default {foo} draft c_g |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
208 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
209 |
@ 13 default {foo} draft c_D |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
210 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
211 |
| o 9 default {foo} draft c_f |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
212 |
| | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
213 |
| o 8 default {foo} draft c_e |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
214 |
| | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
215 |
| x 7 default {foo} draft c_d |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
216 |
|/ |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
217 |
o 2 default {foo} draft c_c |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
218 |
| |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
219 |
o 1 default {} public c_b |
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
220 |
| |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
221 |
o 0 default {} public c_a |
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
222 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
223 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
224 |
$ hg topic --list |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
225 |
t6$ c_f (unstable) |
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
226 |
t5$ c_e (unstable) |
1957
ea5553e47027
stack: change the ascii symbold for base
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1956
diff
changeset
|
227 |
^ c_D |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
228 |
t4: c_h |
1954
61f36480740f
stack: start indexing at 't1' instead of 't0'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1953
diff
changeset
|
229 |
t3: c_g |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
230 |
t2@ c_D (current) |
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
231 |
t1: c_c |
1957
ea5553e47027
stack: change the ascii symbold for base
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1956
diff
changeset
|
232 |
^ c_b |