Mercurial > evolve
comparison tests/test-topic.t @ 6319:8c664ed9c103
topic: use compat.InputError for invalid topic names
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Thu, 07 Apr 2022 20:28:11 +0300 |
parents | 3e488afe62f5 |
children | 0c780d972350 |
comparison
equal
deleted
inserted
replaced
6318:3e488afe62f5 | 6319:8c664ed9c103 |
---|---|
276 $ hg topic 12345 | 276 $ hg topic 12345 |
277 abort: cannot use an integer as a name | 277 abort: cannot use an integer as a name |
278 [10] | 278 [10] |
279 $ hg topic ' ' | 279 $ hg topic ' ' |
280 abort: topic names cannot consist entirely of whitespace | 280 abort: topic names cannot consist entirely of whitespace |
281 [255] | 281 [10] |
282 | 282 |
283 $ hg topic 'a12#45' | 283 $ hg topic 'a12#45' |
284 abort: invalid topic name: 'a12#45' | 284 abort: invalid topic name: 'a12#45' |
285 (topic names can only consist of alphanumeric, '-' '_' and '.' characters) | 285 (topic names can only consist of alphanumeric, '-' '_' and '.' characters) |
286 [255] | 286 [10] |
287 | 287 |
288 $ hg topic 'foo bar' | 288 $ hg topic 'foo bar' |
289 abort: invalid topic name: 'foo bar' | 289 abort: invalid topic name: 'foo bar' |
290 (topic names can only consist of alphanumeric, '-' '_' and '.' characters) | 290 (topic names can only consist of alphanumeric, '-' '_' and '.' characters) |
291 [255] | 291 [10] |
292 | 292 |
293 this is trying to list topic names | 293 this is trying to list topic names |
294 $ hg topic '' | 294 $ hg topic '' |
295 | 295 |
296 $ hg topic '*12 B23' | 296 $ hg topic '*12 B23' |
297 abort: invalid topic name: '*12 B23' | 297 abort: invalid topic name: '*12 B23' |
298 (topic names can only consist of alphanumeric, '-' '_' and '.' characters) | 298 (topic names can only consist of alphanumeric, '-' '_' and '.' characters) |
299 [255] | 299 [10] |
300 | 300 |
301 Test commit flag and help text | 301 Test commit flag and help text |
302 | 302 |
303 $ echo stuff >> alpha | 303 $ echo stuff >> alpha |
304 $ HGEDITOR=cat hg ci -t topicflag | 304 $ HGEDITOR=cat hg ci -t topicflag |
326 * \xc3\xa6 (0 changesets) (esc) | 326 * \xc3\xa6 (0 changesets) (esc) |
327 | 327 |
328 $ hg --encoding utf-8 topic © | 328 $ hg --encoding utf-8 topic © |
329 abort: invalid topic name: '\xc2\xa9' (esc) | 329 abort: invalid topic name: '\xc2\xa9' (esc) |
330 (topic names can only consist of alphanumeric, '-' '_' and '.' characters) | 330 (topic names can only consist of alphanumeric, '-' '_' and '.' characters) |
331 [255] | 331 [10] |
332 | 332 |
333 $ hg --encoding latin1 topic æ | 333 $ hg --encoding latin1 topic æ |
334 abort: invalid topic name: '\xc3\xa6' (esc) | 334 abort: invalid topic name: '\xc3\xa6' (esc) |
335 (topic names can only consist of alphanumeric, '-' '_' and '.' characters) | 335 (topic names can only consist of alphanumeric, '-' '_' and '.' characters) |
336 [255] | 336 [10] |
337 | 337 |
338 Make a topic | 338 Make a topic |
339 | 339 |
340 $ hg topic narf | 340 $ hg topic narf |
341 $ hg topics | 341 $ hg topics |