Show More
@@ -90,16 +90,38 b' 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 | |
102 |
|
119 | |||
|
120 | echo "% rollback undoes tag operation" | |||
|
121 | hg rollback # destroy rev 5 (restore bar) | |||
|
122 | hg tags | |||
|
123 | hg tags | |||
|
124 | ||||
103 | echo "% test tag rank" |
|
125 | echo "% test tag rank" | |
104 | cd .. |
|
126 | cd .. | |
105 | hg init t3 |
|
127 | hg init t3 | |
@@ -122,6 +144,16 b' echo "% don\'t allow moving tag without -' | |||||
122 | hg tag -r 3 bar |
|
144 | hg tag -r 3 bar | |
123 | hg tags |
|
145 | hg tags | |
124 |
|
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 | |||
|
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 |
@@ -57,6 +57,23 b' 1 files updated, 0 files merged, 0 files' | |||||
57 | created new head |
|
57 | created new head | |
58 | tip 4:0c192d7d5e6b |
|
58 | tip 4:0c192d7d5e6b | |
59 | bar 1:78391a272241 |
|
59 | bar 1:78391a272241 | |
|
60 | tip 4:0c192d7d5e6b | |||
|
61 | bar 1:78391a272241 | |||
|
62 | % detailed dump of tag info | |||
|
63 | heads: | |||
|
64 | 4:0c192d7d5e6b | |||
|
65 | 3:6fa450212aeb | |||
|
66 | 2:7a94127795a3 | |||
|
67 | rev 2: .hgtags: | |||
|
68 | bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar | |||
|
69 | rev 3: .hgtags: | |||
|
70 | bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar | |||
|
71 | bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar | |||
|
72 | 78391a272241d70354aa14c874552cad6b51bb42 bar | |||
|
73 | rev 4: .hgtags: | |||
|
74 | bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar | |||
|
75 | .hg/tags.cache: | |||
|
76 | no such file | |||
60 | % test tag removal |
|
77 | % test tag removal | |
61 | changeset: 5:5f6e8655b1c7 |
|
78 | changeset: 5:5f6e8655b1c7 | |
62 | tag: tip |
|
79 | tag: tip | |
@@ -76,6 +93,7 b' diff -r 0c192d7d5e6b -r 5f6e8655b1c7 .hg' | |||||
76 | +0000000000000000000000000000000000000000 bar |
|
93 | +0000000000000000000000000000000000000000 bar | |
77 |
|
94 | |||
78 | tip 5:5f6e8655b1c7 |
|
95 | tip 5:5f6e8655b1c7 | |
|
96 | tip 5:5f6e8655b1c7 | |||
79 | % remove nonexistent tag |
|
97 | % remove nonexistent tag | |
80 | abort: tag 'foobar' does not exist |
|
98 | abort: tag 'foobar' does not exist | |
81 | changeset: 5:5f6e8655b1c7 |
|
99 | changeset: 5:5f6e8655b1c7 | |
@@ -84,6 +102,12 b' user: test' | |||||
84 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
102 | date: Thu Jan 01 00:00:00 1970 +0000 | |
85 | summary: Removed tag bar |
|
103 | summary: Removed tag bar | |
86 |
|
104 | |||
|
105 | % rollback undoes tag operation | |||
|
106 | rolling back last transaction | |||
|
107 | tip 4:0c192d7d5e6b | |||
|
108 | bar 1:78391a272241 | |||
|
109 | tip 4:0c192d7d5e6b | |||
|
110 | bar 1:78391a272241 | |||
87 | % test tag rank |
|
111 | % test tag rank | |
88 | tip 5:85f05169d91d |
|
112 | tip 5:85f05169d91d | |
89 | bar 0:bbd179dfa0a7 |
|
113 | bar 0:bbd179dfa0a7 | |
@@ -95,6 +119,16 b' bar 0:bbd' | |||||
95 | abort: tag 'bar' already exists (use -f to force) |
|
119 | abort: tag 'bar' already exists (use -f to force) | |
96 | tip 6:735c3ca72986 |
|
120 | tip 6:735c3ca72986 | |
97 | bar 0:bbd179dfa0a7 |
|
121 | bar 0:bbd179dfa0a7 | |
|
122 | % strip 1: expose an old head | |||
|
123 | tip 5:735c3ca72986 | |||
|
124 | bar 1:78391a272241 | |||
|
125 | tip 5:735c3ca72986 | |||
|
126 | bar 1:78391a272241 | |||
|
127 | % strip 2: destroy whole branch, no old head exposed | |||
|
128 | tip 4:735c3ca72986 | |||
|
129 | bar 0:bbd179dfa0a7 | |||
|
130 | tip 4:735c3ca72986 | |||
|
131 | bar 0:bbd179dfa0a7 | |||
98 | % test tag rank with 3 heads |
|
132 | % test tag rank with 3 heads | |
99 | adding foo |
|
133 | adding foo | |
100 | tip 3:197c21bbbf2c |
|
134 | tip 3:197c21bbbf2c |
General Comments 0
You need to be logged in to leave comments.
Login now