equal
deleted
inserted
replaced
88 hg tag -r 1 -f bar # rev 3 |
88 hg tag -r 1 -f bar # rev 3 |
89 hg up -C 1 |
89 hg up -C 1 |
90 echo >> foo |
90 echo >> foo |
91 hg ci -m 'change foo 2' # rev 4 |
91 hg ci -m 'change foo 2' # rev 4 |
92 hg tags |
92 hg tags |
|
93 hg tags # repeat in case of cache effects |
|
94 |
|
95 dumptags() { |
|
96 rev=$1 |
|
97 echo "rev $rev: .hgtags:" |
|
98 hg cat -r$rev .hgtags |
|
99 } |
|
100 |
|
101 echo "% detailed dump of tag info" |
|
102 echo "heads:" |
|
103 hg heads -q # expect 4, 3, 2 |
|
104 dumptags 2 |
|
105 dumptags 3 |
|
106 dumptags 4 |
|
107 echo ".hg/tags.cache:" |
|
108 [ -f .hg/tags.cache ] && cat .hg/tags.cache || echo "no such file" |
93 |
109 |
94 echo "% test tag removal" |
110 echo "% test tag removal" |
95 hg tag --remove bar # rev 5 |
111 hg tag --remove bar # rev 5 |
96 hg tip -vp |
112 hg tip -vp |
97 hg tags |
113 hg tags |
|
114 hg tags # again, try to expose cache bugs |
98 |
115 |
99 echo '% remove nonexistent tag' |
116 echo '% remove nonexistent tag' |
100 hg tag --remove foobar |
117 hg tag --remove foobar |
101 hg tip |
118 hg tip |
|
119 |
|
120 echo "% rollback undoes tag operation" |
|
121 hg rollback # destroy rev 5 (restore bar) |
|
122 hg tags |
|
123 hg tags |
102 |
124 |
103 echo "% test tag rank" |
125 echo "% test tag rank" |
104 cd .. |
126 cd .. |
105 hg init t3 |
127 hg init t3 |
106 cd t3 |
128 cd t3 |
119 hg tags |
141 hg tags |
120 |
142 |
121 echo "% don't allow moving tag without -f" |
143 echo "% don't allow moving tag without -f" |
122 hg tag -r 3 bar |
144 hg tag -r 3 bar |
123 hg tags |
145 hg tags |
|
146 |
|
147 echo "% strip 1: expose an old head" |
|
148 hg --config extensions.mq= strip 5 > /dev/null 2>&1 |
|
149 hg tags # partly stale cache |
|
150 hg tags # up-to-date cache |
|
151 echo "% strip 2: destroy whole branch, no old head exposed" |
|
152 hg --config extensions.mq= strip 4 > /dev/null 2>&1 |
|
153 hg tags # partly stale |
|
154 rm -f .hg/tags.cache |
|
155 hg tags # cold cache |
124 |
156 |
125 echo "% test tag rank with 3 heads" |
157 echo "% test tag rank with 3 heads" |
126 cd .. |
158 cd .. |
127 hg init t4 |
159 hg init t4 |
128 cd t4 |
160 cd t4 |