comparison tests/test-topic.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 4aabc5c8b2af
children eb928f5728c4
comparison
equal deleted inserted replaced
3768:482195001997 3769:1bc4b0807c37
276 Add commits to topic 276 Add commits to topic
277 277
278 $ echo topic work >> alpha 278 $ echo topic work >> alpha
279 $ hg ci -m 'start on narf' 279 $ hg ci -m 'start on narf'
280 active topic 'narf' grew its first changeset 280 active topic 'narf' grew its first changeset
281 (see 'hg help topics' for more information)
281 $ hg co .^ 282 $ hg co .^
282 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 283 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
283 $ hg topic fran 284 $ hg topic fran
284 marked working directory as topic: fran 285 marked working directory as topic: fran
285 $ hg topics 286 $ hg topics
288 $ hg topics --current 289 $ hg topics --current
289 fran 290 fran
290 $ echo >> fran work >> beta 291 $ echo >> fran work >> beta
291 $ hg ci -m 'start on fran' 292 $ hg ci -m 'start on fran'
292 active topic 'fran' grew its first changeset 293 active topic 'fran' grew its first changeset
294 (see 'hg help topics' for more information)
293 $ hg co narf 295 $ hg co narf
294 switching to topic narf 296 switching to topic narf
295 2 files updated, 0 files merged, 0 files removed, 0 files unresolved 297 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
296 $ hg topic 298 $ hg topic
297 fran (1 changesets) 299 fran (1 changesets)
445 $ echo what >> alpha 447 $ echo what >> alpha
446 $ hg topic query 448 $ hg topic query
447 marked working directory as topic: query 449 marked working directory as topic: query
448 $ hg ci -m 'what is narf, pinky?' 450 $ hg ci -m 'what is narf, pinky?'
449 active topic 'query' grew its first changeset 451 active topic 'query' grew its first changeset
452 (see 'hg help topics' for more information)
450 $ hg log -Gl2 453 $ hg log -Gl2
451 @ changeset: 5:c01515cfc331 454 @ changeset: 5:c01515cfc331
452 | tag: tip 455 | tag: tip
453 | topic: query 456 | topic: query
454 | user: test 457 | user: test
830 833
831 $ hg add b 834 $ hg add b
832 $ hg topic topic1990 835 $ hg topic topic1990
833 $ hg ci -m "Added b" --config devel.default-date="631152000 0" --user "foo" 836 $ hg ci -m "Added b" --config devel.default-date="631152000 0" --user "foo"
834 active topic 'topic1990' grew its first changeset 837 active topic 'topic1990' grew its first changeset
838 (see 'hg help topics' for more information)
835 $ hg add c 839 $ hg add c
836 $ hg topic topic2010 840 $ hg topic topic2010
837 $ hg ci -m "Added c" --config devel.default-date="1262304000 0" --user "bar" 841 $ hg ci -m "Added c" --config devel.default-date="1262304000 0" --user "bar"
838 active topic 'topic2010' grew its first changeset 842 active topic 'topic2010' grew its first changeset
843 (see 'hg help topics' for more information)
839 844
840 $ hg log -G 845 $ hg log -G
841 @ changeset: 3:76b16af75125 846 @ changeset: 3:76b16af75125
842 | tag: tip 847 | tag: tip
843 | topic: topic2010 848 | topic: topic2010