comparison tests/test-topic-mode.t @ 3769:1bc4b0807c37

topic: display a hint pointing at help when a topic becomes non-empty This is an attempt at avoiding "mistakes" by new users of topics when they pull a topic and publish its changesets while being checked out. In this case, the topic will become empty but still be active; however, if this is a "foreign" topic, the user will not likely want to keep it active for the next commit operation. So we add a hint message pointing at general help of "topics" command so that they can eventually do something and learn about "hg topics --clear".
author Denis Laxalde <denis.laxalde@logilab.fr>
date Wed, 23 May 2018 11:37:37 +0200
parents f06c86fd2ffd
children eb928f5728c4
comparison
equal deleted inserted replaced
3768:482195001997 3769:1bc4b0807c37
106 $ hg add a 106 $ hg add a
107 $ hg topic mytopic 107 $ hg topic mytopic
108 marked working directory as topic: mytopic 108 marked working directory as topic: mytopic
109 $ hg ci -m "Added a" 109 $ hg ci -m "Added a"
110 active topic 'mytopic' grew its first changeset 110 active topic 'mytopic' grew its first changeset
111 (see 'hg help topics' for more information)
111 112
112 $ hg up -r "desc('ROOT')" 113 $ hg up -r "desc('ROOT')"
113 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 114 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
114 $ touch default 115 $ touch default
115 $ hg add default 116 $ hg add default
169 $ hg add a 170 $ hg add a
170 $ hg topic mytopic 171 $ hg topic mytopic
171 marked working directory as topic: mytopic 172 marked working directory as topic: mytopic
172 $ hg ci -m "Added a" 173 $ hg ci -m "Added a"
173 active topic 'mytopic' grew its first changeset 174 active topic 'mytopic' grew its first changeset
175 (see 'hg help topics' for more information)
174 176
175 $ hg up -r "desc('ROOT')" 177 $ hg up -r "desc('ROOT')"
176 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 178 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
177 $ touch default 179 $ touch default
178 $ hg add default 180 $ hg add default
225 227
226 $ touch A 228 $ touch A
227 $ hg add A 229 $ hg add A
228 $ hg commit -m "Add A" --config devel.randomseed=42 230 $ hg commit -m "Add A" --config devel.randomseed=42
229 active topic 'panoramic-antelope' grew its first changeset 231 active topic 'panoramic-antelope' grew its first changeset
232 (see 'hg help topics' for more information)
230 233
231 $ hg up -r "desc(ROOT)" 234 $ hg up -r "desc(ROOT)"
232 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 235 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
233 236
234 $ touch B 237 $ touch B
235 $ hg add B 238 $ hg add B
236 $ hg commit -m "Add B" --config devel.randomseed=128 239 $ hg commit -m "Add B" --config devel.randomseed=128
237 active topic 'various-dove' grew its first changeset 240 active topic 'various-dove' grew its first changeset
241 (see 'hg help topics' for more information)
238 242
239 Test a merge too 243 Test a merge too
240 244
241 $ hg phase --public -r . 245 $ hg phase --public -r .
242 active topic 'various-dove' is now empty 246 active topic 'various-dove' is now empty
286 290
287 $ touch A 291 $ touch A
288 $ hg add A 292 $ hg add A
289 $ hg commit -m "Add A" --config devel.randomseed=42 293 $ hg commit -m "Add A" --config devel.randomseed=42
290 active topic 'panoramic-antelope' grew its first changeset 294 active topic 'panoramic-antelope' grew its first changeset
295 (see 'hg help topics' for more information)
291 296
292 $ hg up -r "desc(ROOT)" 297 $ hg up -r "desc(ROOT)"
293 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 298 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
294 299
295 $ touch B 300 $ touch B
296 $ hg add B 301 $ hg add B
297 $ hg commit -m "Add B" --config devel.randomseed=128 302 $ hg commit -m "Add B" --config devel.randomseed=128
298 active topic 'various-dove' grew its first changeset 303 active topic 'various-dove' grew its first changeset
304 (see 'hg help topics' for more information)
299 305
300 Test a merge too 306 Test a merge too
301 307
302 $ hg phase --public -r . 308 $ hg phase --public -r .
303 active topic 'various-dove' is now empty 309 active topic 'various-dove' is now empty
326 $ hg merge panoramic-antelope 332 $ hg merge panoramic-antelope
327 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 333 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
328 (branch merge, don't forget to commit) 334 (branch merge, don't forget to commit)
329 $ hg ci -m 'merge' --config devel.randomseed=1337 335 $ hg ci -m 'merge' --config devel.randomseed=1337
330 active topic 'omniscient-locust' grew its first changeset 336 active topic 'omniscient-locust' grew its first changeset
337 (see 'hg help topics' for more information)