Mercurial > evolve
annotate tests/test-topic-stack.t @ 1910:24986e5a537c
stack: add a 'stack()' revset
We give access to the list of relevant commit with a revset. Benefits over
'topic(.)' are the filtering of obsolete changeset and the reordering (to
topological as-in unstability were resolved).
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 17 Mar 2016 09:13:12 -0700 |
parents | 36112e361ee4 |
children | bdc5bb223b50 |
rev | line source |
---|---|
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 (new head warning seems buggy) |
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 $ 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
|
15 $ cd 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
|
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 created new head |
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 $ 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
|
31 $ 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
|
32 $ 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
|
33 created new head |
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 $ 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
|
35 $ 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
|
36 $ 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
|
37 created new head |
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 $ 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
|
39 @ 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
|
40 | |
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 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
|
42 | |
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 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
|
44 | |
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 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
|
46 | |
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 o 1 default {} draft 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
|
48 | |
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
|
49 o 0 default {} draft 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
|
50 |
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 |
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 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
|
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 |
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 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
|
56 |
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 $ 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
|
58 * 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
|
59 $ hg topic --list |
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
60 _ c_b |
1905
3b42478ef017
stack: add "t" prefix to index in the output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1904
diff
changeset
|
61 t0: c_c |
3b42478ef017
stack: add "t" prefix to index in the output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1904
diff
changeset
|
62 t1: c_d |
3b42478ef017
stack: add "t" prefix to index in the output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1904
diff
changeset
|
63 t2: c_e |
1906
5e9ce6310720
stack: show the currently active changeset and unstable ones
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1905
diff
changeset
|
64 t3@ c_f (current) |
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
|
65 |
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 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
|
67 |
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 --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
|
69 $ 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
|
70 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
|
71 [255] |
1896
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
72 |
1904
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
73 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
|
74 ------------------- |
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
75 |
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
76 |
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
77 $ hg up t1 |
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
78 abort: cannot resolve "t1": no active topic |
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
79 [255] |
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
80 $ 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
|
81 $ 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
|
82 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
|
83 [255] |
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
84 $ hg up t1 |
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
85 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
86 |
1896
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
87 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
|
88 ------------------------------------ |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
89 |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
90 $ echo bbb > ddd |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
91 $ hg commit --amend |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
92 $ hg log -G |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
93 @ 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
|
94 | |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
95 | 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
|
96 | | |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
97 | 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
|
98 | | |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
99 | 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
|
100 |/ |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
101 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
|
102 | |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
103 o 1 default {} draft c_b |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
104 | |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
105 o 0 default {} draft c_a |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
106 |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
107 $ hg topic --list |
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
108 _ c_b |
1905
3b42478ef017
stack: add "t" prefix to index in the output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1904
diff
changeset
|
109 t0: c_c |
1906
5e9ce6310720
stack: show the currently active changeset and unstable ones
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1905
diff
changeset
|
110 t1@ c_d (current) |
5e9ce6310720
stack: show the currently active changeset and unstable ones
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1905
diff
changeset
|
111 t2$ c_e (unstable) |
5e9ce6310720
stack: show the currently active changeset and unstable ones
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1905
diff
changeset
|
112 t3$ c_f (unstable) |
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
113 |
1910
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
114 Also test the revset: |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
115 |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
116 $ hg log -r 'stack()' |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
117 2 default {foo} draft c_c |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
118 7 default {foo} draft c_d |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
119 4 default {foo} draft c_e |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
120 5 default {foo} draft c_f |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
121 |
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
122 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
|
123 ------------------------------------- |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
124 |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
125 Make things linear again |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
126 |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
127 $ hg rebase -s 'desc(c_e)' -d 'desc(c_d) - obsolete()' |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
128 rebasing 4:91fa8808d101 "c_e" |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
129 rebasing 5:4ec5094907b7 "c_f" |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
130 $ hg log -G |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
131 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
|
132 | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
133 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
|
134 | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
135 @ 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
|
136 | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
137 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
|
138 | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
139 o 1 default {} draft c_b |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
140 | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
141 o 0 default {} draft c_a |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
142 |
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 |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
145 Create the second branch |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
146 |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
147 $ 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
|
148 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
|
149 $ echo aaa > ggg |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
150 $ hg add ggg |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
151 $ 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
|
152 created new head |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
153 $ echo aaa > hhh |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
154 $ hg add hhh |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
155 $ 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
|
156 created new head |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
157 $ hg log -G |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
158 @ 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
|
159 | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
160 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
|
161 | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
162 | 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
|
163 | | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
164 | 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
|
165 |/ |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
166 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
|
167 | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
168 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
|
169 | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
170 o 1 default {} draft c_b |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
171 | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
172 o 0 default {} draft c_a |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
173 |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
174 |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
175 Test output |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
176 |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
177 $ hg top -l |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
178 _ c_b |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
179 t0: c_c |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
180 t1: c_d |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
181 t2: c_g |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
182 t3@ c_h (current) |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
183 _ c_d |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
184 t4: c_e |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
185 t5: c_f |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
186 |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
187 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
|
188 --------------------------------------------------------------- |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
189 |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
190 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
|
191 |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
192 $ 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
|
193 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
|
194 $ echo ccc > ddd |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
195 $ 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
|
196 $ hg rebase -d . -s 'desc(c_g)' |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
197 rebasing 10:11286b4fcb3d "c_g" |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
198 rebasing 11:3ad57527186d "c_h" |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
199 $ hg log -G |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
200 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
|
201 | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
202 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
|
203 | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
204 @ 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
|
205 | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
206 | 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
|
207 | | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
208 | 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
|
209 | | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
210 | 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
|
211 |/ |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
212 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
|
213 | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
214 o 1 default {} draft c_b |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
215 | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
216 o 0 default {} draft c_a |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
217 |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
218 |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
219 $ hg topic --list |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
220 _ c_b |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
221 t0: c_c |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
222 t1@ c_D (current) |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
223 t2: c_g |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
224 t3: c_h |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
225 _ c_D |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
226 t4$ c_e (unstable) |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
227 t5$ c_f (unstable) |