comparison tests/test-tag.t @ 50087:4fc6b423fa97 stable

tag: disallow tagging the working directory It's kinda silly, but a clear error message is better than a stacktrace about subscripting `None` when trying to generate the default commit message. I'm surprised that `.revsingle(..).node()` returns None instead of `nodemod.wdirid`, but now there's a test to catch if this changes.
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 14 Feb 2023 11:56:02 -0500
parents 768056549737
children
comparison
equal deleted inserted replaced
50078:983e2db18d67 50087:4fc6b423fa97
408 abort: cannot tag null revision 408 abort: cannot tag null revision
409 [10] 409 [10]
410 410
411 $ hg tag -R empty -r 00000000000 -f nulltag 411 $ hg tag -R empty -r 00000000000 -f nulltag
412 abort: cannot tag null revision 412 abort: cannot tag null revision
413 [10]
414
415 $ hg tag -R empty -r "wdir()" -f wdirtag
416 abort: cannot tag working directory
413 [10] 417 [10]
414 418
415 issue5539: pruned tags do not appear in .hgtags 419 issue5539: pruned tags do not appear in .hgtags
416 420
417 $ cat >> $HGRCPATH << EOF 421 $ cat >> $HGRCPATH << EOF