Mercurial > hg
annotate tests/test-tags.t @ 21466:3b1ec3d4ece6
basectx: add _manifestmatches method
This method is a duplicate of localrepo.mfmatches and sets the stage for
factoring localrepo.status into a context method that will be customizable
based on inheritance and object type.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Wed, 23 Apr 2014 20:52:10 -0500 |
parents | 335a558f81dc |
children | f5de208a635c |
rev | line source |
---|---|
11744 | 1 Helper functions: |
2 | |
3 $ cacheexists() { | |
13272
5ccdca7df211
move tags.cache and branchheads.cache to a collected cache folder .hg/cache/
jfh <jason@jasonfharris.com>
parents:
12763
diff
changeset
|
4 > [ -f .hg/cache/tags ] && echo "tag cache exists" || echo "no tag cache" |
11744 | 5 > } |
345 | 6 |
11744 | 7 $ dumptags() { |
8 > rev=$1 | |
9 > echo "rev $rev: .hgtags:" | |
10 > hg cat -r$rev .hgtags | |
11 > } | |
9151
f528d1a93491
tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
9144
diff
changeset
|
12 |
9152
4017291c4c48
tags: support 'instant' tag retrieval (issue548)
Greg Ward <greg-hg@gerg.ca>
parents:
9151
diff
changeset
|
13 # XXX need to test that the tag cache works when we strip an old head |
4017291c4c48
tags: support 'instant' tag retrieval (issue548)
Greg Ward <greg-hg@gerg.ca>
parents:
9151
diff
changeset
|
14 # and add a new one rooted off non-tip: i.e. node and rev of tip are the |
4017291c4c48
tags: support 'instant' tag retrieval (issue548)
Greg Ward <greg-hg@gerg.ca>
parents:
9151
diff
changeset
|
15 # same, but stuff has changed behind tip. |
4017291c4c48
tags: support 'instant' tag retrieval (issue548)
Greg Ward <greg-hg@gerg.ca>
parents:
9151
diff
changeset
|
16 |
11744 | 17 Setup: |
9143
a604c98dbf62
test-tags: clarify test output; simplify test script a bit (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
5658
diff
changeset
|
18 |
11744 | 19 $ hg init t |
20 $ cd t | |
21 $ cacheexists | |
22 no tag cache | |
23 $ hg id | |
24 000000000000 tip | |
25 $ cacheexists | |
26 no tag cache | |
27 $ echo a > a | |
28 $ hg add a | |
29 $ hg commit -m "test" | |
30 $ hg co | |
31 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
32 $ hg identify | |
33 acb14030fe0a tip | |
34 $ cacheexists | |
35 tag cache exists | |
36 | |
12758
2d754eae430c
tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12640
diff
changeset
|
37 Try corrupting the cache |
2d754eae430c
tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12640
diff
changeset
|
38 |
13272
5ccdca7df211
move tags.cache and branchheads.cache to a collected cache folder .hg/cache/
jfh <jason@jasonfharris.com>
parents:
12763
diff
changeset
|
39 $ printf 'a b' > .hg/cache/tags |
12758
2d754eae430c
tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12640
diff
changeset
|
40 $ hg identify |
13272
5ccdca7df211
move tags.cache and branchheads.cache to a collected cache folder .hg/cache/
jfh <jason@jasonfharris.com>
parents:
12763
diff
changeset
|
41 .hg/cache/tags is corrupt, rebuilding it |
12758
2d754eae430c
tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12640
diff
changeset
|
42 acb14030fe0a tip |
2d754eae430c
tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12640
diff
changeset
|
43 $ cacheexists |
2d754eae430c
tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12640
diff
changeset
|
44 tag cache exists |
2d754eae430c
tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12640
diff
changeset
|
45 $ hg identify |
2d754eae430c
tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12640
diff
changeset
|
46 acb14030fe0a tip |
2d754eae430c
tags: do not fail if tags.cache is corrupted (issue2444)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
12640
diff
changeset
|
47 |
11744 | 48 Create local tag with long name: |
49 | |
50 $ T=`hg identify --debug --id` | |
51 $ hg tag -l "This is a local tag with a really long name!" | |
52 $ hg tags | |
53 tip 0:acb14030fe0a | |
54 This is a local tag with a really long name! 0:acb14030fe0a | |
55 $ rm .hg/localtags | |
56 | |
57 Create a tag behind hg's back: | |
9143
a604c98dbf62
test-tags: clarify test output; simplify test script a bit (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
5658
diff
changeset
|
58 |
11744 | 59 $ echo "$T first" > .hgtags |
60 $ cat .hgtags | |
61 acb14030fe0a21b60322c440ad2d20cf7685a376 first | |
62 $ hg add .hgtags | |
63 $ hg commit -m "add tags" | |
64 $ hg tags | |
65 tip 1:b9154636be93 | |
66 first 0:acb14030fe0a | |
67 $ hg identify | |
68 b9154636be93 tip | |
69 | |
70 Repeat with cold tag cache: | |
71 | |
13272
5ccdca7df211
move tags.cache and branchheads.cache to a collected cache folder .hg/cache/
jfh <jason@jasonfharris.com>
parents:
12763
diff
changeset
|
72 $ rm -f .hg/cache/tags |
11744 | 73 $ hg identify |
74 b9154636be93 tip | |
75 | |
76 And again, but now unable to write tag cache: | |
9143
a604c98dbf62
test-tags: clarify test output; simplify test script a bit (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
5658
diff
changeset
|
77 |
16857
1415edd88c56
test-tags: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
15443
diff
changeset
|
78 #if unix-permissions |
13272
5ccdca7df211
move tags.cache and branchheads.cache to a collected cache folder .hg/cache/
jfh <jason@jasonfharris.com>
parents:
12763
diff
changeset
|
79 $ rm -f .hg/cache/tags |
11744 | 80 $ chmod 555 .hg |
81 $ hg identify | |
82 b9154636be93 tip | |
83 $ chmod 755 .hg | |
16857
1415edd88c56
test-tags: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
15443
diff
changeset
|
84 #endif |
11744 | 85 |
86 Create a branch: | |
9151
f528d1a93491
tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
9144
diff
changeset
|
87 |
11744 | 88 $ echo bb > a |
89 $ hg status | |
90 M a | |
91 $ hg identify | |
92 b9154636be93+ tip | |
93 $ hg co first | |
94 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
95 $ hg id | |
96 acb14030fe0a+ first | |
97 $ hg -v id | |
98 acb14030fe0a+ first | |
99 $ hg status | |
100 M a | |
101 $ echo 1 > b | |
102 $ hg add b | |
103 $ hg commit -m "branch" | |
104 created new head | |
105 $ hg id | |
106 c8edf04160c7 tip | |
107 | |
108 Merge the two heads: | |
9366
9ff178e7b627
tags: don't crash if unable to write tag cache
Greg Ward <greg-hg@gerg.ca>
parents:
9152
diff
changeset
|
109 |
11744 | 110 $ hg merge 1 |
111 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
112 (branch merge, don't forget to commit) | |
113 $ hg id | |
114 c8edf04160c7+b9154636be93+ tip | |
115 $ hg status | |
116 M .hgtags | |
117 $ hg commit -m "merge" | |
118 | |
119 Create a fake head, make sure tag not visible afterwards: | |
120 | |
121 $ cp .hgtags tags | |
122 $ hg tag last | |
123 $ hg rm .hgtags | |
124 $ hg commit -m "remove" | |
9143
a604c98dbf62
test-tags: clarify test output; simplify test script a bit (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
5658
diff
changeset
|
125 |
11744 | 126 $ mv tags .hgtags |
127 $ hg add .hgtags | |
128 $ hg commit -m "readd" | |
129 $ | |
130 $ hg tags | |
131 tip 6:35ff301afafe | |
132 first 0:acb14030fe0a | |
133 | |
134 Add invalid tags: | |
345 | 135 |
11744 | 136 $ echo "spam" >> .hgtags |
137 $ echo >> .hgtags | |
138 $ echo "foo bar" >> .hgtags | |
12366
c01dc9087d9a
tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents:
12327
diff
changeset
|
139 $ echo "a5a5 invalid" >> .hg/localtags |
17345
4f8054d3171b
check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents:
16913
diff
changeset
|
140 $ cat .hgtags |
11744 | 141 acb14030fe0a21b60322c440ad2d20cf7685a376 first |
142 spam | |
143 | |
144 foo bar | |
145 $ hg commit -m "tags" | |
146 | |
147 Report tag parse error on other head: | |
2320
dbdce3b99988
fix parsing of tags. make parse errors useful. add new tag tests.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2283
diff
changeset
|
148 |
11744 | 149 $ hg up 3 |
150 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
151 $ echo 'x y' >> .hgtags | |
152 $ hg commit -m "head" | |
153 created new head | |
2320
dbdce3b99988
fix parsing of tags. make parse errors useful. add new tag tests.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2283
diff
changeset
|
154 |
11744 | 155 $ hg tags |
156 .hgtags@75d9f02dfe28, line 2: cannot parse entry | |
157 .hgtags@75d9f02dfe28, line 4: node 'foo' is not well formed | |
158 .hgtags@c4be69a18c11, line 2: node 'x' is not well formed | |
159 tip 8:c4be69a18c11 | |
160 first 0:acb14030fe0a | |
161 $ hg tip | |
162 changeset: 8:c4be69a18c11 | |
163 tag: tip | |
164 parent: 3:ac5e980c4dc0 | |
165 user: test | |
166 date: Thu Jan 01 00:00:00 1970 +0000 | |
167 summary: head | |
168 | |
2320
dbdce3b99988
fix parsing of tags. make parse errors useful. add new tag tests.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2283
diff
changeset
|
169 |
11744 | 170 Test tag precedence rules: |
2320
dbdce3b99988
fix parsing of tags. make parse errors useful. add new tag tests.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2283
diff
changeset
|
171 |
11744 | 172 $ cd .. |
173 $ hg init t2 | |
174 $ cd t2 | |
175 $ echo foo > foo | |
176 $ hg add foo | |
177 $ hg ci -m 'add foo' # rev 0 | |
178 $ hg tag bar # rev 1 | |
179 $ echo >> foo | |
180 $ hg ci -m 'change foo 1' # rev 2 | |
181 $ hg up -C 1 | |
182 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
183 $ hg tag -r 1 -f bar # rev 3 | |
184 $ hg up -C 1 | |
185 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
186 $ echo >> foo | |
187 $ hg ci -m 'change foo 2' # rev 4 | |
188 created new head | |
189 $ hg tags | |
190 tip 4:0c192d7d5e6b | |
191 bar 1:78391a272241 | |
2320
dbdce3b99988
fix parsing of tags. make parse errors useful. add new tag tests.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2283
diff
changeset
|
192 |
11744 | 193 Repeat in case of cache effects: |
2320
dbdce3b99988
fix parsing of tags. make parse errors useful. add new tag tests.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2283
diff
changeset
|
194 |
11744 | 195 $ hg tags |
196 tip 4:0c192d7d5e6b | |
197 bar 1:78391a272241 | |
198 | |
199 Detailed dump of tag info: | |
1986
719cf07b076d
add checking for invalid entries in tag files
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1933
diff
changeset
|
200 |
11744 | 201 $ hg heads -q # expect 4, 3, 2 |
202 4:0c192d7d5e6b | |
203 3:6fa450212aeb | |
204 2:7a94127795a3 | |
205 $ dumptags 2 | |
206 rev 2: .hgtags: | |
207 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar | |
208 $ dumptags 3 | |
209 rev 3: .hgtags: | |
210 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar | |
211 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar | |
212 78391a272241d70354aa14c874552cad6b51bb42 bar | |
213 $ dumptags 4 | |
214 rev 4: .hgtags: | |
215 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar | |
9144
ad72e3b08bc0
test-tags: enhance the test to probe tag caching better (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
9143
diff
changeset
|
216 |
11744 | 217 Dump cache: |
218 | |
13272
5ccdca7df211
move tags.cache and branchheads.cache to a collected cache folder .hg/cache/
jfh <jason@jasonfharris.com>
parents:
12763
diff
changeset
|
219 $ cat .hg/cache/tags |
11744 | 220 4 0c192d7d5e6b78a714de54a2e9627952a877e25a 0c04f2a8af31de17fab7422878ee5a2dadbc943d |
221 3 6fa450212aeb2a21ed616a54aea39a4a27894cd7 7d3b718c964ef37b89e550ebdafd5789e76ce1b0 | |
222 2 7a94127795a33c10a370c93f731fd9fea0b79af6 0c04f2a8af31de17fab7422878ee5a2dadbc943d | |
223 | |
19646
335a558f81dc
tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19108
diff
changeset
|
224 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar |
335a558f81dc
tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19108
diff
changeset
|
225 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar |
11744 | 226 78391a272241d70354aa14c874552cad6b51bb42 bar |
227 | |
228 Test tag removal: | |
9144
ad72e3b08bc0
test-tags: enhance the test to probe tag caching better (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
9143
diff
changeset
|
229 |
11744 | 230 $ hg tag --remove bar # rev 5 |
231 $ hg tip -vp | |
232 changeset: 5:5f6e8655b1c7 | |
233 tag: tip | |
234 user: test | |
235 date: Thu Jan 01 00:00:00 1970 +0000 | |
236 files: .hgtags | |
237 description: | |
238 Removed tag bar | |
239 | |
240 | |
241 diff -r 0c192d7d5e6b -r 5f6e8655b1c7 .hgtags | |
242 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000 | |
243 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000 | |
244 @@ -1,1 +1,3 @@ | |
245 bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar | |
246 +78391a272241d70354aa14c874552cad6b51bb42 bar | |
247 +0000000000000000000000000000000000000000 bar | |
248 | |
249 $ hg tags | |
250 tip 5:5f6e8655b1c7 | |
251 $ hg tags # again, try to expose cache bugs | |
252 tip 5:5f6e8655b1c7 | |
4213 | 253 |
11744 | 254 Remove nonexistent tag: |
255 | |
256 $ hg tag --remove foobar | |
257 abort: tag 'foobar' does not exist | |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11744
diff
changeset
|
258 [255] |
11744 | 259 $ hg tip |
260 changeset: 5:5f6e8655b1c7 | |
261 tag: tip | |
262 user: test | |
263 date: Thu Jan 01 00:00:00 1970 +0000 | |
264 summary: Removed tag bar | |
265 | |
4266
fe7f38dda34b
tags: fix abababa case, with test case
Matt Mackall <mpm@selenic.com>
parents:
4213
diff
changeset
|
266 |
11744 | 267 Undo a tag with rollback: |
4651
7176f278d6f9
Test attempt to remove nonexistent tag
Brendan Cully <brendan@kublai.com>
parents:
4482
diff
changeset
|
268 |
11744 | 269 $ hg rollback # destroy rev 5 (restore bar) |
13446
1e497df514e2
rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents:
13272
diff
changeset
|
270 repository tip rolled back to revision 4 (undo commit) |
1e497df514e2
rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents:
13272
diff
changeset
|
271 working directory now based on revision 4 |
11744 | 272 $ hg tags |
273 tip 4:0c192d7d5e6b | |
274 bar 1:78391a272241 | |
275 $ hg tags | |
276 tip 4:0c192d7d5e6b | |
277 bar 1:78391a272241 | |
278 | |
279 Test tag rank: | |
9144
ad72e3b08bc0
test-tags: enhance the test to probe tag caching better (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
9143
diff
changeset
|
280 |
11744 | 281 $ cd .. |
282 $ hg init t3 | |
283 $ cd t3 | |
284 $ echo foo > foo | |
285 $ hg add foo | |
286 $ hg ci -m 'add foo' # rev 0 | |
287 $ hg tag -f bar # rev 1 bar -> 0 | |
288 $ hg tag -f bar # rev 2 bar -> 1 | |
289 $ hg tag -fr 0 bar # rev 3 bar -> 0 | |
290 $ hg tag -fr 1 bar # rev 4 bar -> 1 | |
291 $ hg tag -fr 0 bar # rev 5 bar -> 0 | |
292 $ hg tags | |
293 tip 5:85f05169d91d | |
294 bar 0:bbd179dfa0a7 | |
295 $ hg co 3 | |
296 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
297 $ echo barbar > foo | |
298 $ hg ci -m 'change foo' # rev 6 | |
299 created new head | |
300 $ hg tags | |
301 tip 6:735c3ca72986 | |
302 bar 0:bbd179dfa0a7 | |
4267
8185a1ca8628
tags: require -f to replace an existing tag
Matt Mackall <mpm@selenic.com>
parents:
4266
diff
changeset
|
303 |
11744 | 304 Don't allow moving tag without -f: |
305 | |
306 $ hg tag -r 3 bar | |
307 abort: tag 'bar' already exists (use -f to force) | |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11744
diff
changeset
|
308 [255] |
11744 | 309 $ hg tags |
310 tip 6:735c3ca72986 | |
311 bar 0:bbd179dfa0a7 | |
312 | |
313 Strip 1: expose an old head: | |
4482
99f411ba0380
use .extend instead of .append in readtags
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4267
diff
changeset
|
314 |
11744 | 315 $ hg --config extensions.mq= strip 5 |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12376
diff
changeset
|
316 saved backup bundle to $TESTTMP/t3/.hg/strip-backup/*-backup.hg (glob) |
11744 | 317 $ hg tags # partly stale cache |
318 tip 5:735c3ca72986 | |
319 bar 1:78391a272241 | |
320 $ hg tags # up-to-date cache | |
321 tip 5:735c3ca72986 | |
322 bar 1:78391a272241 | |
323 | |
324 Strip 2: destroy whole branch, no old head exposed | |
9144
ad72e3b08bc0
test-tags: enhance the test to probe tag caching better (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
9143
diff
changeset
|
325 |
11744 | 326 $ hg --config extensions.mq= strip 4 |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12376
diff
changeset
|
327 saved backup bundle to $TESTTMP/t3/.hg/strip-backup/*-backup.hg (glob) |
11744 | 328 $ hg tags # partly stale |
329 tip 4:735c3ca72986 | |
330 bar 0:bbd179dfa0a7 | |
13272
5ccdca7df211
move tags.cache and branchheads.cache to a collected cache folder .hg/cache/
jfh <jason@jasonfharris.com>
parents:
12763
diff
changeset
|
331 $ rm -f .hg/cache/tags |
11744 | 332 $ hg tags # cold cache |
333 tip 4:735c3ca72986 | |
334 bar 0:bbd179dfa0a7 | |
335 | |
336 Test tag rank with 3 heads: | |
5657
47915bf68c44
Properly check tag's existence as a local/global tag when removing it.
Osku Salerma <osku@iki.fi>
parents:
5524
diff
changeset
|
337 |
11744 | 338 $ cd .. |
339 $ hg init t4 | |
340 $ cd t4 | |
341 $ echo foo > foo | |
342 $ hg add | |
343 adding foo | |
344 $ hg ci -m 'add foo' # rev 0 | |
345 $ hg tag bar # rev 1 bar -> 0 | |
346 $ hg tag -f bar # rev 2 bar -> 1 | |
347 $ hg up -qC 0 | |
348 $ hg tag -fr 2 bar # rev 3 bar -> 2 | |
349 $ hg tags | |
350 tip 3:197c21bbbf2c | |
351 bar 2:6fa450212aeb | |
352 $ hg up -qC 0 | |
353 $ hg tag -m 'retag rev 0' -fr 0 bar # rev 4 bar -> 0, but bar stays at 2 | |
5657
47915bf68c44
Properly check tag's existence as a local/global tag when removing it.
Osku Salerma <osku@iki.fi>
parents:
5524
diff
changeset
|
354 |
11744 | 355 Bar should still point to rev 2: |
356 | |
357 $ hg tags | |
358 tip 4:3b4b14ed0202 | |
359 bar 2:6fa450212aeb | |
360 | |
361 Test that removing global/local tags does not get confused when trying | |
362 to remove a tag of type X which actually only exists as a type Y: | |
5657
47915bf68c44
Properly check tag's existence as a local/global tag when removing it.
Osku Salerma <osku@iki.fi>
parents:
5524
diff
changeset
|
363 |
11744 | 364 $ cd .. |
365 $ hg init t5 | |
366 $ cd t5 | |
367 $ echo foo > foo | |
368 $ hg add | |
369 adding foo | |
370 $ hg ci -m 'add foo' # rev 0 | |
5657
47915bf68c44
Properly check tag's existence as a local/global tag when removing it.
Osku Salerma <osku@iki.fi>
parents:
5524
diff
changeset
|
371 |
11744 | 372 $ hg tag -r 0 -l localtag |
373 $ hg tag --remove localtag | |
374 abort: tag 'localtag' is not a global tag | |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11744
diff
changeset
|
375 [255] |
11744 | 376 $ |
377 $ hg tag -r 0 globaltag | |
378 $ hg tag --remove -l globaltag | |
379 abort: tag 'globaltag' is not a local tag | |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11744
diff
changeset
|
380 [255] |
11744 | 381 $ hg tags -v |
382 tip 1:a0b6fe111088 | |
383 localtag 0:bbd179dfa0a7 local | |
384 globaltag 0:bbd179dfa0a7 | |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16857
diff
changeset
|
385 |
19108
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
386 Test for issue3911 |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
387 |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
388 $ hg tag -r 0 -l localtag2 |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
389 $ hg tag -l --remove localtag2 |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
390 $ hg tags -v |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
391 tip 1:a0b6fe111088 |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
392 localtag 0:bbd179dfa0a7 local |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
393 globaltag 0:bbd179dfa0a7 |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
394 |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
395 $ hg tag -r 1 -f localtag |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
396 $ hg tags -v |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
397 tip 2:5c70a037bb37 |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
398 localtag 1:a0b6fe111088 |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
399 globaltag 0:bbd179dfa0a7 |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
400 |
19646
335a558f81dc
tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19108
diff
changeset
|
401 $ hg tags -v |
335a558f81dc
tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19108
diff
changeset
|
402 tip 2:5c70a037bb37 |
335a558f81dc
tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19108
diff
changeset
|
403 localtag 1:a0b6fe111088 |
335a558f81dc
tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19108
diff
changeset
|
404 globaltag 0:bbd179dfa0a7 |
335a558f81dc
tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19108
diff
changeset
|
405 |
19108
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
406 $ hg tag -r 1 localtag2 |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
407 $ hg tags -v |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
408 tip 3:bbfb8cd42be2 |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
409 localtag2 1:a0b6fe111088 |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
410 localtag 1:a0b6fe111088 |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
411 globaltag 0:bbd179dfa0a7 |
cb95716da5fe
tags: update tag type only if tag node is updated (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17345
diff
changeset
|
412 |
19646
335a558f81dc
tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19108
diff
changeset
|
413 $ hg tags -v |
335a558f81dc
tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19108
diff
changeset
|
414 tip 3:bbfb8cd42be2 |
335a558f81dc
tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19108
diff
changeset
|
415 localtag2 1:a0b6fe111088 |
335a558f81dc
tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19108
diff
changeset
|
416 localtag 1:a0b6fe111088 |
335a558f81dc
tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19108
diff
changeset
|
417 globaltag 0:bbd179dfa0a7 |
335a558f81dc
tags: write tag overwriting history also into tag cache file (issue3911)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19108
diff
changeset
|
418 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16857
diff
changeset
|
419 $ cd .. |