##// END OF EJS Templates
tests: add exit codes to unified tests
tests: add exit codes to unified tests

File last commit:

r12316:4134686b default
r12316:4134686b default
Show More
test-tag.t
197 lines | 5.4 KiB | text/troff | Tads3Lexer
Nicolas Dumazet
tests: unify test-tag
r11788 $ hg init test
$ cd test
$ echo a > a
$ hg add a
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -m "test"
Nicolas Dumazet
tests: unify test-tag
r11788 $ hg history
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 0:acb14030fe0a
Nicolas Dumazet
tests: unify test-tag
r11788 tag: tip
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-tag
r11788 summary: test
$ hg tag ' '
abort: tag names cannot consist entirely of whitespace
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Nicolas Dumazet
tests: unify test-tag
r11788
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg tag "bleah"
Nicolas Dumazet
tests: unify test-tag
r11788 $ hg history
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 1:d4f0d2909abc
Nicolas Dumazet
tests: unify test-tag
r11788 tag: tip
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag bleah for changeset acb14030fe0a
Nicolas Dumazet
tests: unify test-tag
r11788
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 0:acb14030fe0a
Nicolas Dumazet
tests: unify test-tag
r11788 tag: bleah
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-tag
r11788 summary: test
$ echo foo >> .hgtags
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg tag "bleah2" || echo "failed"
Nicolas Dumazet
tests: unify test-tag
r11788 abort: working copy of .hgtags is changed (please commit .hgtags manually)
failed
$ hg revert .hgtags
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg tag -r 0 x y z y y z || echo "failed"
Nicolas Dumazet
tests: unify test-tag
r11788 abort: tag names must be unique
failed
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg tag tap nada dot tip null . || echo "failed"
Nicolas Dumazet
tests: unify test-tag
r11788 abort: the name 'tip' is reserved
failed
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg tag "bleah" || echo "failed"
Nicolas Dumazet
tests: unify test-tag
r11788 abort: tag 'bleah' already exists (use -f to force)
failed
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg tag "blecch" "bleah" || echo "failed"
Nicolas Dumazet
tests: unify test-tag
r11788 abort: tag 'bleah' already exists (use -f to force)
failed
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg tag --remove "blecch" || echo "failed"
Nicolas Dumazet
tests: unify test-tag
r11788 abort: tag 'blecch' does not exist
failed
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg tag --remove "bleah" "blecch" "blough" || echo "failed"
Nicolas Dumazet
tests: unify test-tag
r11788 abort: tag 'blecch' does not exist
failed
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg tag -r 0 "bleah0"
$ hg tag -l -r 1 "bleah1"
$ hg tag gack gawk gorp
$ hg tag -f gack
$ hg tag --remove gack gorp
Nicolas Dumazet
tests: unify test-tag
r11788
$ cat .hgtags
Martin Geisler
tests: remove unneeded -d flags...
r12156 acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
336fccc858a4eb69609a291105009e484a6b6b8d gack
336fccc858a4eb69609a291105009e484a6b6b8d gawk
336fccc858a4eb69609a291105009e484a6b6b8d gorp
336fccc858a4eb69609a291105009e484a6b6b8d gack
799667b6f2d9b957f73fa644a918c2df22bab58f gack
799667b6f2d9b957f73fa644a918c2df22bab58f gack
Nicolas Dumazet
tests: unify test-tag
r11788 0000000000000000000000000000000000000000 gack
Martin Geisler
tests: remove unneeded -d flags...
r12156 336fccc858a4eb69609a291105009e484a6b6b8d gorp
Nicolas Dumazet
tests: unify test-tag
r11788 0000000000000000000000000000000000000000 gorp
$ cat .hg/localtags
Martin Geisler
tests: remove unneeded -d flags...
r12156 d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
Nicolas Dumazet
tests: unify test-tag
r11788
$ hg update 0
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg tag "foobar"
Nicolas Dumazet
tests: unify test-tag
r11788 $ cat .hgtags
Martin Geisler
tests: remove unneeded -d flags...
r12156 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
Nicolas Dumazet
tests: unify test-tag
r11788 $ cat .hg/localtags
Martin Geisler
tests: remove unneeded -d flags...
r12156 d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
Nicolas Dumazet
tests: unify test-tag
r11788
$ hg tag -l 'xx
> newline'
abort: '\n' cannot be used in a tag name
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Nicolas Dumazet
tests: unify test-tag
r11788 $ hg tag -l 'xx:xx'
abort: ':' cannot be used in a tag name
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Nicolas Dumazet
tests: unify test-tag
r11788
cloning local tags
$ cd ..
$ hg -R test log -r0:5
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 0:acb14030fe0a
Nicolas Dumazet
tests: unify test-tag
r11788 tag: bleah
tag: bleah0
tag: foobar
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-tag
r11788 summary: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 1:d4f0d2909abc
Nicolas Dumazet
tests: unify test-tag
r11788 tag: bleah1
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag bleah for changeset acb14030fe0a
Nicolas Dumazet
tests: unify test-tag
r11788
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 2:336fccc858a4
Nicolas Dumazet
tests: unify test-tag
r11788 tag: gawk
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag bleah0 for changeset acb14030fe0a
Nicolas Dumazet
tests: unify test-tag
r11788
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 3:799667b6f2d9
Nicolas Dumazet
tests: unify test-tag
r11788 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag gack, gawk, gorp for changeset 336fccc858a4
Nicolas Dumazet
tests: unify test-tag
r11788
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 4:154eeb7c0138
Nicolas Dumazet
tests: unify test-tag
r11788 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag gack for changeset 799667b6f2d9
Nicolas Dumazet
tests: unify test-tag
r11788
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 5:b4bb47aaff09
Nicolas Dumazet
tests: unify test-tag
r11788 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-tag
r11788 summary: Removed tag gack, gorp
$ hg clone -q -rbleah1 test test1
$ hg -R test1 parents --style=compact
Martin Geisler
tests: remove unneeded -d flags...
r12156 1[tip] d4f0d2909abc 1970-01-01 00:00 +0000 test
Added tag bleah for changeset acb14030fe0a
Nicolas Dumazet
tests: unify test-tag
r11788
$ hg clone -q -r5 test#bleah1 test2
$ hg -R test2 parents --style=compact
Martin Geisler
tests: remove unneeded -d flags...
r12156 5[tip] b4bb47aaff09 1970-01-01 00:00 +0000 test
Nicolas Dumazet
tests: unify test-tag
r11788 Removed tag gack, gorp
$ hg clone -q -U test#bleah1 test3
$ hg -R test3 parents --style=compact
$ cd test
issue 601
$ python << EOF
> f = file('.hg/localtags'); last = f.readlines()[-1][:-1]; f.close()
> f = file('.hg/localtags', 'w'); f.write(last); f.close()
> EOF
$ cat .hg/localtags; echo
Martin Geisler
tests: remove unneeded -d flags...
r12156 d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
Nicolas Dumazet
tests: unify test-tag
r11788 $ hg tag -l localnewline
$ cat .hg/localtags; echo
Martin Geisler
tests: remove unneeded -d flags...
r12156 d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
c2899151f4e76890c602a2597a650a72666681bf localnewline
Nicolas Dumazet
tests: unify test-tag
r11788
$ python << EOF
> f = file('.hgtags'); last = f.readlines()[-1][:-1]; f.close()
> f = file('.hgtags', 'w'); f.write(last); f.close()
> EOF
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg ci -m'broken manual edit of .hgtags'
Nicolas Dumazet
tests: unify test-tag
r11788 $ cat .hgtags; echo
Martin Geisler
tests: remove unneeded -d flags...
r12156 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
$ hg tag newline
Nicolas Dumazet
tests: unify test-tag
r11788 $ cat .hgtags; echo
Martin Geisler
tests: remove unneeded -d flags...
r12156 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
a0eea09de1eeec777b46f2085260a373b2fbc293 newline
Nicolas Dumazet
tests: unify test-tag
r11788
tag and branch using same name
$ hg branch tag-and-branch-same-name
marked working directory as branch tag-and-branch-same-name
$ hg ci -m"discouraged"
$ hg tag tag-and-branch-same-name
warning: tag tag-and-branch-same-name conflicts with existing branch name
test custom commit messages
$ cat > $HGTMP/editor <<'__EOF__'
> #!/bin/sh
> echo "custom tag message" > "$1"
> echo "second line" >> "$1"
> __EOF__
$ chmod +x "$HGTMP"/editor
$ HGEDITOR="'$HGTMP'"/editor hg tag custom-tag -e
$ hg log -l1 --template "{desc}\n"
custom tag message
second line