author | Pierre-Yves David <pierre-yves.david@octobus.net> |
Thu, 18 May 2017 23:12:52 +0200 | |
branch | mercurial-4.1 |
changeset 2431 | 0405bbda7402 |
parent 2423 | 677dfbb8bdbf |
parent 2348 | 5737e0680f10 |
child 2700 | 52d5c5ce27e4 |
permissions | -rw-r--r-- |
2045
db617700d318
tests: move "test setup" script into a 'testlib' directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1998
diff
changeset
|
1 |
$ . "$TESTDIR/testlib/topic_setup.sh" |
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
|
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 |
2423
677dfbb8bdbf
test: enforce color to be enabled
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2045
diff
changeset
|
7 |
> [extensions] |
677dfbb8bdbf
test: enforce color to be enabled
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2045
diff
changeset
|
8 |
> color = |
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
|
9 |
> [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
|
10 |
> 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
|
11 |
> [experimental] |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
12 |
> 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
|
13 |
> 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
|
14 |
|
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 |
$ 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
|
16 |
$ 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
|
17 |
$ 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
|
18 |
$ 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
|
19 |
$ 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
|
20 |
$ 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
|
21 |
$ 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
|
22 |
$ 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
|
23 |
$ 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
|
24 |
$ 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
|
25 |
$ 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
|
26 |
$ 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
|
27 |
$ 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
|
28 |
$ 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
|
29 |
$ 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
|
30 |
$ 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
|
31 |
$ 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
|
32 |
$ 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
|
33 |
$ 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
|
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 |
$ 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
|
38 |
@ 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
|
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 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
|
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 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
|
43 |
| |
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 |
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
|
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 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
|
47 |
| |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
48 |
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
|
49 |
|
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 |
|
1961
d9c7fced94fc
stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1960
diff
changeset
|
51 |
Check that topic without any parent does not crash --list |
d9c7fced94fc
stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1960
diff
changeset
|
52 |
--------------------------------------------------------- |
d9c7fced94fc
stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1960
diff
changeset
|
53 |
|
d9c7fced94fc
stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1960
diff
changeset
|
54 |
$ hg up other |
d9c7fced94fc
stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1960
diff
changeset
|
55 |
switching to topic other |
d9c7fced94fc
stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1960
diff
changeset
|
56 |
0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
d9c7fced94fc
stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1960
diff
changeset
|
57 |
$ hg topic --list |
1995
54d6dff699f0
stack: add some header with the topic name
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1991
diff
changeset
|
58 |
### topic: other |
1996
5c40dd2cf131
stack: add some basic branch information
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1995
diff
changeset
|
59 |
### branch: default |
1961
d9c7fced94fc
stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1960
diff
changeset
|
60 |
t2@ c_b (current) |
d9c7fced94fc
stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1960
diff
changeset
|
61 |
t1: c_a |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
62 |
$ hg phase --public 'topic("other")' |
1961
d9c7fced94fc
stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1960
diff
changeset
|
63 |
$ hg up foo |
d9c7fced94fc
stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1960
diff
changeset
|
64 |
switching to topic foo |
d9c7fced94fc
stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1960
diff
changeset
|
65 |
4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
66 |
|
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
|
67 |
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
|
68 |
----------- |
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 |
|
1973
e97458bf53be
stack: introduce and explicite command to display the stack
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1961
diff
changeset
|
70 |
'hg stack' list all changeset in the topic |
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
|
71 |
|
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
|
72 |
$ 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
|
73 |
* foo |
1973
e97458bf53be
stack: introduce and explicite command to display the stack
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1961
diff
changeset
|
74 |
$ hg stack |
1995
54d6dff699f0
stack: add some header with the topic name
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1991
diff
changeset
|
75 |
### topic: foo |
1996
5c40dd2cf131
stack: add some basic branch information
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1995
diff
changeset
|
76 |
### branch: default |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
77 |
t4@ c_f (current) |
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
78 |
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
|
79 |
t2: c_d |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
80 |
t1: c_c |
1957
ea5553e47027
stack: change the ascii symbold for base
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1956
diff
changeset
|
81 |
^ c_b |
2341
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
82 |
$ hg stack -Tjson | python -m json.tool |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
83 |
[ |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
84 |
{ |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
85 |
"isentry": true, |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
86 |
"topic.stack.desc": "c_f", |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
87 |
"topic.stack.index": 4, |
2348
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
88 |
"topic.stack.state": [ |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
89 |
"current" |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
90 |
], |
2341
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
91 |
"topic.stack.state.symbol": "@" |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
92 |
}, |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
93 |
{ |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
94 |
"isentry": true, |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
95 |
"topic.stack.desc": "c_e", |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
96 |
"topic.stack.index": 3, |
2348
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
97 |
"topic.stack.state": [ |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
98 |
"clean" |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
99 |
], |
2341
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
100 |
"topic.stack.state.symbol": ":" |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
101 |
}, |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
102 |
{ |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
103 |
"isentry": true, |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
104 |
"topic.stack.desc": "c_d", |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
105 |
"topic.stack.index": 2, |
2348
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
106 |
"topic.stack.state": [ |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
107 |
"clean" |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
108 |
], |
2341
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
109 |
"topic.stack.state.symbol": ":" |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
110 |
}, |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
111 |
{ |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
112 |
"isentry": true, |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
113 |
"topic.stack.desc": "c_c", |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
114 |
"topic.stack.index": 1, |
2348
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
115 |
"topic.stack.state": [ |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
116 |
"clean" |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
117 |
], |
2341
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
118 |
"topic.stack.state.symbol": ":" |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
119 |
}, |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
120 |
{ |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
121 |
"isentry": false, |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
122 |
"topic.stack.desc": "c_b", |
2348
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
123 |
"topic.stack.state": [ |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
124 |
"base" |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
125 |
], |
2341
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
126 |
"topic.stack.state.symbol": "^" |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
127 |
} |
a5117a5becf8
ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents:
2045
diff
changeset
|
128 |
] |
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
|
129 |
|
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
|
130 |
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
|
131 |
|
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
|
132 |
$ hg topic --clear |
1973
e97458bf53be
stack: introduce and explicite command to display the stack
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1961
diff
changeset
|
133 |
$ hg stack |
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
|
134 |
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
|
135 |
[255] |
1896
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
136 |
|
1904
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
137 |
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
|
138 |
------------------- |
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
139 |
|
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
140 |
|
1958
62d5d4206840
stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1957
diff
changeset
|
141 |
$ 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
|
142 |
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
|
143 |
[255] |
f52c02bf47b7
stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1898
diff
changeset
|
144 |
$ 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
|
145 |
$ 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
|
146 |
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
|
147 |
[255] |
1958
62d5d4206840
stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1957
diff
changeset
|
148 |
$ 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
|
149 |
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
|
150 |
$ 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
|
151 |
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
|
152 |
c_d |
62d5d4206840
stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1957
diff
changeset
|
153 |
branch: default |
62d5d4206840
stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1957
diff
changeset
|
154 |
commit: (clean) |
62d5d4206840
stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1957
diff
changeset
|
155 |
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
|
156 |
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
|
157 |
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
|
158 |
|
1896
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
159 |
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
|
160 |
------------------------------------ |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
161 |
|
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
162 |
$ echo bbb > ddd |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
163 |
$ hg commit --amend |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
164 |
$ hg log -G |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
165 |
@ 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
|
166 |
| |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
167 |
| 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
|
168 |
| | |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
169 |
| 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
|
170 |
| | |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
171 |
| 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
|
172 |
|/ |
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
173 |
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
|
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 |
1896
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
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 |
1896
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
178 |
|
4ae421cbb07c
stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1895
diff
changeset
|
179 |
$ hg topic --list |
1995
54d6dff699f0
stack: add some header with the topic name
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1991
diff
changeset
|
180 |
### topic: foo |
1996
5c40dd2cf131
stack: add some basic branch information
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1995
diff
changeset
|
181 |
### branch: default |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
182 |
t4$ c_f (unstable) |
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
183 |
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
|
184 |
t2@ c_d (current) |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
185 |
t1: c_c |
1957
ea5553e47027
stack: change the ascii symbold for base
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1956
diff
changeset
|
186 |
^ c_b |
2348
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
187 |
$ hg up t3 |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
188 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
189 |
$ hg topic --list |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
190 |
### topic: foo |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
191 |
### branch: default |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
192 |
t4$ c_f (unstable) |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
193 |
t3@ c_e (current) |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
194 |
t2: c_d |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
195 |
t1: c_c |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
196 |
^ c_b |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
197 |
$ hg topic --list --color=debug |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
198 |
[topic.stack.summary.topic|### topic: [topic.active|foo]] |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
199 |
[topic.stack.summary.branches|### branch: default] |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
200 |
[topic.stack.index topic.stack.index.unstable|t4][topic.stack.state topic.stack.state.unstable|$] [topic.stack.desc topic.stack.desc.unstable|c_f][topic.stack.state topic.stack.state.unstable| (unstable)] |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
201 |
[topic.stack.index topic.stack.index.current|t3][topic.stack.state topic.stack.state.current|@] [topic.stack.desc topic.stack.desc.current|c_e][topic.stack.state topic.stack.state.current| (current)] |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
202 |
[topic.stack.index topic.stack.index.clean|t2][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_d] |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
203 |
[topic.stack.index topic.stack.index.clean|t1][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_c] |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
204 |
[topic.stack.state topic.stack.state.base|^] [topic.stack.desc topic.stack.desc.base|c_b] |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
205 |
$ hg up t2 |
5737e0680f10
ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents:
2341
diff
changeset
|
206 |
1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
207 |
|
1910
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
208 |
Also test the revset: |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
209 |
|
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
210 |
$ hg log -r 'stack()' |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
211 |
2 default {foo} draft c_c |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
212 |
7 default {foo} draft c_d |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
213 |
4 default {foo} draft c_e |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
214 |
5 default {foo} draft c_f |
24986e5a537c
stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1909
diff
changeset
|
215 |
|
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
216 |
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
|
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 |
Make things linear again |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
220 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
221 |
$ 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
|
222 |
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
|
223 |
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
|
224 |
$ hg log -G |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
225 |
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
|
226 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
227 |
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
|
228 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
229 |
@ 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
|
230 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
231 |
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
|
232 |
| |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
233 |
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
|
234 |
| |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
235 |
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
|
236 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
237 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
238 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
239 |
Create the second branch |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
240 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
241 |
$ 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
|
242 |
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
|
243 |
$ echo aaa > ggg |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
244 |
$ hg add ggg |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
245 |
$ 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
|
246 |
$ echo aaa > hhh |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
247 |
$ hg add hhh |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
248 |
$ 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
|
249 |
$ hg log -G |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
250 |
@ 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
|
251 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
252 |
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
|
253 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
254 |
| 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
|
255 |
| | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
256 |
| 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
|
257 |
|/ |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
258 |
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
|
259 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
260 |
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
|
261 |
| |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
262 |
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
|
263 |
| |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
264 |
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
|
265 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
266 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
267 |
Test output |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
268 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
269 |
$ hg top -l |
1998
302be26a3fd8
stack: add warning about multiple heads
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1996
diff
changeset
|
270 |
### topic: foo (2 heads) |
1996
5c40dd2cf131
stack: add some basic branch information
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1995
diff
changeset
|
271 |
### branch: default |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
272 |
t6: c_f |
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
273 |
t5: c_e |
1991
ba79d23594d6
stack: reusing the index number in base when applicable
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1973
diff
changeset
|
274 |
t2^ c_d (base) |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
275 |
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
|
276 |
t3: c_g |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
277 |
t2: c_d |
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
278 |
t1: c_c |
1957
ea5553e47027
stack: change the ascii symbold for base
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1956
diff
changeset
|
279 |
^ c_b |
1909
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
280 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
281 |
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
|
282 |
--------------------------------------------------------------- |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
283 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
284 |
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
|
285 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
286 |
$ 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
|
287 |
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
|
288 |
$ echo ccc > ddd |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
289 |
$ 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
|
290 |
$ 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
|
291 |
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
|
292 |
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
|
293 |
$ hg log -G |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
294 |
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
|
295 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
296 |
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
|
297 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
298 |
@ 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
|
299 |
| |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
300 |
| 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
|
301 |
| | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
302 |
| 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
|
303 |
| | |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
304 |
| 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
|
305 |
|/ |
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
306 |
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
|
307 |
| |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
308 |
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
|
309 |
| |
1960
a9a1abc7dd75
test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1959
diff
changeset
|
310 |
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
|
311 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
312 |
|
36112e361ee4
stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1906
diff
changeset
|
313 |
$ hg topic --list |
1998
302be26a3fd8
stack: add warning about multiple heads
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1996
diff
changeset
|
314 |
### topic: foo (2 heads) |
1996
5c40dd2cf131
stack: add some basic branch information
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1995
diff
changeset
|
315 |
### branch: default |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
316 |
t6$ c_f (unstable) |
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
317 |
t5$ c_e (unstable) |
1991
ba79d23594d6
stack: reusing the index number in base when applicable
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1973
diff
changeset
|
318 |
t2^ c_D (base) |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
319 |
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
|
320 |
t3: c_g |
1956
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
321 |
t2@ c_D (current) |
d8f1e432b16a
stack: reverse the display order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1954
diff
changeset
|
322 |
t1: c_c |
1957
ea5553e47027
stack: change the ascii symbold for base
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1956
diff
changeset
|
323 |
^ c_b |