##// END OF EJS Templates
show: show all namespaces in "work" view...
Gregory Szorc -
r33050:0a507da7 default
parent child Browse files
Show More
@@ -1,12 +1,18 b''
1 # TODO there are a few deficiencies in this file:
1 # TODO there are a few deficiencies in this file:
2 # * The "namespace" of the labels needs to be worked out. We currently
2 # * The "namespace" of the labels needs to be worked out. We currently
3 # piggyback on existing values so color works.
3 # piggyback on existing values so color works.
4 # * Obsolescence isn't considered for node labels. See _cset_labels in
4 # * Obsolescence isn't considered for node labels. See _cset_labels in
5 # map-cmdline.default.
5 # map-cmdline.default.
6 showbookmarks = '{if(active, "*", " ")} {pad(bookmark, longestbookmarklen + 4)}{shortest(node, 5)}\n'
6 showbookmarks = '{if(active, "*", " ")} {pad(bookmark, longestbookmarklen + 4)}{shortest(node, 5)}\n'
7
7
8 showwork = '{cset_shortnode}{cset_names} {cset_shortdesc}'
8 showwork = '{cset_shortnode}{namespaces % cset_namespace} {cset_shortdesc}'
9
9
10 cset_shortnode = '{label("log.changeset changeset.{phase}", shortest(node, 5))}'
10 cset_shortnode = '{label("log.changeset changeset.{phase}", shortest(node, 5))}'
11 cset_names = '{if(branches, " ({label("log.branch", branch)})")}{if(bookmarks, " ({label("log.bookmarks", bookmarks)})")}'
11
12 # Treat branch and tags specially so we don't display "default" or "tip"
13 cset_namespace = '{ifeq(namespace, "branches", names_branches, ifeq(namespace, "tags", names_tags, names_others))}'
14 names_branches = '{ifeq(branch, "default", "", " ({label('log.{colorname}', branch)})")}'
15 names_tags = '{if(names % "{ifeq(name, 'tip', '', name)}", " ({label('log.{colorname}', join(names % "{ifeq(name, 'tip', '', name)}", ' '))})")}'
16 names_others = '{if(names, " ({label('log.{colorname}', join(names, ' '))})")}'
17
12 cset_shortdesc = '{label("log.description", desc|firstline)}'
18 cset_shortdesc = '{label("log.description", desc|firstline)}'
@@ -1,239 +1,237 b''
1 $ cat >> $HGRCPATH << EOF
1 $ cat >> $HGRCPATH << EOF
2 > [extensions]
2 > [extensions]
3 > show =
3 > show =
4 > EOF
4 > EOF
5
5
6 $ hg init repo0
6 $ hg init repo0
7 $ cd repo0
7 $ cd repo0
8
8
9 Command works on an empty repo
9 Command works on an empty repo
10
10
11 $ hg show work
11 $ hg show work
12
12
13 Single draft changeset shown
13 Single draft changeset shown
14
14
15 $ echo 0 > foo
15 $ echo 0 > foo
16 $ hg -q commit -A -m 'commit 0'
16 $ hg -q commit -A -m 'commit 0'
17
17
18 $ hg show work
18 $ hg show work
19 @ 9f171 commit 0
19 @ 9f171 commit 0
20
20
21 Even when it isn't the wdir
21 Even when it isn't the wdir
22
22
23 $ hg -q up null
23 $ hg -q up null
24
24
25 $ hg show work
25 $ hg show work
26 o 9f171 commit 0
26 o 9f171 commit 0
27
27
28 Single changeset is still there when public because it is a head
28 Single changeset is still there when public because it is a head
29
29
30 $ hg phase --public -r 0
30 $ hg phase --public -r 0
31 $ hg show work
31 $ hg show work
32 o 9f171 commit 0
32 o 9f171 commit 0
33
33
34 A draft child will show both it and public parent
34 A draft child will show both it and public parent
35
35
36 $ hg -q up 0
36 $ hg -q up 0
37 $ echo 1 > foo
37 $ echo 1 > foo
38 $ hg commit -m 'commit 1'
38 $ hg commit -m 'commit 1'
39
39
40 $ hg show work
40 $ hg show work
41 @ 181cc commit 1
41 @ 181cc commit 1
42 o 9f171 commit 0
42 o 9f171 commit 0
43
43
44 Multiple draft children will be shown
44 Multiple draft children will be shown
45
45
46 $ echo 2 > foo
46 $ echo 2 > foo
47 $ hg commit -m 'commit 2'
47 $ hg commit -m 'commit 2'
48
48
49 $ hg show work
49 $ hg show work
50 @ 128c8 commit 2
50 @ 128c8 commit 2
51 o 181cc commit 1
51 o 181cc commit 1
52 o 9f171 commit 0
52 o 9f171 commit 0
53
53
54 Bumping first draft changeset to public will hide its parent
54 Bumping first draft changeset to public will hide its parent
55
55
56 $ hg phase --public -r 1
56 $ hg phase --public -r 1
57 $ hg show work
57 $ hg show work
58 @ 128c8 commit 2
58 @ 128c8 commit 2
59 o 181cc commit 1
59 o 181cc commit 1
60 |
60 |
61 ~
61 ~
62
62
63 Multiple DAG heads will be shown
63 Multiple DAG heads will be shown
64
64
65 $ hg -q up -r 1
65 $ hg -q up -r 1
66 $ echo 3 > foo
66 $ echo 3 > foo
67 $ hg commit -m 'commit 3'
67 $ hg commit -m 'commit 3'
68 created new head
68 created new head
69
69
70 $ hg show work
70 $ hg show work
71 @ f0abc commit 3
71 @ f0abc commit 3
72 | o 128c8 commit 2
72 | o 128c8 commit 2
73 |/
73 |/
74 o 181cc commit 1
74 o 181cc commit 1
75 |
75 |
76 ~
76 ~
77
77
78 Even when wdir is something else
78 Even when wdir is something else
79
79
80 $ hg -q up null
80 $ hg -q up null
81
81
82 $ hg show work
82 $ hg show work
83 o f0abc commit 3
83 o f0abc commit 3
84 | o 128c8 commit 2
84 | o 128c8 commit 2
85 |/
85 |/
86 o 181cc commit 1
86 o 181cc commit 1
87 |
87 |
88 ~
88 ~
89
89
90 Draft child shows public head (multiple heads)
90 Draft child shows public head (multiple heads)
91
91
92 $ hg -q up 0
92 $ hg -q up 0
93 $ echo 4 > foo
93 $ echo 4 > foo
94 $ hg commit -m 'commit 4'
94 $ hg commit -m 'commit 4'
95 created new head
95 created new head
96
96
97 $ hg show work
97 $ hg show work
98 @ 668ca commit 4
98 @ 668ca commit 4
99 | o f0abc commit 3
99 | o f0abc commit 3
100 | | o 128c8 commit 2
100 | | o 128c8 commit 2
101 | |/
101 | |/
102 | o 181cc commit 1
102 | o 181cc commit 1
103 |/
103 |/
104 o 9f171 commit 0
104 o 9f171 commit 0
105
105
106 $ cd ..
106 $ cd ..
107
107
108 Branch name appears in output
108 Branch name appears in output
109
109
110 $ hg init branches
110 $ hg init branches
111 $ cd branches
111 $ cd branches
112 $ echo 0 > foo
112 $ echo 0 > foo
113 $ hg -q commit -A -m 'commit 0'
113 $ hg -q commit -A -m 'commit 0'
114 $ echo 1 > foo
114 $ echo 1 > foo
115 $ hg commit -m 'commit 1'
115 $ hg commit -m 'commit 1'
116 $ echo 2 > foo
116 $ echo 2 > foo
117 $ hg commit -m 'commit 2'
117 $ hg commit -m 'commit 2'
118 $ hg phase --public -r .
118 $ hg phase --public -r .
119 $ hg -q up -r 1
119 $ hg -q up -r 1
120 $ hg branch mybranch
120 $ hg branch mybranch
121 marked working directory as branch mybranch
121 marked working directory as branch mybranch
122 (branches are permanent and global, did you want a bookmark?)
122 (branches are permanent and global, did you want a bookmark?)
123 $ echo 3 > foo
123 $ echo 3 > foo
124 $ hg commit -m 'commit 3'
124 $ hg commit -m 'commit 3'
125 $ echo 4 > foo
125 $ echo 4 > foo
126 $ hg commit -m 'commit 4'
126 $ hg commit -m 'commit 4'
127
127
128 $ hg show work
128 $ hg show work
129 @ f8dd3 (mybranch) commit 4
129 @ f8dd3 (mybranch) commit 4
130 o 90cfc (mybranch) commit 3
130 o 90cfc (mybranch) commit 3
131 | o 128c8 commit 2
131 | o 128c8 commit 2
132 |/
132 |/
133 o 181cc commit 1
133 o 181cc commit 1
134 |
134 |
135 ~
135 ~
136
136
137 $ cd ..
137 $ cd ..
138
138
139 Bookmark name appears in output
139 Bookmark name appears in output
140
140
141 $ hg init bookmarks
141 $ hg init bookmarks
142 $ cd bookmarks
142 $ cd bookmarks
143 $ echo 0 > foo
143 $ echo 0 > foo
144 $ hg -q commit -A -m 'commit 0'
144 $ hg -q commit -A -m 'commit 0'
145 $ echo 1 > foo
145 $ echo 1 > foo
146 $ hg commit -m 'commit 1'
146 $ hg commit -m 'commit 1'
147 $ echo 2 > foo
147 $ echo 2 > foo
148 $ hg commit -m 'commit 2'
148 $ hg commit -m 'commit 2'
149 $ hg phase --public -r .
149 $ hg phase --public -r .
150 $ hg bookmark @
150 $ hg bookmark @
151 $ hg -q up -r 1
151 $ hg -q up -r 1
152 $ echo 3 > foo
152 $ echo 3 > foo
153 $ hg commit -m 'commit 3'
153 $ hg commit -m 'commit 3'
154 created new head
154 created new head
155 $ echo 4 > foo
155 $ echo 4 > foo
156 $ hg commit -m 'commit 4'
156 $ hg commit -m 'commit 4'
157 $ hg bookmark mybook
157 $ hg bookmark mybook
158
158
159 $ hg show work
159 $ hg show work
160 @ cac82 (mybook) commit 4
160 @ cac82 (mybook) commit 4
161 o f0abc commit 3
161 o f0abc commit 3
162 | o 128c8 (@) commit 2
162 | o 128c8 (@) commit 2
163 |/
163 |/
164 o 181cc commit 1
164 o 181cc commit 1
165 |
165 |
166 ~
166 ~
167
167
168 $ cd ..
168 $ cd ..
169
169
170 Tags are rendered
170 Tags are rendered
171
171
172 $ hg init tags
172 $ hg init tags
173 $ cd tags
173 $ cd tags
174 $ echo 0 > foo
174 $ echo 0 > foo
175 $ hg -q commit -A -m 'commit 1'
175 $ hg -q commit -A -m 'commit 1'
176 $ echo 1 > foo
176 $ echo 1 > foo
177 $ hg commit -m 'commit 2'
177 $ hg commit -m 'commit 2'
178 $ hg tag 0.1
178 $ hg tag 0.1
179 $ hg phase --public -r .
179 $ hg phase --public -r .
180 $ echo 2 > foo
180 $ echo 2 > foo
181 $ hg commit -m 'commit 3'
181 $ hg commit -m 'commit 3'
182 $ hg tag 0.2
182 $ hg tag 0.2
183
183
184 TODO tags aren't yet rendered
185 $ hg show work
184 $ hg show work
186 @ 37582 Added tag 0.2 for changeset 6379c25b76f1
185 @ 37582 Added tag 0.2 for changeset 6379c25b76f1
187 o 6379c commit 3
186 o 6379c (0.2) commit 3
188 o a2ad9 Added tag 0.1 for changeset 6a75536ea0b1
187 o a2ad9 Added tag 0.1 for changeset 6a75536ea0b1
189 |
188 |
190 ~
189 ~
191
190
192 $ cd ..
191 $ cd ..
193
192
194 Multiple names on same changeset render properly
193 Multiple names on same changeset render properly
195
194
196 $ hg init multiplenames
195 $ hg init multiplenames
197 $ cd multiplenames
196 $ cd multiplenames
198 $ echo 0 > foo
197 $ echo 0 > foo
199 $ hg -q commit -A -m 'commit 1'
198 $ hg -q commit -A -m 'commit 1'
200 $ hg phase --public -r .
199 $ hg phase --public -r .
201 $ hg branch mybranch
200 $ hg branch mybranch
202 marked working directory as branch mybranch
201 marked working directory as branch mybranch
203 (branches are permanent and global, did you want a bookmark?)
202 (branches are permanent and global, did you want a bookmark?)
204 $ hg bookmark mybook
203 $ hg bookmark mybook
205 $ echo 1 > foo
204 $ echo 1 > foo
206 $ hg commit -m 'commit 2'
205 $ hg commit -m 'commit 2'
207
206
208 $ hg show work
207 $ hg show work
209 @ 34834 (mybranch) (mybook) commit 2
208 @ 34834 (mybook) (mybranch) commit 2
210 o 97fcc commit 1
209 o 97fcc commit 1
211
210
212 Multiple bookmarks on same changeset render properly
211 Multiple bookmarks on same changeset render properly
213
212
214 $ hg book mybook2
213 $ hg book mybook2
215 $ hg show work
214 $ hg show work
216 @ 34834 (mybranch) (mybook mybook2) commit 2
215 @ 34834 (mybook mybook2) (mybranch) commit 2
217 o 97fcc commit 1
216 o 97fcc commit 1
218
217
219 $ cd ..
218 $ cd ..
220
219
221 Extra namespaces are rendered
220 Extra namespaces are rendered
222
221
223 $ hg init extranamespaces
222 $ hg init extranamespaces
224 $ cd extranamespaces
223 $ cd extranamespaces
225 $ echo 0 > foo
224 $ echo 0 > foo
226 $ hg -q commit -A -m 'commit 1'
225 $ hg -q commit -A -m 'commit 1'
227 $ hg phase --public -r .
226 $ hg phase --public -r .
228 $ echo 1 > foo
227 $ echo 1 > foo
229 $ hg commit -m 'commit 2'
228 $ hg commit -m 'commit 2'
230 $ echo 2 > foo
229 $ echo 2 > foo
231 $ hg commit -m 'commit 3'
230 $ hg commit -m 'commit 3'
232
231
233 TODO don't yet render extra namespaces
234 $ hg --config extensions.revnames=$TESTDIR/revnamesext.py show work
232 $ hg --config extensions.revnames=$TESTDIR/revnamesext.py show work
235 @ 32f3e commit 3
233 @ 32f3e (r2) commit 3
236 o 6a755 commit 2
234 o 6a755 (r1) commit 2
237 o 97fcc commit 1
235 o 97fcc (r0) commit 1
238
236
239 $ cd ..
237 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now