view tests/test-tags @ 2081:416d8b2a75b8

Speedup revlog.ancestors for the linear case revlog.ancestors can be expensive on big repos. This cuts down the overall time for hg update by ~19% by short cutting revlog.ancestors when one of the revisions is reachable from another.
author Chris Mason <mason@suse.com>
date Thu, 06 Apr 2006 20:13:09 -0400
parents 719cf07b076d
children e506c14382fd
line wrap: on
line source

#!/bin/sh

mkdir t
cd t
hg init
hg id
echo a > a
hg add a
hg commit -m "test" -d "1000000 0"
hg co
hg identify
T=`hg tip -v | head -n 1 | cut -d : -f 3`
echo "$T first" > .hgtags
cat .hgtags
hg add .hgtags
hg commit -m "add tags" -d "1000000 0"
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
hg commit -m "branch" -d "1000000 0"
hg id
hg co -m 1
hg id
hg status

hg commit -m "merge" -d "1000000 0"
# 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"
hg tags
hg tip