##// END OF EJS Templates
tags: require -f to replace an existing tag...
tags: require -f to replace an existing tag based on a patch from Johan Herland <johherla@online.no>

File last commit:

r4267:8185a1ca default
r4267:8185a1ca default
Show More
test-tags
106 lines | 2.0 KiB | text/plain | TextLexer
Thomas Arendsen Hein
Remove bashisms and use /bin/sh instead of /bin/bash....
r544 #!/bin/sh
mpm@selenic.com
Add a tags/identify test group...
r345
mkdir t
cd t
hg init
hg id
echo a > a
hg add a
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "test" -d "1000000 0"
mpm@selenic.com
Add a tags/identify test group...
r345 hg co
hg identify
Matt Mackall
Only show long hashes with --debug, not --verbose
r2966 T=`hg tip --debug | head -n 1 | cut -d : -f 3`
Thomas Arendsen Hein
Don't truncate tag and branch names after 30 chars (introduced 73860ffbe798)...
r4143 hg tag -l "This is a local tag with a really long name!"
hg tags
rm .hg/localtags
mpm@selenic.com
Add a tags/identify test group...
r345 echo "$T first" > .hgtags
cat .hgtags
hg add .hgtags
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "add tags" -d "1000000 0"
mpm@selenic.com
Add a tags/identify test group...
r345 hg tags
hg identify
echo bb > a
hg status
hg identify
hg co first
hg id
hg -v id
hg status
echo 1 > b
hg add b
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "branch" -d "1000000 0"
mpm@selenic.com
Add a tags/identify test group...
r345 hg id
Vadim Gelfer
deprecate 'update -m'. use 'merge' instead.
r2283 hg merge 1
mpm@selenic.com
Add a tags/identify test group...
r345 hg id
hg status
Benoit Boissinot
add checking for invalid entries in tag files...
r1986 hg commit -m "merge" -d "1000000 0"
Vadim Gelfer
fix parsing of tags. make parse errors useful. add new tag tests....
r2320
# create fake head, make sure tag not visible afterwards
cp .hgtags tags
hg tag -d "1000000 0" last
hg rm .hgtags
hg commit -m "remove" -d "1000000 0"
mv tags .hgtags
hg add .hgtags
hg commit -m "readd" -d "1000000 0"
hg tags
Benoit Boissinot
add checking for invalid entries in tag files...
r1986 # invalid tags
echo "spam" >> .hgtags
echo >> .hgtags
echo "foo bar" >> .hgtags
echo "$T invalid" | sed "s/..../a5a5/" >> .hg/localtags
hg commit -m "tags" -d "1000000 0"
Vadim Gelfer
fix parsing of tags. make parse errors useful. add new tag tests....
r2320
# report tag parse error on other head
hg up 3
echo 'x y' >> .hgtags
hg commit -m "head" -d "1000000 0"
Benoit Boissinot
add checking for invalid entries in tag files...
r1986 hg tags
hg tip
Matt Mackall
Make the tags algorithm smarter
r4211 # test tag precedence rules
Alexis S. L. Carvalho
Correct optimization from 3464f5e77f34; add a test....
r3577 cd ..
hg init t2
cd t2
echo foo > foo
hg add foo
hg ci -m 'add foo' -d '1000000 0' # rev 0
hg tag -d '1000000 0' bar # rev 1
echo >> foo
hg ci -m 'change foo 1' -d '1000000 0' # rev 2
hg up -C 1
Matt Mackall
tags: require -f to replace an existing tag...
r4267 hg tag -r 1 -d '1000000 0' -f bar # rev 3
Alexis S. L. Carvalho
Correct optimization from 3464f5e77f34; add a test....
r3577 hg up -C 1
echo >> foo
hg ci -m 'change foo 2' -d '1000000 0' # rev 4
hg tags
Matt Mackall
tags: add --remove
r4213
Matt Mackall
tags: fix abababa case, with test case
r4266 # test tag removal
Matt Mackall
tags: add --remove
r4213 hg tag --remove -d '1000000 0' bar
hg tip
hg tags
Matt Mackall
tags: fix abababa case, with test case
r4266
# test tag rank
cd ..
hg init t3
cd t3
echo foo > foo
hg add foo
Matt Mackall
tags: require -f to replace an existing tag...
r4267 hg ci -m 'add foo' -d '1000000 0' # rev 0
hg tag -d '1000000 0' -f bar # rev 1 bar -> 0
hg tag -d '1000000 0' -f bar # rev 2 bar -> 1
hg tag -d '1000000 0' -fr 0 bar # rev 3 bar -> 0
hg tag -d '1000000 0' -fr 1 bar # rev 3 bar -> 1
hg tag -d '1000000 0' -fr 0 bar # rev 4 bar -> 0
Matt Mackall
tags: fix abababa case, with test case
r4266 hg tags
hg co 3
echo barbar > foo
Matt Mackall
tags: require -f to replace an existing tag...
r4267 hg ci -m 'change foo' -d '1000000 0' # rev 0
Matt Mackall
tags: fix abababa case, with test case
r4266 hg tags
Matt Mackall
tags: require -f to replace an existing tag...
r4267
hg tag -d '1000000 0' -r 3 bar # should complain
hg tags