view tests/test-tag @ 5323:29be4228303b

verify: report first bad changeset - add linkrev and file arguments to err - track lowest reported linkrev in err - find linkrev in a couple cases - sort linkrevs when reporting a bunch of errors against a file - tidy up lots of messages - make more robust against damaged indexes - report first bad changeset if an error is encountered
author Matt Mackall <mpm@selenic.com>
date Fri, 21 Sep 2007 17:18:06 -0500
parents 5fb8f5992a3d
children
line wrap: on
line source

#!/bin/sh

hg init
echo a > a
hg add a
hg commit -m "test" -d "1000000 0"
hg history
hg tag -d "1000000 0" "bleah"
hg history

echo foo >> .hgtags
hg tag -d "1000000 0" "bleah2" || echo "failed"
hg tag -d "1000000 0" -r 0 "bleah2" 1 || echo "failed"

hg revert .hgtags
hg tag -d "1000000 0" -r 0 "bleah0"
hg tag -l -d "1000000 0" "bleah1" 1

cat .hgtags
cat .hg/localtags

hg update 0
hg tag -d "1000000 0" "foobar"
cat .hgtags
cat .hg/localtags

hg tag -l 'xx
newline'
hg tag -l 'xx:xx'

echo % 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
hg tag -l localnewline
cat .hg/localtags

python << EOF
f = file('.hgtags'); last = f.readlines()[-1][:-1]; f.close()
f = file('.hgtags', 'w'); f.write(last); f.close()
EOF
hg ci -d '1000000 0' -m'broken manual edit of .hgtags'
cat .hgtags
hg tag -d '1000000 0' newline
cat .hgtags