comparison tests/test-topic.t @ 6391:9a41c3c293ae mercurial-6.0

test-compat: merge mercurial-6.1 into mercurial-6.0
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 06 Feb 2023 18:38:36 +0400
parents 4feea1ecde1c 0c780d972350
children faea18a26188 cc688e806f56
comparison
equal deleted inserted replaced
6345:6ab7c7964ad3 6391:9a41c3c293ae
252 $ hg topics --current 252 $ hg topics --current
253 no active topic 253 no active topic
254 [1] 254 [1]
255 $ hg topics --current somerandomtopic 255 $ hg topics --current somerandomtopic
256 abort: cannot use --current when setting a topic 256 abort: cannot use --current when setting a topic
257 [255] 257 [10]
258 $ hg topics --current --clear 258 $ hg topics --current --clear
259 abort: cannot use --current and --clear 259 abort: cannot use --current and --clear
260 [255] 260 [10]
261 $ hg topics --clear somerandomtopic 261 $ hg topics --clear somerandomtopic
262 abort: cannot use --clear when setting a topic 262 abort: cannot use --clear when setting a topic
263 [255] 263 [10]
264 $ hg topics --list --clear
265 abort: cannot specify both --list and --clear
266 [10]
264 267
265 Trying some invalid topicnames 268 Trying some invalid topicnames
266 269
267 $ hg topic '.' 270 $ hg topic '.'
268 abort: the name '.' is reserved 271 abort: the name '.' is reserved
275 [10] 278 [10]
276 $ hg topic 12345 279 $ hg topic 12345
277 abort: cannot use an integer as a name 280 abort: cannot use an integer as a name
278 [10] 281 [10]
279 $ hg topic ' ' 282 $ hg topic ' '
280 abort: topic name cannot consist entirely of whitespaces 283 abort: topic names cannot consist entirely of whitespace
281 [255] 284 [10]
282 285
283 $ hg topic 'a12#45' 286 $ hg topic 'a12#45'
284 abort: invalid topic name: 'a12#45' 287 abort: invalid topic name: 'a12#45'
285 (topic names can only consist of alphanumeric, '-' '_' and '.' characters) 288 (topic names can only consist of alphanumeric, '-' '_' and '.' characters)
286 [255] 289 [10]
287 290
288 $ hg topic 'foo bar' 291 $ hg topic 'foo bar'
289 abort: invalid topic name: 'foo bar' 292 abort: invalid topic name: 'foo bar'
290 (topic names can only consist of alphanumeric, '-' '_' and '.' characters) 293 (topic names can only consist of alphanumeric, '-' '_' and '.' characters)
291 [255] 294 [10]
292 295
293 this is trying to list topic names 296 this is trying to list topic names
294 $ hg topic '' 297 $ hg topic ''
295 298
296 $ hg topic '*12 B23' 299 $ hg topic '*12 B23'
297 abort: invalid topic name: '*12 B23' 300 abort: invalid topic name: '*12 B23'
298 (topic names can only consist of alphanumeric, '-' '_' and '.' characters) 301 (topic names can only consist of alphanumeric, '-' '_' and '.' characters)
299 [255] 302 [10]
300 303
301 Test commit flag and help text 304 Test commit flag and help text
302 305
303 $ echo stuff >> alpha 306 $ echo stuff >> alpha
304 $ HGEDITOR=cat hg ci -t topicflag 307 $ HGEDITOR=cat hg ci -t topicflag
314 abort: empty commit message 317 abort: empty commit message
315 [10] 318 [10]
316 $ hg revert alpha 319 $ hg revert alpha
317 $ hg topic 320 $ hg topic
318 * topicflag (0 changesets) 321 * topicflag (0 changesets)
322
323 Non-ascii topic name
324
325 $ hg --encoding utf-8 topic æ
326 $ hg topics
327 * \xc3\xa6 (0 changesets) (esc)
328 $ hg --encoding latin1 topics
329 * \xc3\xa6 (0 changesets) (esc)
330
331 $ hg --encoding utf-8 topic ©
332 abort: invalid topic name: '\xc2\xa9' (esc)
333 (topic names can only consist of alphanumeric, '-' '_' and '.' characters)
334 [10]
335
336 $ hg --encoding latin1 topic æ
337 abort: invalid topic name: '\xc3\xa6' (esc)
338 (topic names can only consist of alphanumeric, '-' '_' and '.' characters)
339 [10]
319 340
320 Make a topic 341 Make a topic
321 342
322 $ hg topic narf 343 $ hg topic narf
323 $ hg topics 344 $ hg topics
579 $ hg ci -m 'Finish narf' 600 $ hg ci -m 'Finish narf'
580 $ hg topics 601 $ hg topics
581 fran (1 changesets) 602 fran (1 changesets)
582 * narf (2 changesets) 603 * narf (2 changesets)
583 query (2 changesets) 604 query (2 changesets)
584 $ hg debugnamecomplete # branch:topic here is a buggy side effect 605 $ hg debugnamecomplete
585 default 606 default
586 default:fran 607 default//fran
587 default:narf 608 default//narf
588 default:query 609 default//query
589 fran 610 fran
590 narf 611 narf
591 query 612 query
592 tip 613 tip
593 $ hg phase --public narf 614 $ hg phase --public narf
1134 topic1990 (1990-01-01 by foo, 1 changesets) 1155 topic1990 (1990-01-01 by foo, 1 changesets)
1135 * topic1970 (1970-01-01 by test, 1 changesets) 1156 * topic1970 (1970-01-01 by test, 1 changesets)
1136 1157
1137 $ hg topics --age random 1158 $ hg topics --age random
1138 abort: cannot use --age while setting a topic 1159 abort: cannot use --age while setting a topic
1139 [255] 1160 [10]
1140 $ cd .. 1161 $ cd ..
1141 1162
1142 Test that topics doesn't confuse branchheads checking logic 1163 Test that topics doesn't confuse branchheads checking logic
1143 ----------------------------------------------------------- 1164 -----------------------------------------------------------
1144 1165