Mercurial > evolve
comparison tests/test-discovery-obshashrange-cache.t @ 3965:d4ae0e3ec743 stable
test: add a test about cache warming
This test reveal that multiple cache are not saved to disk after discovery
(firstmerge, stablesort).
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 17 Aug 2018 13:31:35 +0200 |
parents | |
children | ea7687a9a4b8 |
comparison
equal
deleted
inserted
replaced
3964:45811d3507a7 | 3965:d4ae0e3ec743 |
---|---|
1 ============================== | |
2 Test cache warming strategy | |
3 test for range based discovery | |
4 ============================== | |
5 | |
6 $ . $TESTDIR/testlib/pythonpath.sh | |
7 | |
8 $ cat << EOF >> $HGRCPATH | |
9 > [extensions] | |
10 > hgext3rd.evolve = | |
11 > blackbox = | |
12 > [defaults] | |
13 > blackbox = -l 100 | |
14 > [experimental] | |
15 > obshashrange=1 | |
16 > verbose-obsolescence-exchange=1 | |
17 > [ui] | |
18 > logtemplate = "{rev} {node|short} {desc} {tags}\n" | |
19 > ssh=python "$RUNTESTDIR/dummyssh" | |
20 > [alias] | |
21 > debugobsolete=debugobsolete -d '0 0' | |
22 > [ui] | |
23 > ssh=$PYTHON "$RUNTESTDIR/dummyssh" | |
24 > EOF | |
25 | |
26 $ hg init main | |
27 | |
28 $ hg -R main debugbuilddag '.+7' | |
29 | |
30 $ for node in `hg -R main log -T '{node}\n'`; do | |
31 > echo -n $node | grep -o . | sort |tr -d "\n" > ancfile | |
32 > anc=`cat ancfile` | |
33 > rm ancfile | |
34 > echo "marking $anc as predecessors of $node" | |
35 > hg -R main debugobsolete $anc $node | |
36 > done | |
37 marking 000011223334456677789aaaaabbbbcccddddeef as predecessors of 4de32a90b66cd083ebf3c00b41277aa7abca51dd | |
38 marking 012234455555666699aaaaabbbccccccefffffff as predecessors of f69452c5b1af6cbaaa56ef50cf94fff5bcc6ca23 | |
39 marking 00001122233445555777778889999abbcccddeef as predecessors of c8d03c1b5e94af74b772900c58259d2e08917735 | |
40 marking 0011222445667777889999aabbbbcddddeeeeeee as predecessors of bebd167eb94d257ace0e814aeb98e6972ed2970d | |
41 marking 000011222223344555566778899aaaabccddefff as predecessors of 2dc09a01254db841290af0538aa52f6f52c776e3 | |
42 marking 01111222223333444455555566999abbbbcceeef as predecessors of 01241442b3c2bf3211e593b549c655ea65b295e3 | |
43 marking 01122444445555566677888aabbcccddddefffff as predecessors of 66f7d451a68b85ed82ff5fcc254daf50c74144bd | |
44 marking 000111111234444467777889999aaaabcdeeeeff as predecessors of 1ea73414a91b0920940797d8fc6a11e447f8ea1e | |
45 | |
46 $ hg debugobsolete -R main | |
47 000011223334456677789aaaaabbbbcccddddeef 4de32a90b66cd083ebf3c00b41277aa7abca51dd 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
48 012234455555666699aaaaabbbccccccefffffff f69452c5b1af6cbaaa56ef50cf94fff5bcc6ca23 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
49 00001122233445555777778889999abbcccddeef c8d03c1b5e94af74b772900c58259d2e08917735 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
50 0011222445667777889999aabbbbcddddeeeeeee bebd167eb94d257ace0e814aeb98e6972ed2970d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
51 000011222223344555566778899aaaabccddefff 2dc09a01254db841290af0538aa52f6f52c776e3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
52 01111222223333444455555566999abbbbcceeef 01241442b3c2bf3211e593b549c655ea65b295e3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
53 01122444445555566677888aabbcccddddefffff 66f7d451a68b85ed82ff5fcc254daf50c74144bd 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
54 000111111234444467777889999aaaabcdeeeeff 1ea73414a91b0920940797d8fc6a11e447f8ea1e 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
55 | |
56 Cache mode is "auto" so local commit did not warm the cache yet | |
57 | |
58 $ f -s main/.hg/cache/evoext* | |
59 main/.hg/cache/evoext-obscache-00: size=72 | |
60 | |
61 Initial push | |
62 ------------ | |
63 | |
64 $ hg init server | |
65 $ hg -R main push ssh://user@dummy/server | |
66 pushing to ssh://user@dummy/server | |
67 searching for changes | |
68 OBSEXC: computing relevant nodes | |
69 OBSEXC: looking for common markers in 8 nodes | |
70 OBSEXC: computing markers relevant to 8 nodes | |
71 remote: adding changesets | |
72 remote: adding manifests | |
73 remote: adding file changes | |
74 remote: added 8 changesets with 0 changes to 0 files | |
75 remote: 8 new obsolescence markers | |
76 | |
77 sever cash is warm | |
78 | |
79 $ f -s server/.hg/cache/evoext* | |
80 server/.hg/cache/evoext-depthcache-00: size=88 | |
81 server/.hg/cache/evoext-firstmerge-00: size=88 | |
82 server/.hg/cache/evoext-obscache-00: size=72 | |
83 server/.hg/cache/evoext-stablesortcache-00: size=92 | |
84 server/.hg/cache/evoext_obshashrange_v2.sqlite: size=?* (glob) | |
85 server/.hg/cache/evoext_stablerange_v2.sqlite: size=?* (glob) | |
86 | |
87 client cash is warm | |
88 | |
89 $ f -s main/.hg/cache/evoext* | |
90 main/.hg/cache/evoext-depthcache-00: size=88 | |
91 main/.hg/cache/evoext-obscache-00: size=72 | |
92 main/.hg/cache/evoext_obshashrange_v2.sqlite: size=?* (glob) | |
93 main/.hg/cache/evoext_stablerange_v2.sqlite: size=?* (glob) | |
94 | |
95 initial pull | |
96 ------------ | |
97 | |
98 $ rm -rf main | |
99 $ hg init main | |
100 $ hg -R main pull ssh://user@dummy/server | |
101 pulling from ssh://user@dummy/server | |
102 requesting all changes | |
103 adding changesets | |
104 adding manifests | |
105 adding file changes | |
106 added 8 changesets with 0 changes to 0 files | |
107 8 new obsolescence markers | |
108 new changesets 1ea73414a91b:4de32a90b66c | |
109 (run 'hg update' to get a working copy) | |
110 | |
111 client cache is empty because the discovery was empty | |
112 | |
113 $ f -s main/.hg/cache/evoext* | |
114 main/.hg/cache/evoext-obscache-00: size=72 | |
115 | |
116 no op pull | |
117 ------------ | |
118 | |
119 clear cache | |
120 | |
121 $ rm -rf main/.hg/cache/evoext | |
122 | |
123 pull nothing | |
124 | |
125 $ hg -R main pull ssh://user@dummy/server | |
126 pulling from ssh://user@dummy/server | |
127 searching for changes | |
128 no changes found | |
129 OBSEXC: looking for common markers in 8 nodes | |
130 | |
131 client cash is warm | |
132 | |
133 $ f -s main/.hg/cache/evoext* | |
134 main/.hg/cache/evoext-depthcache-00: size=88 | |
135 main/.hg/cache/evoext-obscache-00: size=72 | |
136 main/.hg/cache/evoext_obshashrange_v2.sqlite: size=?* (glob) | |
137 main/.hg/cache/evoext_stablerange_v2.sqlite: size=?* (glob) | |
138 | |
139 no op push | |
140 ------------ | |
141 | |
142 clear cache | |
143 | |
144 $ rm -rf main/.hg/cache/evoext | |
145 | |
146 push nothing | |
147 | |
148 $ hg -R main push ssh://user@dummy/server | |
149 pushing to ssh://user@dummy/server | |
150 searching for changes | |
151 OBSEXC: computing relevant nodes | |
152 OBSEXC: looking for common markers in 8 nodes | |
153 OBSEXC: markers already in sync | |
154 no changes found | |
155 [1] | |
156 | |
157 client cash is warm | |
158 | |
159 $ f -s main/.hg/cache/evoext* | |
160 main/.hg/cache/evoext-depthcache-00: size=88 | |
161 main/.hg/cache/evoext-obscache-00: size=72 | |
162 main/.hg/cache/evoext_obshashrange_v2.sqlite: size=?* (glob) | |
163 main/.hg/cache/evoext_stablerange_v2.sqlite: size=?* (glob) |