Mercurial > hg
comparison tests/test-obsolete-tag-cache.t @ 24144:a35b59d4df33
tests: add test showing tags cache drops filtered heads (issue4550)
The tags cache can lose .hgtags filenode entries for filtered heads. Add
a test demonstrating this (bad) behavior.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 24 Feb 2015 00:08:04 -0800 |
parents | |
children | b061a2049662 |
comparison
equal
deleted
inserted
replaced
24143:7b09dbbbd502 | 24144:a35b59d4df33 |
---|---|
1 $ cat >> $HGRCPATH << EOF | |
2 > [extensions] | |
3 > rebase= | |
4 > | |
5 > [experimental] | |
6 > evolution = createmarkers | |
7 > EOF | |
8 | |
9 Create a repo with some tags | |
10 | |
11 $ hg init repo | |
12 $ cd repo | |
13 $ echo initial > foo | |
14 $ hg -q commit -A -m initial | |
15 $ hg tag -m 'test tag' test1 | |
16 $ echo first > first | |
17 $ hg -q commit -A -m first | |
18 $ hg tag -m 'test2 tag' test2 | |
19 $ hg -q up -r 0 | |
20 $ echo newhead > newhead | |
21 $ hg commit -A -m newhead | |
22 adding newhead | |
23 created new head | |
24 | |
25 Trigger tags cache population by doing something that accesses tags info | |
26 | |
27 $ hg log -G -T '{rev}:{node|short} {tags} {desc}\n' | |
28 @ 4:042eb6bfcc49 tip newhead | |
29 | | |
30 | o 3:c3cb30f2d2cd test2 tag | |
31 | | | |
32 | o 2:d75775ffbc6b test2 first | |
33 | | | |
34 | o 1:5f97d42da03f test tag | |
35 |/ | |
36 o 0:55482a6fb4b1 test1 initial | |
37 | |
38 | |
39 $ cat .hg/cache/tags | |
40 4 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 | |
41 3 c3cb30f2d2cd0aae008cc91a07876e3c5131fd22 b3bce87817fe7ac9dca2834366c1d7534c095cf1 | |
42 | |
43 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1 | |
44 d75775ffbc6bca1794d300f5571272879bd280da test2 | |
45 | |
46 Create some hidden changesets via a rebase and trigger tags cache | |
47 repopulation | |
48 | |
49 $ hg -q rebase -s 1 -d 4 | |
50 $ hg log -G -T '{rev}:{node|short} {tags} {desc}\n' | |
51 o 7:eb610439e10e tip test2 tag | |
52 | | |
53 o 6:7b4af00c3c83 first | |
54 | | |
55 o 5:43ac2a539b3c test tag | |
56 | | |
57 @ 4:042eb6bfcc49 newhead | |
58 | | |
59 o 0:55482a6fb4b1 test1 initial | |
60 | |
61 | |
62 .hgtags filenodes for hidden heads should be visible (issue4550) | |
63 (currently broken) | |
64 | |
65 $ cat .hg/cache/tags | |
66 7 eb610439e10e0c6b296f97b59624c2e24fc59e30 b3bce87817fe7ac9dca2834366c1d7534c095cf1 | |
67 | |
68 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1 | |
69 d75775ffbc6bca1794d300f5571272879bd280da test2 | |
70 |