Mercurial > hg
comparison tests/test-obsolete-tag-cache.t @ 24762:1062663808ce
tags: write a separate tags cache file for unfiltered repos
Since we changed the format of the tags cache, we should bump the
filename. Before this patch, "tags" was being used for unfiltered
repositories. Change the naming scheme to be consistent and ensure
that a new cache file is used.
While I was here, I updated the docs to describe the existence of
multiple caches. I also added explicit test coverage for the creation of
the unfiltered tags cache.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 16 Apr 2015 11:54:13 -0400 |
parents | 410f3856196f |
children | a698e088ad29 |
comparison
equal
deleted
inserted
replaced
24761:61a6d83280d3 | 24762:1062663808ce |
---|---|
45 tip 5:2942a772f72a | 45 tip 5:2942a772f72a |
46 head2 4:042eb6bfcc49 | 46 head2 4:042eb6bfcc49 |
47 test2 2:d75775ffbc6b | 47 test2 2:d75775ffbc6b |
48 test1 0:55482a6fb4b1 | 48 test1 0:55482a6fb4b1 |
49 | 49 |
50 $ cat .hg/cache/tags-visible | 50 $ cat .hg/cache/tags2-visible |
51 5 2942a772f72a444bef4bef13874d515f50fa27b6 | 51 5 2942a772f72a444bef4bef13874d515f50fa27b6 |
52 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2 | 52 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2 |
53 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1 | 53 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1 |
54 d75775ffbc6bca1794d300f5571272879bd280da test2 | 54 d75775ffbc6bca1794d300f5571272879bd280da test2 |
55 | 55 |
60 $ hg tags | 60 $ hg tags |
61 tip 5:2942a772f72a | 61 tip 5:2942a772f72a |
62 head2 4:042eb6bfcc49 | 62 head2 4:042eb6bfcc49 |
63 test1 0:55482a6fb4b1 | 63 test1 0:55482a6fb4b1 |
64 | 64 |
65 $ cat .hg/cache/tags-visible | 65 $ cat .hg/cache/tags2-visible |
66 5 2942a772f72a444bef4bef13874d515f50fa27b6 f34fbc9a9769ba9eff5aff3d008a6b49f85c08b1 | 66 5 2942a772f72a444bef4bef13874d515f50fa27b6 f34fbc9a9769ba9eff5aff3d008a6b49f85c08b1 |
67 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2 | 67 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2 |
68 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1 | 68 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1 |
69 | 69 |
70 $ hg blackbox -l 4 | 70 $ hg blackbox -l 4 |
80 | 80 |
81 $ hg tags | 81 $ hg tags |
82 tip 5:2942a772f72a | 82 tip 5:2942a772f72a |
83 head2 4:042eb6bfcc49 | 83 head2 4:042eb6bfcc49 |
84 | 84 |
85 $ cat .hg/cache/tags-visible | 85 $ cat .hg/cache/tags2-visible |
86 5 2942a772f72a444bef4bef13874d515f50fa27b6 2fce1eec33263d08a4d04293960fc73a555230e4 | 86 5 2942a772f72a444bef4bef13874d515f50fa27b6 2fce1eec33263d08a4d04293960fc73a555230e4 |
87 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2 | 87 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2 |
88 | 88 |
89 $ hg blackbox -l 4 | 89 $ hg blackbox -l 4 |
90 1970/01/01 00:00:00 bob> tags | 90 1970/01/01 00:00:00 bob> tags |
91 1970/01/01 00:00:00 bob> 1/1 cache hits/lookups in * seconds (glob) | 91 1970/01/01 00:00:00 bob> 1/1 cache hits/lookups in * seconds (glob) |
92 1970/01/01 00:00:00 bob> writing tags cache file with 1 tags | 92 1970/01/01 00:00:00 bob> writing tags cache file with 1 tags |
93 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob) | 93 1970/01/01 00:00:00 bob> tags exited 0 after * seconds (glob) |
94 | |
95 Resolving tags on an unfiltered repo writes a separate tags cache | |
96 | |
97 $ hg --hidden tags | |
98 tip 5:2942a772f72a | |
99 head2 4:042eb6bfcc49 | |
100 test2 2:d75775ffbc6b | |
101 test1 0:55482a6fb4b1 | |
102 | |
103 $ cat .hg/cache/tags2 | |
104 5 2942a772f72a444bef4bef13874d515f50fa27b6 | |
105 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2 | |
106 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1 | |
107 d75775ffbc6bca1794d300f5571272879bd280da test2 | |
108 | |
109 $ hg blackbox -l 4 | |
110 1970/01/01 00:00:00 bob> --hidden tags | |
111 1970/01/01 00:00:00 bob> 2/2 cache hits/lookups in * seconds (glob) | |
112 1970/01/01 00:00:00 bob> writing tags cache file with 3 tags | |
113 1970/01/01 00:00:00 bob> --hidden tags exited 0 after * seconds (glob) |