comparison tests/test-topic-change.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 031d70bcbb42
children d00f0c369bc7 d5a2cc19903f
comparison
equal deleted inserted replaced
3768:482195001997 3769:1bc4b0807c37
136 Changing topic using --current flag 136 Changing topic using --current flag
137 137
138 $ hg topic foobar 138 $ hg topic foobar
139 $ hg topic -r . --current 139 $ hg topic -r . --current
140 active topic 'foobar' grew its first changeset 140 active topic 'foobar' grew its first changeset
141 (see 'hg help topics' for more information)
141 changed topic on 1 changes 142 changed topic on 1 changes
142 $ hg glog -r . 143 $ hg glog -r .
143 @ 20:c2d6b7df5dcf {foobar} 144 @ 20:c2d6b7df5dcf {foobar}
144 | Added h () 145 | Added h ()
145 | 146 |
221 When the changeset has a topic and we have different active topic 222 When the changeset has a topic and we have different active topic
222 223
223 $ hg topic wat 224 $ hg topic wat
224 $ hg ci --amend 225 $ hg ci --amend
225 active topic 'wat' grew its first changeset 226 active topic 'wat' grew its first changeset
227 (see 'hg help topics' for more information)
226 $ hg glog -r . 228 $ hg glog -r .
227 @ 28:61470c956807 {wat} 229 @ 28:61470c956807 {wat}
228 | Added h () 230 | Added h ()
229 | 231 |
230 232
241 243
242 $ hg topic watwat 244 $ hg topic watwat
243 marked working directory as topic: watwat 245 marked working directory as topic: watwat
244 $ hg ci --amend 246 $ hg ci --amend
245 active topic 'watwat' grew its first changeset 247 active topic 'watwat' grew its first changeset
248 (see 'hg help topics' for more information)
246 $ hg glog -r . 249 $ hg glog -r .
247 @ 30:a24c31c35013 {watwat} 250 @ 30:a24c31c35013 {watwat}
248 | Added h () 251 | Added h ()
249 | 252 |
250 253