Show More
@@ -1,372 +1,375 | |||||
1 | #require no-windows |
|
1 | #require no-windows | |
2 |
|
2 | |||
3 | $ . "$TESTDIR/remotefilelog-library.sh" |
|
3 | $ . "$TESTDIR/remotefilelog-library.sh" | |
4 |
|
4 | |||
5 | $ hg init master |
|
5 | $ hg init master | |
6 | $ cd master |
|
6 | $ cd master | |
7 | $ cat >> .hg/hgrc <<EOF |
|
7 | $ cat >> .hg/hgrc <<EOF | |
8 | > [remotefilelog] |
|
8 | > [remotefilelog] | |
9 | > server=True |
|
9 | > server=True | |
10 | > EOF |
|
10 | > EOF | |
11 | $ echo x > x |
|
11 | $ echo x > x | |
12 | $ echo z > z |
|
12 | $ echo z > z | |
13 | $ hg commit -qAm x |
|
13 | $ hg commit -qAm x | |
14 | $ echo x2 > x |
|
14 | $ echo x2 > x | |
15 | $ echo y > y |
|
15 | $ echo y > y | |
16 | $ hg commit -qAm y |
|
16 | $ hg commit -qAm y | |
17 | $ echo w > w |
|
17 | $ echo w > w | |
18 | $ rm z |
|
18 | $ rm z | |
19 | $ hg commit -qAm w |
|
19 | $ hg commit -qAm w | |
20 | $ hg bookmark foo |
|
20 | $ hg bookmark foo | |
21 |
|
21 | |||
22 | $ cd .. |
|
22 | $ cd .. | |
23 |
|
23 | |||
24 | # clone the repo |
|
24 | # clone the repo | |
25 |
|
25 | |||
26 | $ hgcloneshallow ssh://user@dummy/master shallow --noupdate |
|
26 | $ hgcloneshallow ssh://user@dummy/master shallow --noupdate | |
27 | streaming all changes |
|
27 | streaming all changes | |
28 | 2 files to transfer, 776 bytes of data |
|
28 | 2 files to transfer, 776 bytes of data | |
29 | transferred 776 bytes in * seconds (*/sec) (glob) |
|
29 | transferred 776 bytes in * seconds (*/sec) (glob) | |
30 | searching for changes |
|
30 | searching for changes | |
31 | no changes found |
|
31 | no changes found | |
32 |
|
32 | |||
33 | # Set the prefetchdays config to zero so that all commits are prefetched |
|
33 | # Set the prefetchdays config to zero so that all commits are prefetched | |
34 | # no matter what their creation date is. Also set prefetchdelay config |
|
34 | # no matter what their creation date is. Also set prefetchdelay config | |
35 | # to zero so that there is no delay between prefetches. |
|
35 | # to zero so that there is no delay between prefetches. | |
36 | $ cd shallow |
|
36 | $ cd shallow | |
37 | $ cat >> .hg/hgrc <<EOF |
|
37 | $ cat >> .hg/hgrc <<EOF | |
38 | > [remotefilelog] |
|
38 | > [remotefilelog] | |
39 | > prefetchdays=0 |
|
39 | > prefetchdays=0 | |
40 | > prefetchdelay=0 |
|
40 | > prefetchdelay=0 | |
41 | > EOF |
|
41 | > EOF | |
42 | $ cd .. |
|
42 | $ cd .. | |
43 |
|
43 | |||
44 | # prefetch a revision |
|
44 | # prefetch a revision | |
45 | $ cd shallow |
|
45 | $ cd shallow | |
46 |
|
46 | |||
47 | $ hg prefetch -r 0 |
|
47 | $ hg prefetch -r 0 | |
48 | 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob) |
|
48 | 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob) | |
49 |
|
49 | |||
50 | $ hg cat -r 0 x |
|
50 | $ hg cat -r 0 x | |
51 | x |
|
51 | x | |
52 |
|
52 | |||
53 | # background prefetch on pull when configured |
|
53 | # background prefetch on pull when configured | |
54 |
|
54 | |||
55 | $ cat >> .hg/hgrc <<EOF |
|
55 | $ cat >> .hg/hgrc <<EOF | |
56 | > [remotefilelog] |
|
56 | > [remotefilelog] | |
57 | > pullprefetch=bookmark() |
|
57 | > pullprefetch=bookmark() | |
58 | > backgroundprefetch=True |
|
58 | > backgroundprefetch=True | |
59 | > EOF |
|
59 | > EOF | |
60 | $ hg strip tip |
|
60 | $ hg strip tip | |
61 | saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/6b4b6f66ef8c-b4b8bdaf-backup.hg (glob) |
|
61 | saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/6b4b6f66ef8c-b4b8bdaf-backup.hg (glob) | |
62 |
|
62 | |||
63 | $ clearcache |
|
63 | $ clearcache | |
64 | $ hg pull |
|
64 | $ hg pull | |
65 | pulling from ssh://user@dummy/master |
|
65 | pulling from ssh://user@dummy/master | |
66 | searching for changes |
|
66 | searching for changes | |
67 | adding changesets |
|
67 | adding changesets | |
68 | adding manifests |
|
68 | adding manifests | |
69 | adding file changes |
|
69 | adding file changes | |
70 | added 1 changesets with 0 changes to 0 files |
|
70 | added 1 changesets with 0 changes to 0 files | |
71 | updating bookmark foo |
|
71 | updating bookmark foo | |
72 | new changesets 6b4b6f66ef8c |
|
72 | new changesets 6b4b6f66ef8c | |
73 | (run 'hg update' to get a working copy) |
|
73 | (run 'hg update' to get a working copy) | |
74 | prefetching file contents |
|
74 | prefetching file contents | |
75 | $ sleep 0.5 |
|
75 | $ sleep 0.5 | |
76 | $ hg debugwaitonprefetch >/dev/null 2>%1 |
|
76 | $ hg debugwaitonprefetch >/dev/null 2>%1 | |
77 | $ find $CACHEDIR -type f | sort |
|
77 | $ find $CACHEDIR -type f | sort | |
78 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/ef95c5376f34698742fe34f315fd82136f8f68c0 |
|
78 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/ef95c5376f34698742fe34f315fd82136f8f68c0 | |
79 | $TESTTMP/hgcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/076f5e2225b3ff0400b98c92aa6cdf403ee24cca |
|
79 | $TESTTMP/hgcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/076f5e2225b3ff0400b98c92aa6cdf403ee24cca | |
80 | $TESTTMP/hgcache/master/af/f024fe4ab0fece4091de044c58c9ae4233383a/bb6ccd5dceaa5e9dc220e0dad65e051b94f69a2c |
|
80 | $TESTTMP/hgcache/master/af/f024fe4ab0fece4091de044c58c9ae4233383a/bb6ccd5dceaa5e9dc220e0dad65e051b94f69a2c | |
81 | $TESTTMP/hgcache/repos |
|
81 | $TESTTMP/hgcache/repos | |
82 |
|
82 | |||
83 | # background prefetch with repack on pull when configured |
|
83 | # background prefetch with repack on pull when configured | |
84 |
|
84 | |||
85 | $ cat >> .hg/hgrc <<EOF |
|
85 | $ cat >> .hg/hgrc <<EOF | |
86 | > [remotefilelog] |
|
86 | > [remotefilelog] | |
87 | > backgroundrepack=True |
|
87 | > backgroundrepack=True | |
88 | > EOF |
|
88 | > EOF | |
89 | $ hg strip tip |
|
89 | $ hg strip tip | |
90 | saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/6b4b6f66ef8c-b4b8bdaf-backup.hg (glob) |
|
90 | saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/6b4b6f66ef8c-b4b8bdaf-backup.hg (glob) | |
91 |
|
91 | |||
92 | $ clearcache |
|
92 | $ clearcache | |
93 | $ hg pull |
|
93 | $ hg pull | |
94 | pulling from ssh://user@dummy/master |
|
94 | pulling from ssh://user@dummy/master | |
95 | searching for changes |
|
95 | searching for changes | |
96 | adding changesets |
|
96 | adding changesets | |
97 | adding manifests |
|
97 | adding manifests | |
98 | adding file changes |
|
98 | adding file changes | |
99 | added 1 changesets with 0 changes to 0 files |
|
99 | added 1 changesets with 0 changes to 0 files | |
100 | updating bookmark foo |
|
100 | updating bookmark foo | |
101 | new changesets 6b4b6f66ef8c |
|
101 | new changesets 6b4b6f66ef8c | |
102 | (run 'hg update' to get a working copy) |
|
102 | (run 'hg update' to get a working copy) | |
103 | prefetching file contents |
|
103 | prefetching file contents | |
104 | $ sleep 0.5 |
|
104 | $ sleep 0.5 | |
105 | $ hg debugwaitonprefetch >/dev/null 2>%1 |
|
105 | $ hg debugwaitonprefetch >/dev/null 2>%1 | |
106 | $ sleep 0.5 |
|
106 | $ sleep 0.5 | |
107 | $ hg debugwaitonrepack >/dev/null 2>%1 |
|
107 | $ hg debugwaitonrepack >/dev/null 2>%1 | |
108 | $ sleep 0.5 |
|
108 | $ sleep 0.5 | |
109 | $ find $CACHEDIR -type f | sort |
|
109 | $ find $CACHEDIR -type f | sort | |
110 | $TESTTMP/hgcache/master/packs/6e8633deba6e544e5f8edbd7b996d6e31a2c42ae.histidx |
|
110 | $TESTTMP/hgcache/master/packs/6e8633deba6e544e5f8edbd7b996d6e31a2c42ae.histidx | |
111 | $TESTTMP/hgcache/master/packs/6e8633deba6e544e5f8edbd7b996d6e31a2c42ae.histpack |
|
111 | $TESTTMP/hgcache/master/packs/6e8633deba6e544e5f8edbd7b996d6e31a2c42ae.histpack | |
112 | $TESTTMP/hgcache/master/packs/8ce5ab3745465ab83bba30a7b9c295e0c8404652.dataidx |
|
112 | $TESTTMP/hgcache/master/packs/8ce5ab3745465ab83bba30a7b9c295e0c8404652.dataidx | |
113 | $TESTTMP/hgcache/master/packs/8ce5ab3745465ab83bba30a7b9c295e0c8404652.datapack |
|
113 | $TESTTMP/hgcache/master/packs/8ce5ab3745465ab83bba30a7b9c295e0c8404652.datapack | |
114 | $TESTTMP/hgcache/master/packs/repacklock |
|
114 | $TESTTMP/hgcache/master/packs/repacklock | |
115 | $TESTTMP/hgcache/repos |
|
115 | $TESTTMP/hgcache/repos | |
116 |
|
116 | |||
117 | # background prefetch with repack on update when wcprevset configured |
|
117 | # background prefetch with repack on update when wcprevset configured | |
118 |
|
118 | |||
119 | $ clearcache |
|
119 | $ clearcache | |
120 | $ hg up -r 0 |
|
120 | $ hg up -r 0 | |
121 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
121 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
122 | 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob) |
|
122 | 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob) | |
123 | $ find $CACHEDIR -type f | sort |
|
123 | $ find $CACHEDIR -type f | sort | |
124 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0 |
|
124 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0 | |
125 | $TESTTMP/hgcache/master/39/5df8f7c51f007019cb30201c49e884b46b92fa/69a1b67522704ec122181c0890bd16e9d3e7516a |
|
125 | $TESTTMP/hgcache/master/39/5df8f7c51f007019cb30201c49e884b46b92fa/69a1b67522704ec122181c0890bd16e9d3e7516a | |
126 | $TESTTMP/hgcache/repos |
|
126 | $TESTTMP/hgcache/repos | |
127 |
|
127 | |||
128 | $ hg up -r 1 |
|
128 | $ hg up -r 1 | |
129 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
129 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
130 | 2 files fetched over 2 fetches - (2 misses, 0.00% hit ratio) over *s (glob) |
|
130 | 2 files fetched over 2 fetches - (2 misses, 0.00% hit ratio) over *s (glob) | |
131 |
|
131 | |||
132 | $ cat >> .hg/hgrc <<EOF |
|
132 | $ cat >> .hg/hgrc <<EOF | |
133 | > [remotefilelog] |
|
133 | > [remotefilelog] | |
134 | > bgprefetchrevs=.:: |
|
134 | > bgprefetchrevs=.:: | |
135 | > EOF |
|
135 | > EOF | |
136 |
|
136 | |||
137 | $ clearcache |
|
137 | $ clearcache | |
138 | $ hg up -r 0 |
|
138 | $ hg up -r 0 | |
139 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
139 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
140 | * files fetched over * fetches - (* misses, 0.00% hit ratio) over *s (glob) |
|
140 | * files fetched over * fetches - (* misses, 0.00% hit ratio) over *s (glob) | |
141 | $ sleep 1 |
|
141 | $ sleep 1 | |
142 | $ hg debugwaitonprefetch >/dev/null 2>%1 |
|
142 | $ hg debugwaitonprefetch >/dev/null 2>%1 | |
143 | $ sleep 1 |
|
143 | $ sleep 1 | |
144 | $ hg debugwaitonrepack >/dev/null 2>%1 |
|
144 | $ hg debugwaitonrepack >/dev/null 2>%1 | |
|
145 | $ sleep 1 | |||
145 | $ find $CACHEDIR -type f | sort |
|
146 | $ find $CACHEDIR -type f | sort | |
146 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx |
|
147 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx | |
147 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack |
|
148 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack | |
148 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx |
|
149 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx | |
149 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack |
|
150 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack | |
150 | $TESTTMP/hgcache/master/packs/repacklock |
|
151 | $TESTTMP/hgcache/master/packs/repacklock | |
151 | $TESTTMP/hgcache/repos |
|
152 | $TESTTMP/hgcache/repos | |
152 |
|
153 | |||
153 | # Ensure that file 'w' was prefetched - it was not part of the update operation and therefore |
|
154 | # Ensure that file 'w' was prefetched - it was not part of the update operation and therefore | |
154 | # could only be downloaded by the background prefetch |
|
155 | # could only be downloaded by the background prefetch | |
155 |
|
156 | |||
156 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` |
|
157 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` | |
157 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: |
|
158 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: | |
158 | w: |
|
159 | w: | |
159 | Node Delta Base Delta Length Blob Size |
|
160 | Node Delta Base Delta Length Blob Size | |
160 | bb6ccd5dceaa 000000000000 2 2 |
|
161 | bb6ccd5dceaa 000000000000 2 2 | |
161 |
|
162 | |||
162 | Total: 2 2 (0.0% bigger) |
|
163 | Total: 2 2 (0.0% bigger) | |
163 | x: |
|
164 | x: | |
164 | Node Delta Base Delta Length Blob Size |
|
165 | Node Delta Base Delta Length Blob Size | |
165 | ef95c5376f34 000000000000 3 3 |
|
166 | ef95c5376f34 000000000000 3 3 | |
166 | 1406e7411862 ef95c5376f34 14 2 |
|
167 | 1406e7411862 ef95c5376f34 14 2 | |
167 |
|
168 | |||
168 | Total: 17 5 (240.0% bigger) |
|
169 | Total: 17 5 (240.0% bigger) | |
169 | y: |
|
170 | y: | |
170 | Node Delta Base Delta Length Blob Size |
|
171 | Node Delta Base Delta Length Blob Size | |
171 | 076f5e2225b3 000000000000 2 2 |
|
172 | 076f5e2225b3 000000000000 2 2 | |
172 |
|
173 | |||
173 | Total: 2 2 (0.0% bigger) |
|
174 | Total: 2 2 (0.0% bigger) | |
174 | z: |
|
175 | z: | |
175 | Node Delta Base Delta Length Blob Size |
|
176 | Node Delta Base Delta Length Blob Size | |
176 | 69a1b6752270 000000000000 2 2 |
|
177 | 69a1b6752270 000000000000 2 2 | |
177 |
|
178 | |||
178 | Total: 2 2 (0.0% bigger) |
|
179 | Total: 2 2 (0.0% bigger) | |
179 |
|
180 | |||
180 | # background prefetch with repack on commit when wcprevset configured |
|
181 | # background prefetch with repack on commit when wcprevset configured | |
181 |
|
182 | |||
182 | $ cat >> .hg/hgrc <<EOF |
|
183 | $ cat >> .hg/hgrc <<EOF | |
183 | > [remotefilelog] |
|
184 | > [remotefilelog] | |
184 | > bgprefetchrevs=0:: |
|
185 | > bgprefetchrevs=0:: | |
185 | > EOF |
|
186 | > EOF | |
186 |
|
187 | |||
187 | $ clearcache |
|
188 | $ clearcache | |
188 | $ find $CACHEDIR -type f | sort |
|
189 | $ find $CACHEDIR -type f | sort | |
189 | $ echo b > b |
|
190 | $ echo b > b | |
190 | $ hg commit -qAm b |
|
191 | $ hg commit -qAm b | |
191 | * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) |
|
192 | * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) | |
192 | $ hg bookmark temporary |
|
193 | $ hg bookmark temporary | |
193 | $ sleep 1 |
|
194 | $ sleep 1 | |
194 | $ hg debugwaitonprefetch >/dev/null 2>%1 |
|
195 | $ hg debugwaitonprefetch >/dev/null 2>%1 | |
195 | $ sleep 1 |
|
196 | $ sleep 1 | |
196 | $ hg debugwaitonrepack >/dev/null 2>%1 |
|
197 | $ hg debugwaitonrepack >/dev/null 2>%1 | |
197 | $ sleep 1 |
|
198 | $ sleep 1 | |
198 | $ find $CACHEDIR -type f | sort |
|
199 | $ find $CACHEDIR -type f | sort | |
199 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx |
|
200 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx | |
200 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack |
|
201 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack | |
201 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx |
|
202 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx | |
202 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack |
|
203 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack | |
203 | $TESTTMP/hgcache/master/packs/repacklock |
|
204 | $TESTTMP/hgcache/master/packs/repacklock | |
204 | $TESTTMP/hgcache/repos |
|
205 | $TESTTMP/hgcache/repos | |
205 |
|
206 | |||
206 | # Ensure that file 'w' was prefetched - it was not part of the commit operation and therefore |
|
207 | # Ensure that file 'w' was prefetched - it was not part of the commit operation and therefore | |
207 | # could only be downloaded by the background prefetch |
|
208 | # could only be downloaded by the background prefetch | |
208 |
|
209 | |||
209 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` |
|
210 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` | |
210 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: |
|
211 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: | |
211 | w: |
|
212 | w: | |
212 | Node Delta Base Delta Length Blob Size |
|
213 | Node Delta Base Delta Length Blob Size | |
213 | bb6ccd5dceaa 000000000000 2 2 |
|
214 | bb6ccd5dceaa 000000000000 2 2 | |
214 |
|
215 | |||
215 | Total: 2 2 (0.0% bigger) |
|
216 | Total: 2 2 (0.0% bigger) | |
216 | x: |
|
217 | x: | |
217 | Node Delta Base Delta Length Blob Size |
|
218 | Node Delta Base Delta Length Blob Size | |
218 | ef95c5376f34 000000000000 3 3 |
|
219 | ef95c5376f34 000000000000 3 3 | |
219 | 1406e7411862 ef95c5376f34 14 2 |
|
220 | 1406e7411862 ef95c5376f34 14 2 | |
220 |
|
221 | |||
221 | Total: 17 5 (240.0% bigger) |
|
222 | Total: 17 5 (240.0% bigger) | |
222 | y: |
|
223 | y: | |
223 | Node Delta Base Delta Length Blob Size |
|
224 | Node Delta Base Delta Length Blob Size | |
224 | 076f5e2225b3 000000000000 2 2 |
|
225 | 076f5e2225b3 000000000000 2 2 | |
225 |
|
226 | |||
226 | Total: 2 2 (0.0% bigger) |
|
227 | Total: 2 2 (0.0% bigger) | |
227 | z: |
|
228 | z: | |
228 | Node Delta Base Delta Length Blob Size |
|
229 | Node Delta Base Delta Length Blob Size | |
229 | 69a1b6752270 000000000000 2 2 |
|
230 | 69a1b6752270 000000000000 2 2 | |
230 |
|
231 | |||
231 | Total: 2 2 (0.0% bigger) |
|
232 | Total: 2 2 (0.0% bigger) | |
232 |
|
233 | |||
233 | # background prefetch with repack on rebase when wcprevset configured |
|
234 | # background prefetch with repack on rebase when wcprevset configured | |
234 |
|
235 | |||
235 | $ hg up -r 2 |
|
236 | $ hg up -r 2 | |
236 | 3 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
237 | 3 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
237 | (leaving bookmark temporary) |
|
238 | (leaving bookmark temporary) | |
238 | $ clearcache |
|
239 | $ clearcache | |
239 | $ find $CACHEDIR -type f | sort |
|
240 | $ find $CACHEDIR -type f | sort | |
240 | $ hg rebase -s temporary -d foo |
|
241 | $ hg rebase -s temporary -d foo | |
241 | rebasing 3:58147a5b5242 "b" (temporary tip) |
|
242 | rebasing 3:58147a5b5242 "b" (temporary tip) | |
242 | saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/58147a5b5242-c3678817-rebase.hg (glob) |
|
243 | saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/58147a5b5242-c3678817-rebase.hg (glob) | |
243 | 3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob) |
|
244 | 3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob) | |
244 | $ sleep 1 |
|
245 | $ sleep 1 | |
245 | $ hg debugwaitonprefetch >/dev/null 2>%1 |
|
246 | $ hg debugwaitonprefetch >/dev/null 2>%1 | |
246 | $ sleep 1 |
|
247 | $ sleep 1 | |
247 | $ hg debugwaitonrepack >/dev/null 2>%1 |
|
248 | $ hg debugwaitonrepack >/dev/null 2>%1 | |
248 | $ sleep 1 |
|
249 | $ sleep 1 | |
249 |
|
250 | |||
250 | # Ensure that file 'y' was prefetched - it was not part of the rebase operation and therefore |
|
251 | # Ensure that file 'y' was prefetched - it was not part of the rebase operation and therefore | |
251 | # could only be downloaded by the background prefetch |
|
252 | # could only be downloaded by the background prefetch | |
252 |
|
253 | |||
253 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` |
|
254 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` | |
254 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: |
|
255 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: | |
255 | w: |
|
256 | w: | |
256 | Node Delta Base Delta Length Blob Size |
|
257 | Node Delta Base Delta Length Blob Size | |
257 | bb6ccd5dceaa 000000000000 2 2 |
|
258 | bb6ccd5dceaa 000000000000 2 2 | |
258 |
|
259 | |||
259 | Total: 2 2 (0.0% bigger) |
|
260 | Total: 2 2 (0.0% bigger) | |
260 | x: |
|
261 | x: | |
261 | Node Delta Base Delta Length Blob Size |
|
262 | Node Delta Base Delta Length Blob Size | |
262 | ef95c5376f34 000000000000 3 3 |
|
263 | ef95c5376f34 000000000000 3 3 | |
263 | 1406e7411862 ef95c5376f34 14 2 |
|
264 | 1406e7411862 ef95c5376f34 14 2 | |
264 |
|
265 | |||
265 | Total: 17 5 (240.0% bigger) |
|
266 | Total: 17 5 (240.0% bigger) | |
266 | y: |
|
267 | y: | |
267 | Node Delta Base Delta Length Blob Size |
|
268 | Node Delta Base Delta Length Blob Size | |
268 | 076f5e2225b3 000000000000 2 2 |
|
269 | 076f5e2225b3 000000000000 2 2 | |
269 |
|
270 | |||
270 | Total: 2 2 (0.0% bigger) |
|
271 | Total: 2 2 (0.0% bigger) | |
271 | z: |
|
272 | z: | |
272 | Node Delta Base Delta Length Blob Size |
|
273 | Node Delta Base Delta Length Blob Size | |
273 | 69a1b6752270 000000000000 2 2 |
|
274 | 69a1b6752270 000000000000 2 2 | |
274 |
|
275 | |||
275 | Total: 2 2 (0.0% bigger) |
|
276 | Total: 2 2 (0.0% bigger) | |
276 |
|
277 | |||
277 | # Check that foregound prefetch with no arguments blocks until background prefetches finish |
|
278 | # Check that foregound prefetch with no arguments blocks until background prefetches finish | |
278 |
|
279 | |||
279 | $ hg up -r 3 |
|
280 | $ hg up -r 3 | |
280 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
281 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
281 | $ clearcache |
|
282 | $ clearcache | |
282 | $ hg prefetch --repack |
|
283 | $ hg prefetch --repack | |
283 | waiting for lock on prefetching in $TESTTMP/shallow held by process * on host * (glob) (?) |
|
284 | waiting for lock on prefetching in $TESTTMP/shallow held by process * on host * (glob) (?) | |
284 | got lock after * seconds (glob) (?) |
|
285 | got lock after * seconds (glob) (?) | |
285 | (running background incremental repack) |
|
286 | (running background incremental repack) | |
286 | * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?) |
|
287 | * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?) | |
287 |
|
288 | |||
288 | $ sleep 0.5 |
|
289 | $ sleep 0.5 | |
289 | $ hg debugwaitonrepack >/dev/null 2>%1 |
|
290 | $ hg debugwaitonrepack >/dev/null 2>%1 | |
|
291 | $ sleep 0.5 | |||
290 |
|
292 | |||
291 | $ find $CACHEDIR -type f | sort |
|
293 | $ find $CACHEDIR -type f | sort | |
292 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx |
|
294 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx | |
293 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack |
|
295 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack | |
294 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx |
|
296 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx | |
295 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack |
|
297 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack | |
296 | $TESTTMP/hgcache/master/packs/repacklock |
|
298 | $TESTTMP/hgcache/master/packs/repacklock | |
297 | $TESTTMP/hgcache/repos |
|
299 | $TESTTMP/hgcache/repos | |
298 |
|
300 | |||
299 | # Ensure that files were prefetched |
|
301 | # Ensure that files were prefetched | |
300 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` |
|
302 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` | |
301 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: |
|
303 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: | |
302 | w: |
|
304 | w: | |
303 | Node Delta Base Delta Length Blob Size |
|
305 | Node Delta Base Delta Length Blob Size | |
304 | bb6ccd5dceaa 000000000000 2 2 |
|
306 | bb6ccd5dceaa 000000000000 2 2 | |
305 |
|
307 | |||
306 | Total: 2 2 (0.0% bigger) |
|
308 | Total: 2 2 (0.0% bigger) | |
307 | x: |
|
309 | x: | |
308 | Node Delta Base Delta Length Blob Size |
|
310 | Node Delta Base Delta Length Blob Size | |
309 | ef95c5376f34 000000000000 3 3 |
|
311 | ef95c5376f34 000000000000 3 3 | |
310 | 1406e7411862 ef95c5376f34 14 2 |
|
312 | 1406e7411862 ef95c5376f34 14 2 | |
311 |
|
313 | |||
312 | Total: 17 5 (240.0% bigger) |
|
314 | Total: 17 5 (240.0% bigger) | |
313 | y: |
|
315 | y: | |
314 | Node Delta Base Delta Length Blob Size |
|
316 | Node Delta Base Delta Length Blob Size | |
315 | 076f5e2225b3 000000000000 2 2 |
|
317 | 076f5e2225b3 000000000000 2 2 | |
316 |
|
318 | |||
317 | Total: 2 2 (0.0% bigger) |
|
319 | Total: 2 2 (0.0% bigger) | |
318 | z: |
|
320 | z: | |
319 | Node Delta Base Delta Length Blob Size |
|
321 | Node Delta Base Delta Length Blob Size | |
320 | 69a1b6752270 000000000000 2 2 |
|
322 | 69a1b6752270 000000000000 2 2 | |
321 |
|
323 | |||
322 | Total: 2 2 (0.0% bigger) |
|
324 | Total: 2 2 (0.0% bigger) | |
323 |
|
325 | |||
324 | # Check that foreground prefetch fetches revs specified by '. + draft() + bgprefetchrevs + pullprefetch' |
|
326 | # Check that foreground prefetch fetches revs specified by '. + draft() + bgprefetchrevs + pullprefetch' | |
325 |
|
327 | |||
326 | $ clearcache |
|
328 | $ clearcache | |
327 | $ hg prefetch --repack |
|
329 | $ hg prefetch --repack | |
328 | waiting for lock on prefetching in $TESTTMP/shallow held by process * on host * (glob) (?) |
|
330 | waiting for lock on prefetching in $TESTTMP/shallow held by process * on host * (glob) (?) | |
329 | got lock after * seconds (glob) (?) |
|
331 | got lock after * seconds (glob) (?) | |
330 | (running background incremental repack) |
|
332 | (running background incremental repack) | |
331 | * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?) |
|
333 | * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?) | |
332 | $ sleep 0.5 |
|
334 | $ sleep 0.5 | |
333 | $ hg debugwaitonrepack >/dev/null 2>%1 |
|
335 | $ hg debugwaitonrepack >/dev/null 2>%1 | |
|
336 | $ sleep 0.5 | |||
334 |
|
337 | |||
335 | $ find $CACHEDIR -type f | sort |
|
338 | $ find $CACHEDIR -type f | sort | |
336 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx |
|
339 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx | |
337 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack |
|
340 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack | |
338 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx |
|
341 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx | |
339 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack |
|
342 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack | |
340 | $TESTTMP/hgcache/master/packs/repacklock |
|
343 | $TESTTMP/hgcache/master/packs/repacklock | |
341 | $TESTTMP/hgcache/repos |
|
344 | $TESTTMP/hgcache/repos | |
342 |
|
345 | |||
343 | # Ensure that files were prefetched |
|
346 | # Ensure that files were prefetched | |
344 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` |
|
347 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` | |
345 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: |
|
348 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: | |
346 | w: |
|
349 | w: | |
347 | Node Delta Base Delta Length Blob Size |
|
350 | Node Delta Base Delta Length Blob Size | |
348 | bb6ccd5dceaa 000000000000 2 2 |
|
351 | bb6ccd5dceaa 000000000000 2 2 | |
349 |
|
352 | |||
350 | Total: 2 2 (0.0% bigger) |
|
353 | Total: 2 2 (0.0% bigger) | |
351 | x: |
|
354 | x: | |
352 | Node Delta Base Delta Length Blob Size |
|
355 | Node Delta Base Delta Length Blob Size | |
353 | ef95c5376f34 000000000000 3 3 |
|
356 | ef95c5376f34 000000000000 3 3 | |
354 | 1406e7411862 ef95c5376f34 14 2 |
|
357 | 1406e7411862 ef95c5376f34 14 2 | |
355 |
|
358 | |||
356 | Total: 17 5 (240.0% bigger) |
|
359 | Total: 17 5 (240.0% bigger) | |
357 | y: |
|
360 | y: | |
358 | Node Delta Base Delta Length Blob Size |
|
361 | Node Delta Base Delta Length Blob Size | |
359 | 076f5e2225b3 000000000000 2 2 |
|
362 | 076f5e2225b3 000000000000 2 2 | |
360 |
|
363 | |||
361 | Total: 2 2 (0.0% bigger) |
|
364 | Total: 2 2 (0.0% bigger) | |
362 | z: |
|
365 | z: | |
363 | Node Delta Base Delta Length Blob Size |
|
366 | Node Delta Base Delta Length Blob Size | |
364 | 69a1b6752270 000000000000 2 2 |
|
367 | 69a1b6752270 000000000000 2 2 | |
365 |
|
368 | |||
366 | Total: 2 2 (0.0% bigger) |
|
369 | Total: 2 2 (0.0% bigger) | |
367 |
|
370 | |||
368 | # Test that if data was prefetched and repacked we dont need to prefetch it again |
|
371 | # Test that if data was prefetched and repacked we dont need to prefetch it again | |
369 | # It ensures that Mercurial looks not only in loose files but in packs as well |
|
372 | # It ensures that Mercurial looks not only in loose files but in packs as well | |
370 |
|
373 | |||
371 | $ hg prefetch --repack |
|
374 | $ hg prefetch --repack | |
372 | (running background incremental repack) |
|
375 | (running background incremental repack) |
General Comments 0
You need to be logged in to leave comments.
Login now