Show More
@@ -1,376 +1,377 b'' | |||||
1 | #require no-windows |
|
1 | #require no-windows | |
2 |
|
2 | |||
3 | $ . "$TESTDIR/remotefilelog-library.sh" |
|
3 | $ . "$TESTDIR/remotefilelog-library.sh" | |
4 | # devel.remotefilelog.ensurestart: reduce race condition with |
|
4 | # devel.remotefilelog.ensurestart: reduce race condition with | |
5 | # waiton{repack/prefetch} |
|
5 | # waiton{repack/prefetch} | |
6 | $ cat >> $HGRCPATH <<EOF |
|
6 | $ cat >> $HGRCPATH <<EOF | |
7 | > [devel] |
|
7 | > [devel] | |
8 | > remotefilelog.ensurestart=True |
|
8 | > remotefilelog.ensurestart=True | |
|
9 | > remotefilelog.bg-wait=True | |||
9 | > EOF |
|
10 | > EOF | |
10 |
|
11 | |||
11 | $ hg init master |
|
12 | $ hg init master | |
12 | $ cd master |
|
13 | $ cd master | |
13 | $ cat >> .hg/hgrc <<EOF |
|
14 | $ cat >> .hg/hgrc <<EOF | |
14 | > [remotefilelog] |
|
15 | > [remotefilelog] | |
15 | > server=True |
|
16 | > server=True | |
16 | > EOF |
|
17 | > EOF | |
17 | $ echo x > x |
|
18 | $ echo x > x | |
18 | $ echo z > z |
|
19 | $ echo z > z | |
19 | $ hg commit -qAm x |
|
20 | $ hg commit -qAm x | |
20 | $ echo x2 > x |
|
21 | $ echo x2 > x | |
21 | $ echo y > y |
|
22 | $ echo y > y | |
22 | $ hg commit -qAm y |
|
23 | $ hg commit -qAm y | |
23 | $ echo w > w |
|
24 | $ echo w > w | |
24 | $ rm z |
|
25 | $ rm z | |
25 | $ hg commit -qAm w |
|
26 | $ hg commit -qAm w | |
26 | $ hg bookmark foo |
|
27 | $ hg bookmark foo | |
27 |
|
28 | |||
28 | $ cd .. |
|
29 | $ cd .. | |
29 |
|
30 | |||
30 | # clone the repo |
|
31 | # clone the repo | |
31 |
|
32 | |||
32 | $ hgcloneshallow ssh://user@dummy/master shallow --noupdate |
|
33 | $ hgcloneshallow ssh://user@dummy/master shallow --noupdate | |
33 | streaming all changes |
|
34 | streaming all changes | |
34 | 2 files to transfer, 776 bytes of data |
|
35 | 2 files to transfer, 776 bytes of data | |
35 | transferred 776 bytes in * seconds (*/sec) (glob) |
|
36 | transferred 776 bytes in * seconds (*/sec) (glob) | |
36 | searching for changes |
|
37 | searching for changes | |
37 | no changes found |
|
38 | no changes found | |
38 |
|
39 | |||
39 | # Set the prefetchdays config to zero so that all commits are prefetched |
|
40 | # Set the prefetchdays config to zero so that all commits are prefetched | |
40 | # no matter what their creation date is. Also set prefetchdelay config |
|
41 | # no matter what their creation date is. Also set prefetchdelay config | |
41 | # to zero so that there is no delay between prefetches. |
|
42 | # to zero so that there is no delay between prefetches. | |
42 | $ cd shallow |
|
43 | $ cd shallow | |
43 | $ cat >> .hg/hgrc <<EOF |
|
44 | $ cat >> .hg/hgrc <<EOF | |
44 | > [remotefilelog] |
|
45 | > [remotefilelog] | |
45 | > prefetchdays=0 |
|
46 | > prefetchdays=0 | |
46 | > prefetchdelay=0 |
|
47 | > prefetchdelay=0 | |
47 | > EOF |
|
48 | > EOF | |
48 | $ cd .. |
|
49 | $ cd .. | |
49 |
|
50 | |||
50 | # prefetch a revision |
|
51 | # prefetch a revision | |
51 | $ cd shallow |
|
52 | $ cd shallow | |
52 |
|
53 | |||
53 | $ hg prefetch -r 0 |
|
54 | $ hg prefetch -r 0 | |
54 | 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob) |
|
55 | 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob) | |
55 |
|
56 | |||
56 | $ hg cat -r 0 x |
|
57 | $ hg cat -r 0 x | |
57 | x |
|
58 | x | |
58 |
|
59 | |||
59 | # background prefetch on pull when configured |
|
60 | # background prefetch on pull when configured | |
60 |
|
61 | |||
61 | $ cat >> .hg/hgrc <<EOF |
|
62 | $ cat >> .hg/hgrc <<EOF | |
62 | > [remotefilelog] |
|
63 | > [remotefilelog] | |
63 | > pullprefetch=bookmark() |
|
64 | > pullprefetch=bookmark() | |
64 | > backgroundprefetch=True |
|
65 | > backgroundprefetch=True | |
65 | > EOF |
|
66 | > EOF | |
66 | $ hg strip tip |
|
67 | $ hg strip tip | |
67 | saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/6b4b6f66ef8c-b4b8bdaf-backup.hg (glob) |
|
68 | saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/6b4b6f66ef8c-b4b8bdaf-backup.hg (glob) | |
68 |
|
69 | |||
69 | $ clearcache |
|
70 | $ clearcache | |
70 | $ hg pull |
|
71 | $ hg pull | |
71 | pulling from ssh://user@dummy/master |
|
72 | pulling from ssh://user@dummy/master | |
72 | searching for changes |
|
73 | searching for changes | |
73 | adding changesets |
|
74 | adding changesets | |
74 | adding manifests |
|
75 | adding manifests | |
75 | adding file changes |
|
76 | adding file changes | |
76 | updating bookmark foo |
|
77 | updating bookmark foo | |
77 | added 1 changesets with 0 changes to 0 files |
|
78 | added 1 changesets with 0 changes to 0 files | |
78 | new changesets 6b4b6f66ef8c |
|
79 | new changesets 6b4b6f66ef8c | |
79 | (run 'hg update' to get a working copy) |
|
80 | (run 'hg update' to get a working copy) | |
80 | prefetching file contents |
|
81 | prefetching file contents | |
81 | $ sleep 0.5 |
|
82 | $ sleep 0.5 | |
82 | $ hg debugwaitonprefetch >/dev/null 2>%1 |
|
83 | $ hg debugwaitonprefetch >/dev/null 2>%1 | |
83 | $ find $CACHEDIR -type f | sort |
|
84 | $ find $CACHEDIR -type f | sort | |
84 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/ef95c5376f34698742fe34f315fd82136f8f68c0 |
|
85 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/ef95c5376f34698742fe34f315fd82136f8f68c0 | |
85 | $TESTTMP/hgcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/076f5e2225b3ff0400b98c92aa6cdf403ee24cca |
|
86 | $TESTTMP/hgcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/076f5e2225b3ff0400b98c92aa6cdf403ee24cca | |
86 | $TESTTMP/hgcache/master/af/f024fe4ab0fece4091de044c58c9ae4233383a/bb6ccd5dceaa5e9dc220e0dad65e051b94f69a2c |
|
87 | $TESTTMP/hgcache/master/af/f024fe4ab0fece4091de044c58c9ae4233383a/bb6ccd5dceaa5e9dc220e0dad65e051b94f69a2c | |
87 | $TESTTMP/hgcache/repos |
|
88 | $TESTTMP/hgcache/repos | |
88 |
|
89 | |||
89 | # background prefetch with repack on pull when configured |
|
90 | # background prefetch with repack on pull when configured | |
90 |
|
91 | |||
91 | $ cat >> .hg/hgrc <<EOF |
|
92 | $ cat >> .hg/hgrc <<EOF | |
92 | > [remotefilelog] |
|
93 | > [remotefilelog] | |
93 | > backgroundrepack=True |
|
94 | > backgroundrepack=True | |
94 | > EOF |
|
95 | > EOF | |
95 | $ hg strip tip |
|
96 | $ hg strip tip | |
96 | saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/6b4b6f66ef8c-b4b8bdaf-backup.hg (glob) |
|
97 | saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/6b4b6f66ef8c-b4b8bdaf-backup.hg (glob) | |
97 |
|
98 | |||
98 | $ clearcache |
|
99 | $ clearcache | |
99 | $ hg pull |
|
100 | $ hg pull | |
100 | pulling from ssh://user@dummy/master |
|
101 | pulling from ssh://user@dummy/master | |
101 | searching for changes |
|
102 | searching for changes | |
102 | adding changesets |
|
103 | adding changesets | |
103 | adding manifests |
|
104 | adding manifests | |
104 | adding file changes |
|
105 | adding file changes | |
105 | updating bookmark foo |
|
106 | updating bookmark foo | |
106 | added 1 changesets with 0 changes to 0 files |
|
107 | added 1 changesets with 0 changes to 0 files | |
107 | new changesets 6b4b6f66ef8c |
|
108 | new changesets 6b4b6f66ef8c | |
108 | (run 'hg update' to get a working copy) |
|
109 | (run 'hg update' to get a working copy) | |
109 | prefetching file contents |
|
110 | prefetching file contents | |
110 | $ sleep 0.5 |
|
111 | $ sleep 0.5 | |
111 | $ hg debugwaitonprefetch >/dev/null 2>%1 |
|
112 | $ hg debugwaitonprefetch >/dev/null 2>%1 | |
112 | $ sleep 0.5 |
|
113 | $ sleep 0.5 | |
113 | $ hg debugwaitonrepack >/dev/null 2>%1 |
|
114 | $ hg debugwaitonrepack >/dev/null 2>%1 | |
114 | $ sleep 0.5 |
|
115 | $ sleep 0.5 | |
115 | $ find $CACHEDIR -type f | sort |
|
116 | $ find $CACHEDIR -type f | sort | |
116 | $TESTTMP/hgcache/master/packs/6e8633deba6e544e5f8edbd7b996d6e31a2c42ae.histidx |
|
117 | $TESTTMP/hgcache/master/packs/6e8633deba6e544e5f8edbd7b996d6e31a2c42ae.histidx | |
117 | $TESTTMP/hgcache/master/packs/6e8633deba6e544e5f8edbd7b996d6e31a2c42ae.histpack |
|
118 | $TESTTMP/hgcache/master/packs/6e8633deba6e544e5f8edbd7b996d6e31a2c42ae.histpack | |
118 | $TESTTMP/hgcache/master/packs/8ce5ab3745465ab83bba30a7b9c295e0c8404652.dataidx |
|
119 | $TESTTMP/hgcache/master/packs/8ce5ab3745465ab83bba30a7b9c295e0c8404652.dataidx | |
119 | $TESTTMP/hgcache/master/packs/8ce5ab3745465ab83bba30a7b9c295e0c8404652.datapack |
|
120 | $TESTTMP/hgcache/master/packs/8ce5ab3745465ab83bba30a7b9c295e0c8404652.datapack | |
120 | $TESTTMP/hgcache/repos |
|
121 | $TESTTMP/hgcache/repos | |
121 |
|
122 | |||
122 | # background prefetch with repack on update when wcprevset configured |
|
123 | # background prefetch with repack on update when wcprevset configured | |
123 |
|
124 | |||
124 | $ clearcache |
|
125 | $ clearcache | |
125 | $ hg up -r 0 |
|
126 | $ hg up -r 0 | |
126 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
127 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
127 | 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob) |
|
128 | 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob) | |
128 | $ find $CACHEDIR -type f | sort |
|
129 | $ find $CACHEDIR -type f | sort | |
129 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0 |
|
130 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0 | |
130 | $TESTTMP/hgcache/master/39/5df8f7c51f007019cb30201c49e884b46b92fa/69a1b67522704ec122181c0890bd16e9d3e7516a |
|
131 | $TESTTMP/hgcache/master/39/5df8f7c51f007019cb30201c49e884b46b92fa/69a1b67522704ec122181c0890bd16e9d3e7516a | |
131 | $TESTTMP/hgcache/repos |
|
132 | $TESTTMP/hgcache/repos | |
132 |
|
133 | |||
133 | $ hg up -r 1 |
|
134 | $ hg up -r 1 | |
134 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
135 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
135 | 2 files fetched over 2 fetches - (2 misses, 0.00% hit ratio) over *s (glob) |
|
136 | 2 files fetched over 2 fetches - (2 misses, 0.00% hit ratio) over *s (glob) | |
136 |
|
137 | |||
137 | $ cat >> .hg/hgrc <<EOF |
|
138 | $ cat >> .hg/hgrc <<EOF | |
138 | > [remotefilelog] |
|
139 | > [remotefilelog] | |
139 | > bgprefetchrevs=.:: |
|
140 | > bgprefetchrevs=.:: | |
140 | > EOF |
|
141 | > EOF | |
141 |
|
142 | |||
142 | $ clearcache |
|
143 | $ clearcache | |
143 | $ hg up -r 0 |
|
144 | $ hg up -r 0 | |
144 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
145 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
145 | * files fetched over * fetches - (* misses, 0.00% hit ratio) over *s (glob) |
|
146 | * files fetched over * fetches - (* misses, 0.00% hit ratio) over *s (glob) | |
146 | $ sleep 1 |
|
147 | $ sleep 1 | |
147 | $ hg debugwaitonprefetch >/dev/null 2>%1 |
|
148 | $ hg debugwaitonprefetch >/dev/null 2>%1 | |
148 | $ sleep 1 |
|
149 | $ sleep 1 | |
149 | $ hg debugwaitonrepack >/dev/null 2>%1 |
|
150 | $ hg debugwaitonrepack >/dev/null 2>%1 | |
150 | $ sleep 1 |
|
151 | $ sleep 1 | |
151 | $ find $CACHEDIR -type f | sort |
|
152 | $ find $CACHEDIR -type f | sort | |
152 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx |
|
153 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx | |
153 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack |
|
154 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack | |
154 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx |
|
155 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx | |
155 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack |
|
156 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack | |
156 | $TESTTMP/hgcache/repos |
|
157 | $TESTTMP/hgcache/repos | |
157 |
|
158 | |||
158 | # Ensure that file 'w' was prefetched - it was not part of the update operation and therefore |
|
159 | # Ensure that file 'w' was prefetched - it was not part of the update operation and therefore | |
159 | # could only be downloaded by the background prefetch |
|
160 | # could only be downloaded by the background prefetch | |
160 |
|
161 | |||
161 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` |
|
162 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` | |
162 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: |
|
163 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: | |
163 | w: |
|
164 | w: | |
164 | Node Delta Base Delta Length Blob Size |
|
165 | Node Delta Base Delta Length Blob Size | |
165 | bb6ccd5dceaa 000000000000 2 2 |
|
166 | bb6ccd5dceaa 000000000000 2 2 | |
166 |
|
167 | |||
167 | Total: 2 2 (0.0% bigger) |
|
168 | Total: 2 2 (0.0% bigger) | |
168 | x: |
|
169 | x: | |
169 | Node Delta Base Delta Length Blob Size |
|
170 | Node Delta Base Delta Length Blob Size | |
170 | ef95c5376f34 000000000000 3 3 |
|
171 | ef95c5376f34 000000000000 3 3 | |
171 | 1406e7411862 ef95c5376f34 14 2 |
|
172 | 1406e7411862 ef95c5376f34 14 2 | |
172 |
|
173 | |||
173 | Total: 17 5 (240.0% bigger) |
|
174 | Total: 17 5 (240.0% bigger) | |
174 | y: |
|
175 | y: | |
175 | Node Delta Base Delta Length Blob Size |
|
176 | Node Delta Base Delta Length Blob Size | |
176 | 076f5e2225b3 000000000000 2 2 |
|
177 | 076f5e2225b3 000000000000 2 2 | |
177 |
|
178 | |||
178 | Total: 2 2 (0.0% bigger) |
|
179 | Total: 2 2 (0.0% bigger) | |
179 | z: |
|
180 | z: | |
180 | Node Delta Base Delta Length Blob Size |
|
181 | Node Delta Base Delta Length Blob Size | |
181 | 69a1b6752270 000000000000 2 2 |
|
182 | 69a1b6752270 000000000000 2 2 | |
182 |
|
183 | |||
183 | Total: 2 2 (0.0% bigger) |
|
184 | Total: 2 2 (0.0% bigger) | |
184 |
|
185 | |||
185 | # background prefetch with repack on commit when wcprevset configured |
|
186 | # background prefetch with repack on commit when wcprevset configured | |
186 |
|
187 | |||
187 | $ cat >> .hg/hgrc <<EOF |
|
188 | $ cat >> .hg/hgrc <<EOF | |
188 | > [remotefilelog] |
|
189 | > [remotefilelog] | |
189 | > bgprefetchrevs=0:: |
|
190 | > bgprefetchrevs=0:: | |
190 | > EOF |
|
191 | > EOF | |
191 |
|
192 | |||
192 | $ clearcache |
|
193 | $ clearcache | |
193 | $ find $CACHEDIR -type f | sort |
|
194 | $ find $CACHEDIR -type f | sort | |
194 | $ echo b > b |
|
195 | $ echo b > b | |
195 | $ hg commit -qAm b |
|
196 | $ hg commit -qAm b | |
196 | * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) |
|
197 | * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) | |
197 | $ hg bookmark temporary |
|
198 | $ hg bookmark temporary | |
198 | $ sleep 1 |
|
199 | $ sleep 1 | |
199 | $ hg debugwaitonprefetch >/dev/null 2>%1 |
|
200 | $ hg debugwaitonprefetch >/dev/null 2>%1 | |
200 | $ sleep 1 |
|
201 | $ sleep 1 | |
201 | $ hg debugwaitonrepack >/dev/null 2>%1 |
|
202 | $ hg debugwaitonrepack >/dev/null 2>%1 | |
202 | $ sleep 1 |
|
203 | $ sleep 1 | |
203 | $ find $CACHEDIR -type f | sort |
|
204 | $ find $CACHEDIR -type f | sort | |
204 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx |
|
205 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx | |
205 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack |
|
206 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack | |
206 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx |
|
207 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx | |
207 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack |
|
208 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack | |
208 | $TESTTMP/hgcache/repos |
|
209 | $TESTTMP/hgcache/repos | |
209 |
|
210 | |||
210 | # Ensure that file 'w' was prefetched - it was not part of the commit operation and therefore |
|
211 | # Ensure that file 'w' was prefetched - it was not part of the commit operation and therefore | |
211 | # could only be downloaded by the background prefetch |
|
212 | # could only be downloaded by the background prefetch | |
212 |
|
213 | |||
213 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` |
|
214 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` | |
214 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: |
|
215 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: | |
215 | w: |
|
216 | w: | |
216 | Node Delta Base Delta Length Blob Size |
|
217 | Node Delta Base Delta Length Blob Size | |
217 | bb6ccd5dceaa 000000000000 2 2 |
|
218 | bb6ccd5dceaa 000000000000 2 2 | |
218 |
|
219 | |||
219 | Total: 2 2 (0.0% bigger) |
|
220 | Total: 2 2 (0.0% bigger) | |
220 | x: |
|
221 | x: | |
221 | Node Delta Base Delta Length Blob Size |
|
222 | Node Delta Base Delta Length Blob Size | |
222 | ef95c5376f34 000000000000 3 3 |
|
223 | ef95c5376f34 000000000000 3 3 | |
223 | 1406e7411862 ef95c5376f34 14 2 |
|
224 | 1406e7411862 ef95c5376f34 14 2 | |
224 |
|
225 | |||
225 | Total: 17 5 (240.0% bigger) |
|
226 | Total: 17 5 (240.0% bigger) | |
226 | y: |
|
227 | y: | |
227 | Node Delta Base Delta Length Blob Size |
|
228 | Node Delta Base Delta Length Blob Size | |
228 | 076f5e2225b3 000000000000 2 2 |
|
229 | 076f5e2225b3 000000000000 2 2 | |
229 |
|
230 | |||
230 | Total: 2 2 (0.0% bigger) |
|
231 | Total: 2 2 (0.0% bigger) | |
231 | z: |
|
232 | z: | |
232 | Node Delta Base Delta Length Blob Size |
|
233 | Node Delta Base Delta Length Blob Size | |
233 | 69a1b6752270 000000000000 2 2 |
|
234 | 69a1b6752270 000000000000 2 2 | |
234 |
|
235 | |||
235 | Total: 2 2 (0.0% bigger) |
|
236 | Total: 2 2 (0.0% bigger) | |
236 |
|
237 | |||
237 | # background prefetch with repack on rebase when wcprevset configured |
|
238 | # background prefetch with repack on rebase when wcprevset configured | |
238 |
|
239 | |||
239 | $ hg up -r 2 |
|
240 | $ hg up -r 2 | |
240 | 3 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
241 | 3 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
241 | (leaving bookmark temporary) |
|
242 | (leaving bookmark temporary) | |
242 | $ clearcache |
|
243 | $ clearcache | |
243 | $ find $CACHEDIR -type f | sort |
|
244 | $ find $CACHEDIR -type f | sort | |
244 | $ hg rebase -s temporary -d foo |
|
245 | $ hg rebase -s temporary -d foo | |
245 | rebasing 3:58147a5b5242 "b" (temporary tip) |
|
246 | rebasing 3:58147a5b5242 "b" (temporary tip) | |
246 | saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/58147a5b5242-c3678817-rebase.hg |
|
247 | saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/58147a5b5242-c3678817-rebase.hg | |
247 | 3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob) |
|
248 | 3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob) | |
248 | $ sleep 1 |
|
249 | $ sleep 1 | |
249 | $ hg debugwaitonprefetch >/dev/null 2>%1 |
|
250 | $ hg debugwaitonprefetch >/dev/null 2>%1 | |
250 | $ sleep 1 |
|
251 | $ sleep 1 | |
251 | $ hg debugwaitonrepack >/dev/null 2>%1 |
|
252 | $ hg debugwaitonrepack >/dev/null 2>%1 | |
252 | $ sleep 1 |
|
253 | $ sleep 1 | |
253 |
|
254 | |||
254 | # Ensure that file 'y' was prefetched - it was not part of the rebase operation and therefore |
|
255 | # Ensure that file 'y' was prefetched - it was not part of the rebase operation and therefore | |
255 | # could only be downloaded by the background prefetch |
|
256 | # could only be downloaded by the background prefetch | |
256 |
|
257 | |||
257 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` |
|
258 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` | |
258 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: |
|
259 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: | |
259 | w: |
|
260 | w: | |
260 | Node Delta Base Delta Length Blob Size |
|
261 | Node Delta Base Delta Length Blob Size | |
261 | bb6ccd5dceaa 000000000000 2 2 |
|
262 | bb6ccd5dceaa 000000000000 2 2 | |
262 |
|
263 | |||
263 | Total: 2 2 (0.0% bigger) |
|
264 | Total: 2 2 (0.0% bigger) | |
264 | x: |
|
265 | x: | |
265 | Node Delta Base Delta Length Blob Size |
|
266 | Node Delta Base Delta Length Blob Size | |
266 | ef95c5376f34 000000000000 3 3 |
|
267 | ef95c5376f34 000000000000 3 3 | |
267 | 1406e7411862 ef95c5376f34 14 2 |
|
268 | 1406e7411862 ef95c5376f34 14 2 | |
268 |
|
269 | |||
269 | Total: 17 5 (240.0% bigger) |
|
270 | Total: 17 5 (240.0% bigger) | |
270 | y: |
|
271 | y: | |
271 | Node Delta Base Delta Length Blob Size |
|
272 | Node Delta Base Delta Length Blob Size | |
272 | 076f5e2225b3 000000000000 2 2 |
|
273 | 076f5e2225b3 000000000000 2 2 | |
273 |
|
274 | |||
274 | Total: 2 2 (0.0% bigger) |
|
275 | Total: 2 2 (0.0% bigger) | |
275 | z: |
|
276 | z: | |
276 | Node Delta Base Delta Length Blob Size |
|
277 | Node Delta Base Delta Length Blob Size | |
277 | 69a1b6752270 000000000000 2 2 |
|
278 | 69a1b6752270 000000000000 2 2 | |
278 |
|
279 | |||
279 | Total: 2 2 (0.0% bigger) |
|
280 | Total: 2 2 (0.0% bigger) | |
280 |
|
281 | |||
281 | # Check that foregound prefetch with no arguments blocks until background prefetches finish |
|
282 | # Check that foregound prefetch with no arguments blocks until background prefetches finish | |
282 |
|
283 | |||
283 | $ hg up -r 3 |
|
284 | $ hg up -r 3 | |
284 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
285 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
285 | $ clearcache |
|
286 | $ clearcache | |
286 | $ hg prefetch --repack |
|
287 | $ hg prefetch --repack | |
287 | waiting for lock on prefetching in $TESTTMP/shallow held by process * on host * (glob) (?) |
|
288 | waiting for lock on prefetching in $TESTTMP/shallow held by process * on host * (glob) (?) | |
288 | got lock after * seconds (glob) (?) |
|
289 | got lock after * seconds (glob) (?) | |
289 | (running background incremental repack) |
|
290 | (running background incremental repack) | |
290 | * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?) |
|
291 | * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?) | |
291 |
|
292 | |||
292 | $ sleep 0.5 |
|
293 | $ sleep 0.5 | |
293 | $ hg debugwaitonrepack >/dev/null 2>%1 |
|
294 | $ hg debugwaitonrepack >/dev/null 2>%1 | |
294 | $ sleep 0.5 |
|
295 | $ sleep 0.5 | |
295 |
|
296 | |||
296 | $ find $CACHEDIR -type f | sort |
|
297 | $ find $CACHEDIR -type f | sort | |
297 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx |
|
298 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx | |
298 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack |
|
299 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack | |
299 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx |
|
300 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx | |
300 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack |
|
301 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack | |
301 | $TESTTMP/hgcache/repos |
|
302 | $TESTTMP/hgcache/repos | |
302 |
|
303 | |||
303 | # Ensure that files were prefetched |
|
304 | # Ensure that files were prefetched | |
304 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` |
|
305 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` | |
305 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: |
|
306 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: | |
306 | w: |
|
307 | w: | |
307 | Node Delta Base Delta Length Blob Size |
|
308 | Node Delta Base Delta Length Blob Size | |
308 | bb6ccd5dceaa 000000000000 2 2 |
|
309 | bb6ccd5dceaa 000000000000 2 2 | |
309 |
|
310 | |||
310 | Total: 2 2 (0.0% bigger) |
|
311 | Total: 2 2 (0.0% bigger) | |
311 | x: |
|
312 | x: | |
312 | Node Delta Base Delta Length Blob Size |
|
313 | Node Delta Base Delta Length Blob Size | |
313 | ef95c5376f34 000000000000 3 3 |
|
314 | ef95c5376f34 000000000000 3 3 | |
314 | 1406e7411862 ef95c5376f34 14 2 |
|
315 | 1406e7411862 ef95c5376f34 14 2 | |
315 |
|
316 | |||
316 | Total: 17 5 (240.0% bigger) |
|
317 | Total: 17 5 (240.0% bigger) | |
317 | y: |
|
318 | y: | |
318 | Node Delta Base Delta Length Blob Size |
|
319 | Node Delta Base Delta Length Blob Size | |
319 | 076f5e2225b3 000000000000 2 2 |
|
320 | 076f5e2225b3 000000000000 2 2 | |
320 |
|
321 | |||
321 | Total: 2 2 (0.0% bigger) |
|
322 | Total: 2 2 (0.0% bigger) | |
322 | z: |
|
323 | z: | |
323 | Node Delta Base Delta Length Blob Size |
|
324 | Node Delta Base Delta Length Blob Size | |
324 | 69a1b6752270 000000000000 2 2 |
|
325 | 69a1b6752270 000000000000 2 2 | |
325 |
|
326 | |||
326 | Total: 2 2 (0.0% bigger) |
|
327 | Total: 2 2 (0.0% bigger) | |
327 |
|
328 | |||
328 | # Check that foreground prefetch fetches revs specified by '. + draft() + bgprefetchrevs + pullprefetch' |
|
329 | # Check that foreground prefetch fetches revs specified by '. + draft() + bgprefetchrevs + pullprefetch' | |
329 |
|
330 | |||
330 | $ clearcache |
|
331 | $ clearcache | |
331 | $ hg prefetch --repack |
|
332 | $ hg prefetch --repack | |
332 | waiting for lock on prefetching in $TESTTMP/shallow held by process * on host * (glob) (?) |
|
333 | waiting for lock on prefetching in $TESTTMP/shallow held by process * on host * (glob) (?) | |
333 | got lock after * seconds (glob) (?) |
|
334 | got lock after * seconds (glob) (?) | |
334 | (running background incremental repack) |
|
335 | (running background incremental repack) | |
335 | * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?) |
|
336 | * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?) | |
336 | $ sleep 0.5 |
|
337 | $ sleep 0.5 | |
337 | $ hg debugwaitonrepack >/dev/null 2>%1 |
|
338 | $ hg debugwaitonrepack >/dev/null 2>%1 | |
338 | $ sleep 0.5 |
|
339 | $ sleep 0.5 | |
339 |
|
340 | |||
340 | $ find $CACHEDIR -type f | sort |
|
341 | $ find $CACHEDIR -type f | sort | |
341 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx |
|
342 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx | |
342 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack |
|
343 | $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack | |
343 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx |
|
344 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.dataidx | |
344 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack |
|
345 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407.datapack | |
345 | $TESTTMP/hgcache/repos |
|
346 | $TESTTMP/hgcache/repos | |
346 |
|
347 | |||
347 | # Ensure that files were prefetched |
|
348 | # Ensure that files were prefetched | |
348 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` |
|
349 | $ hg debugdatapack `ls -ct $TESTTMP/hgcache/master/packs/*.datapack | head -n 1` | |
349 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: |
|
350 | $TESTTMP/hgcache/master/packs/f4d50848e0b465e9bfd2875f213044c06cfd7407: | |
350 | w: |
|
351 | w: | |
351 | Node Delta Base Delta Length Blob Size |
|
352 | Node Delta Base Delta Length Blob Size | |
352 | bb6ccd5dceaa 000000000000 2 2 |
|
353 | bb6ccd5dceaa 000000000000 2 2 | |
353 |
|
354 | |||
354 | Total: 2 2 (0.0% bigger) |
|
355 | Total: 2 2 (0.0% bigger) | |
355 | x: |
|
356 | x: | |
356 | Node Delta Base Delta Length Blob Size |
|
357 | Node Delta Base Delta Length Blob Size | |
357 | ef95c5376f34 000000000000 3 3 |
|
358 | ef95c5376f34 000000000000 3 3 | |
358 | 1406e7411862 ef95c5376f34 14 2 |
|
359 | 1406e7411862 ef95c5376f34 14 2 | |
359 |
|
360 | |||
360 | Total: 17 5 (240.0% bigger) |
|
361 | Total: 17 5 (240.0% bigger) | |
361 | y: |
|
362 | y: | |
362 | Node Delta Base Delta Length Blob Size |
|
363 | Node Delta Base Delta Length Blob Size | |
363 | 076f5e2225b3 000000000000 2 2 |
|
364 | 076f5e2225b3 000000000000 2 2 | |
364 |
|
365 | |||
365 | Total: 2 2 (0.0% bigger) |
|
366 | Total: 2 2 (0.0% bigger) | |
366 | z: |
|
367 | z: | |
367 | Node Delta Base Delta Length Blob Size |
|
368 | Node Delta Base Delta Length Blob Size | |
368 | 69a1b6752270 000000000000 2 2 |
|
369 | 69a1b6752270 000000000000 2 2 | |
369 |
|
370 | |||
370 | Total: 2 2 (0.0% bigger) |
|
371 | Total: 2 2 (0.0% bigger) | |
371 |
|
372 | |||
372 | # Test that if data was prefetched and repacked we dont need to prefetch it again |
|
373 | # Test that if data was prefetched and repacked we dont need to prefetch it again | |
373 | # It ensures that Mercurial looks not only in loose files but in packs as well |
|
374 | # It ensures that Mercurial looks not only in loose files but in packs as well | |
374 |
|
375 | |||
375 | $ hg prefetch --repack |
|
376 | $ hg prefetch --repack | |
376 | (running background incremental repack) |
|
377 | (running background incremental repack) |
@@ -1,379 +1,380 b'' | |||||
1 | #require no-windows |
|
1 | #require no-windows | |
2 |
|
2 | |||
3 | $ . "$TESTDIR/remotefilelog-library.sh" |
|
3 | $ . "$TESTDIR/remotefilelog-library.sh" | |
4 | # devel.remotefilelog.ensurestart: reduce race condition with |
|
4 | # devel.remotefilelog.ensurestart: reduce race condition with | |
5 | # waiton{repack/prefetch} |
|
5 | # waiton{repack/prefetch} | |
6 | $ cat >> $HGRCPATH <<EOF |
|
6 | $ cat >> $HGRCPATH <<EOF | |
7 | > [remotefilelog] |
|
7 | > [remotefilelog] | |
8 | > fastdatapack=True |
|
8 | > fastdatapack=True | |
9 | > [devel] |
|
9 | > [devel] | |
10 | > remotefilelog.ensurestart=True |
|
10 | > remotefilelog.ensurestart=True | |
|
11 | > remotefilelog.bg-wait=True | |||
11 | > EOF |
|
12 | > EOF | |
12 |
|
13 | |||
13 | $ hg init master |
|
14 | $ hg init master | |
14 | $ cd master |
|
15 | $ cd master | |
15 | $ cat >> .hg/hgrc <<EOF |
|
16 | $ cat >> .hg/hgrc <<EOF | |
16 | > [remotefilelog] |
|
17 | > [remotefilelog] | |
17 | > server=True |
|
18 | > server=True | |
18 | > serverexpiration=-1 |
|
19 | > serverexpiration=-1 | |
19 | > EOF |
|
20 | > EOF | |
20 | $ echo x > x |
|
21 | $ echo x > x | |
21 | $ hg commit -qAm x |
|
22 | $ hg commit -qAm x | |
22 | $ echo x >> x |
|
23 | $ echo x >> x | |
23 | $ hg commit -qAm x2 |
|
24 | $ hg commit -qAm x2 | |
24 | $ cd .. |
|
25 | $ cd .. | |
25 |
|
26 | |||
26 | $ hgcloneshallow ssh://user@dummy/master shallow -q |
|
27 | $ hgcloneshallow ssh://user@dummy/master shallow -q | |
27 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob) |
|
28 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob) | |
28 |
|
29 | |||
29 | # Set the prefetchdays config to zero so that all commits are prefetched |
|
30 | # Set the prefetchdays config to zero so that all commits are prefetched | |
30 | # no matter what their creation date is. |
|
31 | # no matter what their creation date is. | |
31 | $ cd shallow |
|
32 | $ cd shallow | |
32 | $ cat >> .hg/hgrc <<EOF |
|
33 | $ cat >> .hg/hgrc <<EOF | |
33 | > [remotefilelog] |
|
34 | > [remotefilelog] | |
34 | > prefetchdays=0 |
|
35 | > prefetchdays=0 | |
35 | > EOF |
|
36 | > EOF | |
36 | $ cd .. |
|
37 | $ cd .. | |
37 |
|
38 | |||
38 | # Test that repack cleans up the old files and creates new packs |
|
39 | # Test that repack cleans up the old files and creates new packs | |
39 |
|
40 | |||
40 | $ cd shallow |
|
41 | $ cd shallow | |
41 | $ find $CACHEDIR | sort |
|
42 | $ find $CACHEDIR | sort | |
42 | $TESTTMP/hgcache |
|
43 | $TESTTMP/hgcache | |
43 | $TESTTMP/hgcache/master |
|
44 | $TESTTMP/hgcache/master | |
44 | $TESTTMP/hgcache/master/11 |
|
45 | $TESTTMP/hgcache/master/11 | |
45 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072 |
|
46 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072 | |
46 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/aee31534993a501858fb6dd96a065671922e7d51 |
|
47 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/aee31534993a501858fb6dd96a065671922e7d51 | |
47 | $TESTTMP/hgcache/repos |
|
48 | $TESTTMP/hgcache/repos | |
48 |
|
49 | |||
49 | $ hg repack |
|
50 | $ hg repack | |
50 |
|
51 | |||
51 | $ find $CACHEDIR | sort |
|
52 | $ find $CACHEDIR | sort | |
52 | $TESTTMP/hgcache |
|
53 | $TESTTMP/hgcache | |
53 | $TESTTMP/hgcache/master |
|
54 | $TESTTMP/hgcache/master | |
54 | $TESTTMP/hgcache/master/packs |
|
55 | $TESTTMP/hgcache/master/packs | |
55 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx |
|
56 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx | |
56 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack |
|
57 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack | |
57 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx |
|
58 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx | |
58 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.datapack |
|
59 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.datapack | |
59 | $TESTTMP/hgcache/repos |
|
60 | $TESTTMP/hgcache/repos | |
60 |
|
61 | |||
61 | # Test that the packs are readonly |
|
62 | # Test that the packs are readonly | |
62 | $ ls_l $CACHEDIR/master/packs |
|
63 | $ ls_l $CACHEDIR/master/packs | |
63 | -r--r--r-- 1145 1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx |
|
64 | -r--r--r-- 1145 1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx | |
64 | -r--r--r-- 172 1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack |
|
65 | -r--r--r-- 172 1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack | |
65 | -r--r--r-- 1074 b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx |
|
66 | -r--r--r-- 1074 b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx | |
66 | -r--r--r-- 72 b1e0cfc7f345e408a7825e3081501959488d59ce.datapack |
|
67 | -r--r--r-- 72 b1e0cfc7f345e408a7825e3081501959488d59ce.datapack | |
67 |
|
68 | |||
68 | # Test that the data in the new packs is accessible |
|
69 | # Test that the data in the new packs is accessible | |
69 | $ hg cat -r . x |
|
70 | $ hg cat -r . x | |
70 | x |
|
71 | x | |
71 | x |
|
72 | x | |
72 |
|
73 | |||
73 | # Test that adding new data and repacking it results in the loose data and the |
|
74 | # Test that adding new data and repacking it results in the loose data and the | |
74 | # old packs being combined. |
|
75 | # old packs being combined. | |
75 |
|
76 | |||
76 | $ cd ../master |
|
77 | $ cd ../master | |
77 | $ echo x >> x |
|
78 | $ echo x >> x | |
78 | $ hg commit -m x3 |
|
79 | $ hg commit -m x3 | |
79 | $ cd ../shallow |
|
80 | $ cd ../shallow | |
80 | $ hg pull -q |
|
81 | $ hg pull -q | |
81 | $ hg up -q tip |
|
82 | $ hg up -q tip | |
82 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
83 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
83 |
|
84 | |||
84 | $ find $CACHEDIR -type f | sort |
|
85 | $ find $CACHEDIR -type f | sort | |
85 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/d4a3ed9310e5bd9887e3bf779da5077efab28216 |
|
86 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/d4a3ed9310e5bd9887e3bf779da5077efab28216 | |
86 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx |
|
87 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx | |
87 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack |
|
88 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack | |
88 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx |
|
89 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx | |
89 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.datapack |
|
90 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.datapack | |
90 | $TESTTMP/hgcache/repos |
|
91 | $TESTTMP/hgcache/repos | |
91 |
|
92 | |||
92 | $ hg repack --traceback |
|
93 | $ hg repack --traceback | |
93 |
|
94 | |||
94 | $ find $CACHEDIR -type f | sort |
|
95 | $ find $CACHEDIR -type f | sort | |
95 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.dataidx |
|
96 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.dataidx | |
96 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.datapack |
|
97 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.datapack | |
97 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histidx |
|
98 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histidx | |
98 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack |
|
99 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack | |
99 | $TESTTMP/hgcache/repos |
|
100 | $TESTTMP/hgcache/repos | |
100 |
|
101 | |||
101 | # Verify all the file data is still available |
|
102 | # Verify all the file data is still available | |
102 | $ hg cat -r . x |
|
103 | $ hg cat -r . x | |
103 | x |
|
104 | x | |
104 | x |
|
105 | x | |
105 | x |
|
106 | x | |
106 | $ hg cat -r '.^' x |
|
107 | $ hg cat -r '.^' x | |
107 | x |
|
108 | x | |
108 | x |
|
109 | x | |
109 |
|
110 | |||
110 | # Test that repacking again without new data does not delete the pack files |
|
111 | # Test that repacking again without new data does not delete the pack files | |
111 | # and did not change the pack names |
|
112 | # and did not change the pack names | |
112 | $ hg repack |
|
113 | $ hg repack | |
113 | $ find $CACHEDIR -type f | sort |
|
114 | $ find $CACHEDIR -type f | sort | |
114 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.dataidx |
|
115 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.dataidx | |
115 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.datapack |
|
116 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.datapack | |
116 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histidx |
|
117 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histidx | |
117 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack |
|
118 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack | |
118 | $TESTTMP/hgcache/repos |
|
119 | $TESTTMP/hgcache/repos | |
119 |
|
120 | |||
120 | # Run two repacks at once |
|
121 | # Run two repacks at once | |
121 | $ hg repack --config "hooks.prerepack=sleep 3" & |
|
122 | $ hg repack --config "hooks.prerepack=sleep 3" & | |
122 | $ sleep 1 |
|
123 | $ sleep 1 | |
123 | $ hg repack |
|
124 | $ hg repack | |
124 | skipping repack - another repack is already running |
|
125 | skipping repack - another repack is already running | |
125 | $ hg debugwaitonrepack >/dev/null 2>&1 |
|
126 | $ hg debugwaitonrepack >/dev/null 2>&1 | |
126 |
|
127 | |||
127 | # Run repack in the background |
|
128 | # Run repack in the background | |
128 | $ cd ../master |
|
129 | $ cd ../master | |
129 | $ echo x >> x |
|
130 | $ echo x >> x | |
130 | $ hg commit -m x4 |
|
131 | $ hg commit -m x4 | |
131 | $ cd ../shallow |
|
132 | $ cd ../shallow | |
132 | $ hg pull -q |
|
133 | $ hg pull -q | |
133 | $ hg up -q tip |
|
134 | $ hg up -q tip | |
134 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
135 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
135 | $ find $CACHEDIR -type f | sort |
|
136 | $ find $CACHEDIR -type f | sort | |
136 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1bb2e6237e035c8f8ef508e281f1ce075bc6db72 |
|
137 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1bb2e6237e035c8f8ef508e281f1ce075bc6db72 | |
137 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.dataidx |
|
138 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.dataidx | |
138 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.datapack |
|
139 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.datapack | |
139 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histidx |
|
140 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histidx | |
140 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack |
|
141 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack | |
141 | $TESTTMP/hgcache/repos |
|
142 | $TESTTMP/hgcache/repos | |
142 |
|
143 | |||
143 | $ hg repack --background |
|
144 | $ hg repack --background | |
144 | (running background repack) |
|
145 | (running background repack) | |
145 | $ sleep 0.5 |
|
146 | $ sleep 0.5 | |
146 | $ hg debugwaitonrepack >/dev/null 2>&1 |
|
147 | $ hg debugwaitonrepack >/dev/null 2>&1 | |
147 | $ find $CACHEDIR -type f | sort |
|
148 | $ find $CACHEDIR -type f | sort | |
148 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.dataidx |
|
149 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.dataidx | |
149 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.datapack |
|
150 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.datapack | |
150 | $TESTTMP/hgcache/master/packs/604552d403a1381749faf656feca0ca265a6d52c.histidx |
|
151 | $TESTTMP/hgcache/master/packs/604552d403a1381749faf656feca0ca265a6d52c.histidx | |
151 | $TESTTMP/hgcache/master/packs/604552d403a1381749faf656feca0ca265a6d52c.histpack |
|
152 | $TESTTMP/hgcache/master/packs/604552d403a1381749faf656feca0ca265a6d52c.histpack | |
152 | $TESTTMP/hgcache/repos |
|
153 | $TESTTMP/hgcache/repos | |
153 |
|
154 | |||
154 | # Test debug commands |
|
155 | # Test debug commands | |
155 |
|
156 | |||
156 | $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.datapack |
|
157 | $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.datapack | |
157 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0: |
|
158 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0: | |
158 | x: |
|
159 | x: | |
159 | Node Delta Base Delta Length Blob Size |
|
160 | Node Delta Base Delta Length Blob Size | |
160 | 1bb2e6237e03 000000000000 8 8 |
|
161 | 1bb2e6237e03 000000000000 8 8 | |
161 | d4a3ed9310e5 1bb2e6237e03 12 6 |
|
162 | d4a3ed9310e5 1bb2e6237e03 12 6 | |
162 | aee31534993a d4a3ed9310e5 12 4 |
|
163 | aee31534993a d4a3ed9310e5 12 4 | |
163 |
|
164 | |||
164 | Total: 32 18 (77.8% bigger) |
|
165 | Total: 32 18 (77.8% bigger) | |
165 | $ hg debugdatapack --long $TESTTMP/hgcache/master/packs/*.datapack |
|
166 | $ hg debugdatapack --long $TESTTMP/hgcache/master/packs/*.datapack | |
166 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0: |
|
167 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0: | |
167 | x: |
|
168 | x: | |
168 | Node Delta Base Delta Length Blob Size |
|
169 | Node Delta Base Delta Length Blob Size | |
169 | 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 0000000000000000000000000000000000000000 8 8 |
|
170 | 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 0000000000000000000000000000000000000000 8 8 | |
170 | d4a3ed9310e5bd9887e3bf779da5077efab28216 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 12 6 |
|
171 | d4a3ed9310e5bd9887e3bf779da5077efab28216 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 12 6 | |
171 | aee31534993a501858fb6dd96a065671922e7d51 d4a3ed9310e5bd9887e3bf779da5077efab28216 12 4 |
|
172 | aee31534993a501858fb6dd96a065671922e7d51 d4a3ed9310e5bd9887e3bf779da5077efab28216 12 4 | |
172 |
|
173 | |||
173 | Total: 32 18 (77.8% bigger) |
|
174 | Total: 32 18 (77.8% bigger) | |
174 | $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.datapack --node d4a3ed9310e5bd9887e3bf779da5077efab28216 |
|
175 | $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.datapack --node d4a3ed9310e5bd9887e3bf779da5077efab28216 | |
175 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0: |
|
176 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0: | |
176 |
|
177 | |||
177 | x |
|
178 | x | |
178 | Node Delta Base Delta SHA1 Delta Length |
|
179 | Node Delta Base Delta SHA1 Delta Length | |
179 | d4a3ed9310e5bd9887e3bf779da5077efab28216 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 77029ab56e83ea2115dd53ff87483682abe5d7ca 12 |
|
180 | d4a3ed9310e5bd9887e3bf779da5077efab28216 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 77029ab56e83ea2115dd53ff87483682abe5d7ca 12 | |
180 | Node Delta Base Delta SHA1 Delta Length |
|
181 | Node Delta Base Delta SHA1 Delta Length | |
181 | 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 0000000000000000000000000000000000000000 7ca8c71a64f7b56380e77573da2f7a5fdd2ecdb5 8 |
|
182 | 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 0000000000000000000000000000000000000000 7ca8c71a64f7b56380e77573da2f7a5fdd2ecdb5 8 | |
182 | $ hg debughistorypack $TESTTMP/hgcache/master/packs/*.histidx |
|
183 | $ hg debughistorypack $TESTTMP/hgcache/master/packs/*.histidx | |
183 |
|
184 | |||
184 | x |
|
185 | x | |
185 | Node P1 Node P2 Node Link Node Copy From |
|
186 | Node P1 Node P2 Node Link Node Copy From | |
186 | 1bb2e6237e03 d4a3ed9310e5 000000000000 0b03bbc9e1e7 |
|
187 | 1bb2e6237e03 d4a3ed9310e5 000000000000 0b03bbc9e1e7 | |
187 | d4a3ed9310e5 aee31534993a 000000000000 421535db10b6 |
|
188 | d4a3ed9310e5 aee31534993a 000000000000 421535db10b6 | |
188 | aee31534993a 1406e7411862 000000000000 a89d614e2364 |
|
189 | aee31534993a 1406e7411862 000000000000 a89d614e2364 | |
189 | 1406e7411862 000000000000 000000000000 b292c1e3311f |
|
190 | 1406e7411862 000000000000 000000000000 b292c1e3311f | |
190 |
|
191 | |||
191 | # Test copy tracing from a pack |
|
192 | # Test copy tracing from a pack | |
192 | $ cd ../master |
|
193 | $ cd ../master | |
193 | $ hg mv x y |
|
194 | $ hg mv x y | |
194 | $ hg commit -m 'move x to y' |
|
195 | $ hg commit -m 'move x to y' | |
195 | $ cd ../shallow |
|
196 | $ cd ../shallow | |
196 | $ hg pull -q |
|
197 | $ hg pull -q | |
197 | $ hg up -q tip |
|
198 | $ hg up -q tip | |
198 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
199 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
199 | $ hg repack |
|
200 | $ hg repack | |
200 | $ hg log -f y -T '{desc}\n' |
|
201 | $ hg log -f y -T '{desc}\n' | |
201 | move x to y |
|
202 | move x to y | |
202 | x4 |
|
203 | x4 | |
203 | x3 |
|
204 | x3 | |
204 | x2 |
|
205 | x2 | |
205 | x |
|
206 | x | |
206 |
|
207 | |||
207 | # Test copy trace across rename and back |
|
208 | # Test copy trace across rename and back | |
208 | $ cp -R $TESTTMP/hgcache/master/packs $TESTTMP/backuppacks |
|
209 | $ cp -R $TESTTMP/hgcache/master/packs $TESTTMP/backuppacks | |
209 | $ cd ../master |
|
210 | $ cd ../master | |
210 | $ hg mv y x |
|
211 | $ hg mv y x | |
211 | $ hg commit -m 'move y back to x' |
|
212 | $ hg commit -m 'move y back to x' | |
212 | $ hg revert -r 0 x |
|
213 | $ hg revert -r 0 x | |
213 | $ mv x y |
|
214 | $ mv x y | |
214 | $ hg add y |
|
215 | $ hg add y | |
215 | $ echo >> y |
|
216 | $ echo >> y | |
216 | $ hg revert x |
|
217 | $ hg revert x | |
217 | $ hg commit -m 'add y back without metadata' |
|
218 | $ hg commit -m 'add y back without metadata' | |
218 | $ cd ../shallow |
|
219 | $ cd ../shallow | |
219 | $ hg pull -q |
|
220 | $ hg pull -q | |
220 | $ hg up -q tip |
|
221 | $ hg up -q tip | |
221 | 2 files fetched over 2 fetches - (2 misses, 0.00% hit ratio) over * (glob) |
|
222 | 2 files fetched over 2 fetches - (2 misses, 0.00% hit ratio) over * (glob) | |
222 | $ hg repack |
|
223 | $ hg repack | |
223 | $ ls $TESTTMP/hgcache/master/packs |
|
224 | $ ls $TESTTMP/hgcache/master/packs | |
224 | bfd60adb76018bb952e27cd23fc151bf94865d7d.histidx |
|
225 | bfd60adb76018bb952e27cd23fc151bf94865d7d.histidx | |
225 | bfd60adb76018bb952e27cd23fc151bf94865d7d.histpack |
|
226 | bfd60adb76018bb952e27cd23fc151bf94865d7d.histpack | |
226 | fb3aa57b22789ebcc45706c352e2d6af099c5816.dataidx |
|
227 | fb3aa57b22789ebcc45706c352e2d6af099c5816.dataidx | |
227 | fb3aa57b22789ebcc45706c352e2d6af099c5816.datapack |
|
228 | fb3aa57b22789ebcc45706c352e2d6af099c5816.datapack | |
228 | $ hg debughistorypack $TESTTMP/hgcache/master/packs/*.histidx |
|
229 | $ hg debughistorypack $TESTTMP/hgcache/master/packs/*.histidx | |
229 |
|
230 | |||
230 | x |
|
231 | x | |
231 | Node P1 Node P2 Node Link Node Copy From |
|
232 | Node P1 Node P2 Node Link Node Copy From | |
232 | cd410a44d584 577959738234 000000000000 609547eda446 y |
|
233 | cd410a44d584 577959738234 000000000000 609547eda446 y | |
233 | 1bb2e6237e03 d4a3ed9310e5 000000000000 0b03bbc9e1e7 |
|
234 | 1bb2e6237e03 d4a3ed9310e5 000000000000 0b03bbc9e1e7 | |
234 | d4a3ed9310e5 aee31534993a 000000000000 421535db10b6 |
|
235 | d4a3ed9310e5 aee31534993a 000000000000 421535db10b6 | |
235 | aee31534993a 1406e7411862 000000000000 a89d614e2364 |
|
236 | aee31534993a 1406e7411862 000000000000 a89d614e2364 | |
236 | 1406e7411862 000000000000 000000000000 b292c1e3311f |
|
237 | 1406e7411862 000000000000 000000000000 b292c1e3311f | |
237 |
|
238 | |||
238 | y |
|
239 | y | |
239 | Node P1 Node P2 Node Link Node Copy From |
|
240 | Node P1 Node P2 Node Link Node Copy From | |
240 | 577959738234 1bb2e6237e03 000000000000 c7faf2fc439a x |
|
241 | 577959738234 1bb2e6237e03 000000000000 c7faf2fc439a x | |
241 | 21f46f2721e7 000000000000 000000000000 d6868642b790 |
|
242 | 21f46f2721e7 000000000000 000000000000 d6868642b790 | |
242 | $ hg strip -r '.^' |
|
243 | $ hg strip -r '.^' | |
243 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
244 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
244 | saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/609547eda446-b26b56a8-backup.hg (glob) |
|
245 | saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/609547eda446-b26b56a8-backup.hg (glob) | |
245 | $ hg -R ../master strip -r '.^' |
|
246 | $ hg -R ../master strip -r '.^' | |
246 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
247 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
247 | saved backup bundle to $TESTTMP/master/.hg/strip-backup/609547eda446-b26b56a8-backup.hg (glob) |
|
248 | saved backup bundle to $TESTTMP/master/.hg/strip-backup/609547eda446-b26b56a8-backup.hg (glob) | |
248 |
|
249 | |||
249 | $ rm -rf $TESTTMP/hgcache/master/packs |
|
250 | $ rm -rf $TESTTMP/hgcache/master/packs | |
250 | $ cp -R $TESTTMP/backuppacks $TESTTMP/hgcache/master/packs |
|
251 | $ cp -R $TESTTMP/backuppacks $TESTTMP/hgcache/master/packs | |
251 |
|
252 | |||
252 | # Test repacking datapack without history |
|
253 | # Test repacking datapack without history | |
253 | $ rm -rf $CACHEDIR/master/packs/*hist* |
|
254 | $ rm -rf $CACHEDIR/master/packs/*hist* | |
254 | $ hg repack |
|
255 | $ hg repack | |
255 | $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.datapack |
|
256 | $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.datapack | |
256 | $TESTTMP/hgcache/master/packs/922aca43dbbeda4d250565372e8892ec7b08da6a: |
|
257 | $TESTTMP/hgcache/master/packs/922aca43dbbeda4d250565372e8892ec7b08da6a: | |
257 | x: |
|
258 | x: | |
258 | Node Delta Base Delta Length Blob Size |
|
259 | Node Delta Base Delta Length Blob Size | |
259 | 1bb2e6237e03 000000000000 8 8 |
|
260 | 1bb2e6237e03 000000000000 8 8 | |
260 | d4a3ed9310e5 1bb2e6237e03 12 6 |
|
261 | d4a3ed9310e5 1bb2e6237e03 12 6 | |
261 | aee31534993a d4a3ed9310e5 12 4 |
|
262 | aee31534993a d4a3ed9310e5 12 4 | |
262 |
|
263 | |||
263 | Total: 32 18 (77.8% bigger) |
|
264 | Total: 32 18 (77.8% bigger) | |
264 | y: |
|
265 | y: | |
265 | Node Delta Base Delta Length Blob Size |
|
266 | Node Delta Base Delta Length Blob Size | |
266 | 577959738234 000000000000 70 8 |
|
267 | 577959738234 000000000000 70 8 | |
267 |
|
268 | |||
268 | Total: 70 8 (775.0% bigger) |
|
269 | Total: 70 8 (775.0% bigger) | |
269 |
|
270 | |||
270 | $ hg cat -r ".^" x |
|
271 | $ hg cat -r ".^" x | |
271 | x |
|
272 | x | |
272 | x |
|
273 | x | |
273 | x |
|
274 | x | |
274 | x |
|
275 | x | |
275 |
|
276 | |||
276 | Incremental repack |
|
277 | Incremental repack | |
277 | $ rm -rf $CACHEDIR/master/packs/* |
|
278 | $ rm -rf $CACHEDIR/master/packs/* | |
278 | $ cat >> .hg/hgrc <<EOF |
|
279 | $ cat >> .hg/hgrc <<EOF | |
279 | > [remotefilelog] |
|
280 | > [remotefilelog] | |
280 | > data.generations=60 |
|
281 | > data.generations=60 | |
281 | > 150 |
|
282 | > 150 | |
282 | > EOF |
|
283 | > EOF | |
283 |
|
284 | |||
284 | Single pack - repack does nothing |
|
285 | Single pack - repack does nothing | |
285 | $ hg prefetch -r 0 |
|
286 | $ hg prefetch -r 0 | |
286 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
287 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
287 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack |
|
288 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack | |
288 | [1] |
|
289 | [1] | |
289 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack |
|
290 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack | |
290 | [1] |
|
291 | [1] | |
291 | $ hg repack --incremental |
|
292 | $ hg repack --incremental | |
292 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack |
|
293 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack | |
293 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack |
|
294 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack | |
294 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack |
|
295 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack | |
295 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack |
|
296 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack | |
296 |
|
297 | |||
297 | 3 gen1 packs, 1 gen0 pack - packs 3 gen1 into 1 |
|
298 | 3 gen1 packs, 1 gen0 pack - packs 3 gen1 into 1 | |
298 | $ hg prefetch -r 1 |
|
299 | $ hg prefetch -r 1 | |
299 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
300 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
300 | $ hg prefetch -r 2 |
|
301 | $ hg prefetch -r 2 | |
301 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
302 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
302 | $ hg prefetch -r 3 |
|
303 | $ hg prefetch -r 3 | |
303 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
304 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
304 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack |
|
305 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack | |
305 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack |
|
306 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack | |
306 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack |
|
307 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack | |
307 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack |
|
308 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack | |
308 | $ hg repack --incremental |
|
309 | $ hg repack --incremental | |
309 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack |
|
310 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack | |
310 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack |
|
311 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack | |
311 | -r--r--r-- 226 39443fa1064182e93d968b5cba292eb5283260d0.datapack |
|
312 | -r--r--r-- 226 39443fa1064182e93d968b5cba292eb5283260d0.datapack | |
312 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack |
|
313 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack | |
313 | -r--r--r-- 336 604552d403a1381749faf656feca0ca265a6d52c.histpack |
|
314 | -r--r--r-- 336 604552d403a1381749faf656feca0ca265a6d52c.histpack | |
314 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack |
|
315 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack | |
315 |
|
316 | |||
316 | 1 gen3 pack, 1 gen0 pack - does nothing |
|
317 | 1 gen3 pack, 1 gen0 pack - does nothing | |
317 | $ hg repack --incremental |
|
318 | $ hg repack --incremental | |
318 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack |
|
319 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack | |
319 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack |
|
320 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack | |
320 | -r--r--r-- 226 39443fa1064182e93d968b5cba292eb5283260d0.datapack |
|
321 | -r--r--r-- 226 39443fa1064182e93d968b5cba292eb5283260d0.datapack | |
321 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack |
|
322 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack | |
322 | -r--r--r-- 336 604552d403a1381749faf656feca0ca265a6d52c.histpack |
|
323 | -r--r--r-- 336 604552d403a1381749faf656feca0ca265a6d52c.histpack | |
323 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack |
|
324 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack | |
324 |
|
325 | |||
325 | Pull should run background repack |
|
326 | Pull should run background repack | |
326 | $ cat >> .hg/hgrc <<EOF |
|
327 | $ cat >> .hg/hgrc <<EOF | |
327 | > [remotefilelog] |
|
328 | > [remotefilelog] | |
328 | > backgroundrepack=True |
|
329 | > backgroundrepack=True | |
329 | > EOF |
|
330 | > EOF | |
330 | $ clearcache |
|
331 | $ clearcache | |
331 | $ hg prefetch -r 0 |
|
332 | $ hg prefetch -r 0 | |
332 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
333 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
333 | $ hg prefetch -r 1 |
|
334 | $ hg prefetch -r 1 | |
334 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
335 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
335 | $ hg prefetch -r 2 |
|
336 | $ hg prefetch -r 2 | |
336 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
337 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
337 | $ hg prefetch -r 3 |
|
338 | $ hg prefetch -r 3 | |
338 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
339 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
339 |
|
340 | |||
340 | $ hg pull |
|
341 | $ hg pull | |
341 | pulling from ssh://user@dummy/master |
|
342 | pulling from ssh://user@dummy/master | |
342 | searching for changes |
|
343 | searching for changes | |
343 | no changes found |
|
344 | no changes found | |
344 | (running background incremental repack) |
|
345 | (running background incremental repack) | |
345 | $ sleep 0.5 |
|
346 | $ sleep 0.5 | |
346 | $ hg debugwaitonrepack >/dev/null 2>&1 |
|
347 | $ hg debugwaitonrepack >/dev/null 2>&1 | |
347 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack |
|
348 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack | |
348 | -r--r--r-- 303 156a6c1c83aeb69422d7936e0a46ba9bc06a71c0.datapack |
|
349 | -r--r--r-- 303 156a6c1c83aeb69422d7936e0a46ba9bc06a71c0.datapack | |
349 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack |
|
350 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack | |
350 | -r--r--r-- 336 604552d403a1381749faf656feca0ca265a6d52c.histpack |
|
351 | -r--r--r-- 336 604552d403a1381749faf656feca0ca265a6d52c.histpack | |
351 |
|
352 | |||
352 | Test environment variable resolution |
|
353 | Test environment variable resolution | |
353 | $ CACHEPATH=$TESTTMP/envcache hg prefetch --config 'remotefilelog.cachepath=$CACHEPATH' |
|
354 | $ CACHEPATH=$TESTTMP/envcache hg prefetch --config 'remotefilelog.cachepath=$CACHEPATH' | |
354 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
355 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
355 | $ find $TESTTMP/envcache | sort |
|
356 | $ find $TESTTMP/envcache | sort | |
356 | $TESTTMP/envcache |
|
357 | $TESTTMP/envcache | |
357 | $TESTTMP/envcache/master |
|
358 | $TESTTMP/envcache/master | |
358 | $TESTTMP/envcache/master/95 |
|
359 | $TESTTMP/envcache/master/95 | |
359 | $TESTTMP/envcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a |
|
360 | $TESTTMP/envcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a | |
360 | $TESTTMP/envcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/577959738234a1eb241ed3ed4b22a575833f56e0 |
|
361 | $TESTTMP/envcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/577959738234a1eb241ed3ed4b22a575833f56e0 | |
361 | $TESTTMP/envcache/repos |
|
362 | $TESTTMP/envcache/repos | |
362 |
|
363 | |||
363 | Test local remotefilelog blob is correct when based on a pack |
|
364 | Test local remotefilelog blob is correct when based on a pack | |
364 | $ hg prefetch -r . |
|
365 | $ hg prefetch -r . | |
365 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
366 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
366 | $ echo >> y |
|
367 | $ echo >> y | |
367 | $ hg commit -m y2 |
|
368 | $ hg commit -m y2 | |
368 | $ hg debugremotefilelog .hg/store/data/95cb0bfd2977c761298d9624e4b4d4c72a39974a/b70860edba4f8242a1d52f2a94679dd23cb76808 |
|
369 | $ hg debugremotefilelog .hg/store/data/95cb0bfd2977c761298d9624e4b4d4c72a39974a/b70860edba4f8242a1d52f2a94679dd23cb76808 | |
369 | size: 9 bytes |
|
370 | size: 9 bytes | |
370 | path: .hg/store/data/95cb0bfd2977c761298d9624e4b4d4c72a39974a/b70860edba4f8242a1d52f2a94679dd23cb76808 |
|
371 | path: .hg/store/data/95cb0bfd2977c761298d9624e4b4d4c72a39974a/b70860edba4f8242a1d52f2a94679dd23cb76808 | |
371 | key: b70860edba4f |
|
372 | key: b70860edba4f | |
372 |
|
373 | |||
373 | node => p1 p2 linknode copyfrom |
|
374 | node => p1 p2 linknode copyfrom | |
374 | b70860edba4f => 577959738234 000000000000 08d3fbc98c48 |
|
375 | b70860edba4f => 577959738234 000000000000 08d3fbc98c48 | |
375 | 577959738234 => 1bb2e6237e03 000000000000 c7faf2fc439a x |
|
376 | 577959738234 => 1bb2e6237e03 000000000000 c7faf2fc439a x | |
376 | 1bb2e6237e03 => d4a3ed9310e5 000000000000 0b03bbc9e1e7 |
|
377 | 1bb2e6237e03 => d4a3ed9310e5 000000000000 0b03bbc9e1e7 | |
377 | d4a3ed9310e5 => aee31534993a 000000000000 421535db10b6 |
|
378 | d4a3ed9310e5 => aee31534993a 000000000000 421535db10b6 | |
378 | aee31534993a => 1406e7411862 000000000000 a89d614e2364 |
|
379 | aee31534993a => 1406e7411862 000000000000 a89d614e2364 | |
379 | 1406e7411862 => 000000000000 000000000000 b292c1e3311f |
|
380 | 1406e7411862 => 000000000000 000000000000 b292c1e3311f |
@@ -1,459 +1,460 b'' | |||||
1 | #require no-windows |
|
1 | #require no-windows | |
2 |
|
2 | |||
3 | $ . "$TESTDIR/remotefilelog-library.sh" |
|
3 | $ . "$TESTDIR/remotefilelog-library.sh" | |
4 | # devel.remotefilelog.ensurestart: reduce race condition with |
|
4 | # devel.remotefilelog.ensurestart: reduce race condition with | |
5 | # waiton{repack/prefetch} |
|
5 | # waiton{repack/prefetch} | |
6 | $ cat >> $HGRCPATH <<EOF |
|
6 | $ cat >> $HGRCPATH <<EOF | |
7 | > [devel] |
|
7 | > [devel] | |
8 | > remotefilelog.ensurestart=True |
|
8 | > remotefilelog.ensurestart=True | |
|
9 | > remotefilelog.bg-wait=True | |||
9 | > EOF |
|
10 | > EOF | |
10 |
|
11 | |||
11 | $ hg init master |
|
12 | $ hg init master | |
12 | $ cd master |
|
13 | $ cd master | |
13 | $ cat >> .hg/hgrc <<EOF |
|
14 | $ cat >> .hg/hgrc <<EOF | |
14 | > [remotefilelog] |
|
15 | > [remotefilelog] | |
15 | > server=True |
|
16 | > server=True | |
16 | > serverexpiration=-1 |
|
17 | > serverexpiration=-1 | |
17 | > EOF |
|
18 | > EOF | |
18 | $ echo x > x |
|
19 | $ echo x > x | |
19 | $ hg commit -qAm x |
|
20 | $ hg commit -qAm x | |
20 | $ echo x >> x |
|
21 | $ echo x >> x | |
21 | $ hg commit -qAm x2 |
|
22 | $ hg commit -qAm x2 | |
22 | $ cd .. |
|
23 | $ cd .. | |
23 |
|
24 | |||
24 | $ hgcloneshallow ssh://user@dummy/master shallow -q |
|
25 | $ hgcloneshallow ssh://user@dummy/master shallow -q | |
25 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob) |
|
26 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob) | |
26 |
|
27 | |||
27 | # Set the prefetchdays config to zero so that all commits are prefetched |
|
28 | # Set the prefetchdays config to zero so that all commits are prefetched | |
28 | # no matter what their creation date is. |
|
29 | # no matter what their creation date is. | |
29 | $ cd shallow |
|
30 | $ cd shallow | |
30 | $ cat >> .hg/hgrc <<EOF |
|
31 | $ cat >> .hg/hgrc <<EOF | |
31 | > [remotefilelog] |
|
32 | > [remotefilelog] | |
32 | > prefetchdays=0 |
|
33 | > prefetchdays=0 | |
33 | > EOF |
|
34 | > EOF | |
34 | $ cd .. |
|
35 | $ cd .. | |
35 |
|
36 | |||
36 | # Test that repack cleans up the old files and creates new packs |
|
37 | # Test that repack cleans up the old files and creates new packs | |
37 |
|
38 | |||
38 | $ cd shallow |
|
39 | $ cd shallow | |
39 | $ find $CACHEDIR | sort |
|
40 | $ find $CACHEDIR | sort | |
40 | $TESTTMP/hgcache |
|
41 | $TESTTMP/hgcache | |
41 | $TESTTMP/hgcache/master |
|
42 | $TESTTMP/hgcache/master | |
42 | $TESTTMP/hgcache/master/11 |
|
43 | $TESTTMP/hgcache/master/11 | |
43 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072 |
|
44 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072 | |
44 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/aee31534993a501858fb6dd96a065671922e7d51 |
|
45 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/aee31534993a501858fb6dd96a065671922e7d51 | |
45 | $TESTTMP/hgcache/repos |
|
46 | $TESTTMP/hgcache/repos | |
46 |
|
47 | |||
47 | $ hg repack |
|
48 | $ hg repack | |
48 |
|
49 | |||
49 | $ find $CACHEDIR | sort |
|
50 | $ find $CACHEDIR | sort | |
50 | $TESTTMP/hgcache |
|
51 | $TESTTMP/hgcache | |
51 | $TESTTMP/hgcache/master |
|
52 | $TESTTMP/hgcache/master | |
52 | $TESTTMP/hgcache/master/packs |
|
53 | $TESTTMP/hgcache/master/packs | |
53 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx |
|
54 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx | |
54 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack |
|
55 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack | |
55 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx |
|
56 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx | |
56 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.datapack |
|
57 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.datapack | |
57 | $TESTTMP/hgcache/repos |
|
58 | $TESTTMP/hgcache/repos | |
58 |
|
59 | |||
59 | # Test that the packs are readonly |
|
60 | # Test that the packs are readonly | |
60 | $ ls_l $CACHEDIR/master/packs |
|
61 | $ ls_l $CACHEDIR/master/packs | |
61 | -r--r--r-- 1145 1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx |
|
62 | -r--r--r-- 1145 1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx | |
62 | -r--r--r-- 172 1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack |
|
63 | -r--r--r-- 172 1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack | |
63 | -r--r--r-- 1074 b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx |
|
64 | -r--r--r-- 1074 b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx | |
64 | -r--r--r-- 72 b1e0cfc7f345e408a7825e3081501959488d59ce.datapack |
|
65 | -r--r--r-- 72 b1e0cfc7f345e408a7825e3081501959488d59ce.datapack | |
65 |
|
66 | |||
66 | # Test that the data in the new packs is accessible |
|
67 | # Test that the data in the new packs is accessible | |
67 | $ hg cat -r . x |
|
68 | $ hg cat -r . x | |
68 | x |
|
69 | x | |
69 | x |
|
70 | x | |
70 |
|
71 | |||
71 | # Test that adding new data and repacking it results in the loose data and the |
|
72 | # Test that adding new data and repacking it results in the loose data and the | |
72 | # old packs being combined. |
|
73 | # old packs being combined. | |
73 |
|
74 | |||
74 | $ cd ../master |
|
75 | $ cd ../master | |
75 | $ echo x >> x |
|
76 | $ echo x >> x | |
76 | $ hg commit -m x3 |
|
77 | $ hg commit -m x3 | |
77 | $ cd ../shallow |
|
78 | $ cd ../shallow | |
78 | $ hg pull -q |
|
79 | $ hg pull -q | |
79 | $ hg up -q tip |
|
80 | $ hg up -q tip | |
80 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
81 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
81 |
|
82 | |||
82 | $ find $CACHEDIR -type f | sort |
|
83 | $ find $CACHEDIR -type f | sort | |
83 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/d4a3ed9310e5bd9887e3bf779da5077efab28216 |
|
84 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/d4a3ed9310e5bd9887e3bf779da5077efab28216 | |
84 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx |
|
85 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx | |
85 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack |
|
86 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack | |
86 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx |
|
87 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx | |
87 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.datapack |
|
88 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.datapack | |
88 | $TESTTMP/hgcache/repos |
|
89 | $TESTTMP/hgcache/repos | |
89 |
|
90 | |||
90 | # First assert that with --packsonly, the loose object will be ignored: |
|
91 | # First assert that with --packsonly, the loose object will be ignored: | |
91 |
|
92 | |||
92 | $ hg repack --packsonly |
|
93 | $ hg repack --packsonly | |
93 |
|
94 | |||
94 | $ find $CACHEDIR -type f | sort |
|
95 | $ find $CACHEDIR -type f | sort | |
95 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/d4a3ed9310e5bd9887e3bf779da5077efab28216 |
|
96 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/d4a3ed9310e5bd9887e3bf779da5077efab28216 | |
96 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx |
|
97 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx | |
97 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack |
|
98 | $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack | |
98 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx |
|
99 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx | |
99 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.datapack |
|
100 | $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.datapack | |
100 | $TESTTMP/hgcache/repos |
|
101 | $TESTTMP/hgcache/repos | |
101 |
|
102 | |||
102 | $ hg repack --traceback |
|
103 | $ hg repack --traceback | |
103 |
|
104 | |||
104 | $ find $CACHEDIR -type f | sort |
|
105 | $ find $CACHEDIR -type f | sort | |
105 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.dataidx |
|
106 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.dataidx | |
106 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.datapack |
|
107 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.datapack | |
107 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histidx |
|
108 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histidx | |
108 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack |
|
109 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack | |
109 | $TESTTMP/hgcache/repos |
|
110 | $TESTTMP/hgcache/repos | |
110 |
|
111 | |||
111 | # Verify all the file data is still available |
|
112 | # Verify all the file data is still available | |
112 | $ hg cat -r . x |
|
113 | $ hg cat -r . x | |
113 | x |
|
114 | x | |
114 | x |
|
115 | x | |
115 | x |
|
116 | x | |
116 | $ hg cat -r '.^' x |
|
117 | $ hg cat -r '.^' x | |
117 | x |
|
118 | x | |
118 | x |
|
119 | x | |
119 |
|
120 | |||
120 | # Test that repacking again without new data does not delete the pack files |
|
121 | # Test that repacking again without new data does not delete the pack files | |
121 | # and did not change the pack names |
|
122 | # and did not change the pack names | |
122 | $ hg repack |
|
123 | $ hg repack | |
123 | $ find $CACHEDIR -type f | sort |
|
124 | $ find $CACHEDIR -type f | sort | |
124 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.dataidx |
|
125 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.dataidx | |
125 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.datapack |
|
126 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.datapack | |
126 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histidx |
|
127 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histidx | |
127 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack |
|
128 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack | |
128 | $TESTTMP/hgcache/repos |
|
129 | $TESTTMP/hgcache/repos | |
129 |
|
130 | |||
130 | # Run two repacks at once |
|
131 | # Run two repacks at once | |
131 | $ hg repack --config "hooks.prerepack=sleep 3" & |
|
132 | $ hg repack --config "hooks.prerepack=sleep 3" & | |
132 | $ sleep 1 |
|
133 | $ sleep 1 | |
133 | $ hg repack |
|
134 | $ hg repack | |
134 | skipping repack - another repack is already running |
|
135 | skipping repack - another repack is already running | |
135 | $ hg debugwaitonrepack >/dev/null 2>&1 |
|
136 | $ hg debugwaitonrepack >/dev/null 2>&1 | |
136 |
|
137 | |||
137 | # Run repack in the background |
|
138 | # Run repack in the background | |
138 | $ cd ../master |
|
139 | $ cd ../master | |
139 | $ echo x >> x |
|
140 | $ echo x >> x | |
140 | $ hg commit -m x4 |
|
141 | $ hg commit -m x4 | |
141 | $ cd ../shallow |
|
142 | $ cd ../shallow | |
142 | $ hg pull -q |
|
143 | $ hg pull -q | |
143 | $ hg up -q tip |
|
144 | $ hg up -q tip | |
144 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
145 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
145 | $ find $CACHEDIR -type f | sort |
|
146 | $ find $CACHEDIR -type f | sort | |
146 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1bb2e6237e035c8f8ef508e281f1ce075bc6db72 |
|
147 | $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1bb2e6237e035c8f8ef508e281f1ce075bc6db72 | |
147 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.dataidx |
|
148 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.dataidx | |
148 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.datapack |
|
149 | $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.datapack | |
149 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histidx |
|
150 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histidx | |
150 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack |
|
151 | $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack | |
151 | $TESTTMP/hgcache/repos |
|
152 | $TESTTMP/hgcache/repos | |
152 |
|
153 | |||
153 | $ hg repack --background |
|
154 | $ hg repack --background | |
154 | (running background repack) |
|
155 | (running background repack) | |
155 | $ sleep 0.5 |
|
156 | $ sleep 0.5 | |
156 | $ hg debugwaitonrepack >/dev/null 2>&1 |
|
157 | $ hg debugwaitonrepack >/dev/null 2>&1 | |
157 | $ find $CACHEDIR -type f | sort |
|
158 | $ find $CACHEDIR -type f | sort | |
158 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.dataidx |
|
159 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.dataidx | |
159 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.datapack |
|
160 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.datapack | |
160 | $TESTTMP/hgcache/master/packs/604552d403a1381749faf656feca0ca265a6d52c.histidx |
|
161 | $TESTTMP/hgcache/master/packs/604552d403a1381749faf656feca0ca265a6d52c.histidx | |
161 | $TESTTMP/hgcache/master/packs/604552d403a1381749faf656feca0ca265a6d52c.histpack |
|
162 | $TESTTMP/hgcache/master/packs/604552d403a1381749faf656feca0ca265a6d52c.histpack | |
162 | $TESTTMP/hgcache/repos |
|
163 | $TESTTMP/hgcache/repos | |
163 |
|
164 | |||
164 | # Test debug commands |
|
165 | # Test debug commands | |
165 |
|
166 | |||
166 | $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.datapack |
|
167 | $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.datapack | |
167 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0: |
|
168 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0: | |
168 | x: |
|
169 | x: | |
169 | Node Delta Base Delta Length Blob Size |
|
170 | Node Delta Base Delta Length Blob Size | |
170 | 1bb2e6237e03 000000000000 8 8 |
|
171 | 1bb2e6237e03 000000000000 8 8 | |
171 | d4a3ed9310e5 1bb2e6237e03 12 6 |
|
172 | d4a3ed9310e5 1bb2e6237e03 12 6 | |
172 | aee31534993a d4a3ed9310e5 12 4 |
|
173 | aee31534993a d4a3ed9310e5 12 4 | |
173 |
|
174 | |||
174 | Total: 32 18 (77.8% bigger) |
|
175 | Total: 32 18 (77.8% bigger) | |
175 | $ hg debugdatapack --long $TESTTMP/hgcache/master/packs/*.datapack |
|
176 | $ hg debugdatapack --long $TESTTMP/hgcache/master/packs/*.datapack | |
176 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0: |
|
177 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0: | |
177 | x: |
|
178 | x: | |
178 | Node Delta Base Delta Length Blob Size |
|
179 | Node Delta Base Delta Length Blob Size | |
179 | 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 0000000000000000000000000000000000000000 8 8 |
|
180 | 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 0000000000000000000000000000000000000000 8 8 | |
180 | d4a3ed9310e5bd9887e3bf779da5077efab28216 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 12 6 |
|
181 | d4a3ed9310e5bd9887e3bf779da5077efab28216 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 12 6 | |
181 | aee31534993a501858fb6dd96a065671922e7d51 d4a3ed9310e5bd9887e3bf779da5077efab28216 12 4 |
|
182 | aee31534993a501858fb6dd96a065671922e7d51 d4a3ed9310e5bd9887e3bf779da5077efab28216 12 4 | |
182 |
|
183 | |||
183 | Total: 32 18 (77.8% bigger) |
|
184 | Total: 32 18 (77.8% bigger) | |
184 | $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.datapack --node d4a3ed9310e5bd9887e3bf779da5077efab28216 |
|
185 | $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.datapack --node d4a3ed9310e5bd9887e3bf779da5077efab28216 | |
185 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0: |
|
186 | $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0: | |
186 |
|
187 | |||
187 | x |
|
188 | x | |
188 | Node Delta Base Delta SHA1 Delta Length |
|
189 | Node Delta Base Delta SHA1 Delta Length | |
189 | d4a3ed9310e5bd9887e3bf779da5077efab28216 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 77029ab56e83ea2115dd53ff87483682abe5d7ca 12 |
|
190 | d4a3ed9310e5bd9887e3bf779da5077efab28216 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 77029ab56e83ea2115dd53ff87483682abe5d7ca 12 | |
190 | Node Delta Base Delta SHA1 Delta Length |
|
191 | Node Delta Base Delta SHA1 Delta Length | |
191 | 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 0000000000000000000000000000000000000000 7ca8c71a64f7b56380e77573da2f7a5fdd2ecdb5 8 |
|
192 | 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 0000000000000000000000000000000000000000 7ca8c71a64f7b56380e77573da2f7a5fdd2ecdb5 8 | |
192 | $ hg debughistorypack $TESTTMP/hgcache/master/packs/*.histidx |
|
193 | $ hg debughistorypack $TESTTMP/hgcache/master/packs/*.histidx | |
193 |
|
194 | |||
194 | x |
|
195 | x | |
195 | Node P1 Node P2 Node Link Node Copy From |
|
196 | Node P1 Node P2 Node Link Node Copy From | |
196 | 1bb2e6237e03 d4a3ed9310e5 000000000000 0b03bbc9e1e7 |
|
197 | 1bb2e6237e03 d4a3ed9310e5 000000000000 0b03bbc9e1e7 | |
197 | d4a3ed9310e5 aee31534993a 000000000000 421535db10b6 |
|
198 | d4a3ed9310e5 aee31534993a 000000000000 421535db10b6 | |
198 | aee31534993a 1406e7411862 000000000000 a89d614e2364 |
|
199 | aee31534993a 1406e7411862 000000000000 a89d614e2364 | |
199 | 1406e7411862 000000000000 000000000000 b292c1e3311f |
|
200 | 1406e7411862 000000000000 000000000000 b292c1e3311f | |
200 |
|
201 | |||
201 | # Test copy tracing from a pack |
|
202 | # Test copy tracing from a pack | |
202 | $ cd ../master |
|
203 | $ cd ../master | |
203 | $ hg mv x y |
|
204 | $ hg mv x y | |
204 | $ hg commit -m 'move x to y' |
|
205 | $ hg commit -m 'move x to y' | |
205 | $ cd ../shallow |
|
206 | $ cd ../shallow | |
206 | $ hg pull -q |
|
207 | $ hg pull -q | |
207 | $ hg up -q tip |
|
208 | $ hg up -q tip | |
208 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
209 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
209 | $ hg repack |
|
210 | $ hg repack | |
210 | $ hg log -f y -T '{desc}\n' |
|
211 | $ hg log -f y -T '{desc}\n' | |
211 | move x to y |
|
212 | move x to y | |
212 | x4 |
|
213 | x4 | |
213 | x3 |
|
214 | x3 | |
214 | x2 |
|
215 | x2 | |
215 | x |
|
216 | x | |
216 |
|
217 | |||
217 | # Test copy trace across rename and back |
|
218 | # Test copy trace across rename and back | |
218 | $ cp -R $TESTTMP/hgcache/master/packs $TESTTMP/backuppacks |
|
219 | $ cp -R $TESTTMP/hgcache/master/packs $TESTTMP/backuppacks | |
219 | $ cd ../master |
|
220 | $ cd ../master | |
220 | $ hg mv y x |
|
221 | $ hg mv y x | |
221 | $ hg commit -m 'move y back to x' |
|
222 | $ hg commit -m 'move y back to x' | |
222 | $ hg revert -r 0 x |
|
223 | $ hg revert -r 0 x | |
223 | $ mv x y |
|
224 | $ mv x y | |
224 | $ hg add y |
|
225 | $ hg add y | |
225 | $ echo >> y |
|
226 | $ echo >> y | |
226 | $ hg revert x |
|
227 | $ hg revert x | |
227 | $ hg commit -m 'add y back without metadata' |
|
228 | $ hg commit -m 'add y back without metadata' | |
228 | $ cd ../shallow |
|
229 | $ cd ../shallow | |
229 | $ hg pull -q |
|
230 | $ hg pull -q | |
230 | $ hg up -q tip |
|
231 | $ hg up -q tip | |
231 | 2 files fetched over 2 fetches - (2 misses, 0.00% hit ratio) over * (glob) |
|
232 | 2 files fetched over 2 fetches - (2 misses, 0.00% hit ratio) over * (glob) | |
232 | $ hg repack |
|
233 | $ hg repack | |
233 | $ ls $TESTTMP/hgcache/master/packs |
|
234 | $ ls $TESTTMP/hgcache/master/packs | |
234 | bfd60adb76018bb952e27cd23fc151bf94865d7d.histidx |
|
235 | bfd60adb76018bb952e27cd23fc151bf94865d7d.histidx | |
235 | bfd60adb76018bb952e27cd23fc151bf94865d7d.histpack |
|
236 | bfd60adb76018bb952e27cd23fc151bf94865d7d.histpack | |
236 | fb3aa57b22789ebcc45706c352e2d6af099c5816.dataidx |
|
237 | fb3aa57b22789ebcc45706c352e2d6af099c5816.dataidx | |
237 | fb3aa57b22789ebcc45706c352e2d6af099c5816.datapack |
|
238 | fb3aa57b22789ebcc45706c352e2d6af099c5816.datapack | |
238 | $ hg debughistorypack $TESTTMP/hgcache/master/packs/*.histidx |
|
239 | $ hg debughistorypack $TESTTMP/hgcache/master/packs/*.histidx | |
239 |
|
240 | |||
240 | x |
|
241 | x | |
241 | Node P1 Node P2 Node Link Node Copy From |
|
242 | Node P1 Node P2 Node Link Node Copy From | |
242 | cd410a44d584 577959738234 000000000000 609547eda446 y |
|
243 | cd410a44d584 577959738234 000000000000 609547eda446 y | |
243 | 1bb2e6237e03 d4a3ed9310e5 000000000000 0b03bbc9e1e7 |
|
244 | 1bb2e6237e03 d4a3ed9310e5 000000000000 0b03bbc9e1e7 | |
244 | d4a3ed9310e5 aee31534993a 000000000000 421535db10b6 |
|
245 | d4a3ed9310e5 aee31534993a 000000000000 421535db10b6 | |
245 | aee31534993a 1406e7411862 000000000000 a89d614e2364 |
|
246 | aee31534993a 1406e7411862 000000000000 a89d614e2364 | |
246 | 1406e7411862 000000000000 000000000000 b292c1e3311f |
|
247 | 1406e7411862 000000000000 000000000000 b292c1e3311f | |
247 |
|
248 | |||
248 | y |
|
249 | y | |
249 | Node P1 Node P2 Node Link Node Copy From |
|
250 | Node P1 Node P2 Node Link Node Copy From | |
250 | 577959738234 1bb2e6237e03 000000000000 c7faf2fc439a x |
|
251 | 577959738234 1bb2e6237e03 000000000000 c7faf2fc439a x | |
251 | 21f46f2721e7 000000000000 000000000000 d6868642b790 |
|
252 | 21f46f2721e7 000000000000 000000000000 d6868642b790 | |
252 | $ hg strip -r '.^' |
|
253 | $ hg strip -r '.^' | |
253 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
254 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
254 | saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/609547eda446-b26b56a8-backup.hg (glob) |
|
255 | saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/609547eda446-b26b56a8-backup.hg (glob) | |
255 | $ hg -R ../master strip -r '.^' |
|
256 | $ hg -R ../master strip -r '.^' | |
256 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
257 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
257 | saved backup bundle to $TESTTMP/master/.hg/strip-backup/609547eda446-b26b56a8-backup.hg (glob) |
|
258 | saved backup bundle to $TESTTMP/master/.hg/strip-backup/609547eda446-b26b56a8-backup.hg (glob) | |
258 |
|
259 | |||
259 | $ rm -rf $TESTTMP/hgcache/master/packs |
|
260 | $ rm -rf $TESTTMP/hgcache/master/packs | |
260 | $ cp -R $TESTTMP/backuppacks $TESTTMP/hgcache/master/packs |
|
261 | $ cp -R $TESTTMP/backuppacks $TESTTMP/hgcache/master/packs | |
261 |
|
262 | |||
262 | # Test repacking datapack without history |
|
263 | # Test repacking datapack without history | |
263 | $ rm -rf $CACHEDIR/master/packs/*hist* |
|
264 | $ rm -rf $CACHEDIR/master/packs/*hist* | |
264 | $ hg repack |
|
265 | $ hg repack | |
265 | $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.datapack |
|
266 | $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.datapack | |
266 | $TESTTMP/hgcache/master/packs/922aca43dbbeda4d250565372e8892ec7b08da6a: |
|
267 | $TESTTMP/hgcache/master/packs/922aca43dbbeda4d250565372e8892ec7b08da6a: | |
267 | x: |
|
268 | x: | |
268 | Node Delta Base Delta Length Blob Size |
|
269 | Node Delta Base Delta Length Blob Size | |
269 | 1bb2e6237e03 000000000000 8 8 |
|
270 | 1bb2e6237e03 000000000000 8 8 | |
270 | d4a3ed9310e5 1bb2e6237e03 12 6 |
|
271 | d4a3ed9310e5 1bb2e6237e03 12 6 | |
271 | aee31534993a d4a3ed9310e5 12 4 |
|
272 | aee31534993a d4a3ed9310e5 12 4 | |
272 |
|
273 | |||
273 | Total: 32 18 (77.8% bigger) |
|
274 | Total: 32 18 (77.8% bigger) | |
274 | y: |
|
275 | y: | |
275 | Node Delta Base Delta Length Blob Size |
|
276 | Node Delta Base Delta Length Blob Size | |
276 | 577959738234 000000000000 70 8 |
|
277 | 577959738234 000000000000 70 8 | |
277 |
|
278 | |||
278 | Total: 70 8 (775.0% bigger) |
|
279 | Total: 70 8 (775.0% bigger) | |
279 |
|
280 | |||
280 | $ hg cat -r ".^" x |
|
281 | $ hg cat -r ".^" x | |
281 | x |
|
282 | x | |
282 | x |
|
283 | x | |
283 | x |
|
284 | x | |
284 | x |
|
285 | x | |
285 |
|
286 | |||
286 | Incremental repack |
|
287 | Incremental repack | |
287 | $ rm -rf $CACHEDIR/master/packs/* |
|
288 | $ rm -rf $CACHEDIR/master/packs/* | |
288 | $ cat >> .hg/hgrc <<EOF |
|
289 | $ cat >> .hg/hgrc <<EOF | |
289 | > [remotefilelog] |
|
290 | > [remotefilelog] | |
290 | > data.generations=60 |
|
291 | > data.generations=60 | |
291 | > 150 |
|
292 | > 150 | |
292 | > EOF |
|
293 | > EOF | |
293 |
|
294 | |||
294 | Single pack - repack does nothing |
|
295 | Single pack - repack does nothing | |
295 | $ hg prefetch -r 0 |
|
296 | $ hg prefetch -r 0 | |
296 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
297 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
297 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack |
|
298 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack | |
298 | [1] |
|
299 | [1] | |
299 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack |
|
300 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack | |
300 | [1] |
|
301 | [1] | |
301 | $ hg repack --incremental |
|
302 | $ hg repack --incremental | |
302 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack |
|
303 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack | |
303 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack |
|
304 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack | |
304 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack |
|
305 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack | |
305 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack |
|
306 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack | |
306 |
|
307 | |||
307 | 3 gen1 packs, 1 gen0 pack - packs 3 gen1 into 1 |
|
308 | 3 gen1 packs, 1 gen0 pack - packs 3 gen1 into 1 | |
308 | $ hg prefetch -r 1 |
|
309 | $ hg prefetch -r 1 | |
309 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
310 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
310 | $ hg prefetch -r 2 |
|
311 | $ hg prefetch -r 2 | |
311 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
312 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
312 | $ hg prefetch -r 38 |
|
313 | $ hg prefetch -r 38 | |
313 | abort: unknown revision '38'! |
|
314 | abort: unknown revision '38'! | |
314 | [255] |
|
315 | [255] | |
315 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack |
|
316 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack | |
316 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack |
|
317 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack | |
317 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack |
|
318 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack | |
318 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack |
|
319 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack | |
319 |
|
320 | |||
320 | For the data packs, setting the limit for the repackmaxpacksize to be 64 such |
|
321 | For the data packs, setting the limit for the repackmaxpacksize to be 64 such | |
321 | that data pack with size 65 is more than the limit. This effectively ensures |
|
322 | that data pack with size 65 is more than the limit. This effectively ensures | |
322 | that no generation has 3 packs and therefore, no packs are chosen for the |
|
323 | that no generation has 3 packs and therefore, no packs are chosen for the | |
323 | incremental repacking. As for the history packs, setting repackmaxpacksize to be |
|
324 | incremental repacking. As for the history packs, setting repackmaxpacksize to be | |
324 | 0 which should always result in no repacking. |
|
325 | 0 which should always result in no repacking. | |
325 | $ hg repack --incremental --config remotefilelog.data.repackmaxpacksize=64 \ |
|
326 | $ hg repack --incremental --config remotefilelog.data.repackmaxpacksize=64 \ | |
326 | > --config remotefilelog.history.repackmaxpacksize=0 |
|
327 | > --config remotefilelog.history.repackmaxpacksize=0 | |
327 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack |
|
328 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack | |
328 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack |
|
329 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack | |
329 | -r--r--r-- 149 78840d69389c7404327f7477e3931c89945c37d1.datapack |
|
330 | -r--r--r-- 149 78840d69389c7404327f7477e3931c89945c37d1.datapack | |
330 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack |
|
331 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack | |
331 | -r--r--r-- 254 8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack |
|
332 | -r--r--r-- 254 8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack | |
332 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack |
|
333 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack | |
333 |
|
334 | |||
334 | Setting limit for the repackmaxpacksize to be the size of the biggest pack file |
|
335 | Setting limit for the repackmaxpacksize to be the size of the biggest pack file | |
335 | which ensures that it is effectively ignored in the incremental repacking. |
|
336 | which ensures that it is effectively ignored in the incremental repacking. | |
336 | $ hg repack --incremental --config remotefilelog.data.repackmaxpacksize=65 \ |
|
337 | $ hg repack --incremental --config remotefilelog.data.repackmaxpacksize=65 \ | |
337 | > --config remotefilelog.history.repackmaxpacksize=336 |
|
338 | > --config remotefilelog.history.repackmaxpacksize=336 | |
338 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack |
|
339 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack | |
339 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack |
|
340 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack | |
340 | -r--r--r-- 149 78840d69389c7404327f7477e3931c89945c37d1.datapack |
|
341 | -r--r--r-- 149 78840d69389c7404327f7477e3931c89945c37d1.datapack | |
341 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack |
|
342 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack | |
342 | -r--r--r-- 254 8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack |
|
343 | -r--r--r-- 254 8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack | |
343 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack |
|
344 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack | |
344 |
|
345 | |||
345 | 1 gen3 pack, 1 gen0 pack - does nothing |
|
346 | 1 gen3 pack, 1 gen0 pack - does nothing | |
346 | $ hg repack --incremental |
|
347 | $ hg repack --incremental | |
347 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack |
|
348 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack | |
348 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack |
|
349 | -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack | |
349 | -r--r--r-- 149 78840d69389c7404327f7477e3931c89945c37d1.datapack |
|
350 | -r--r--r-- 149 78840d69389c7404327f7477e3931c89945c37d1.datapack | |
350 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack |
|
351 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack | |
351 | -r--r--r-- 254 8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack |
|
352 | -r--r--r-- 254 8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack | |
352 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack |
|
353 | -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack | |
353 |
|
354 | |||
354 | Pull should run background repack |
|
355 | Pull should run background repack | |
355 | $ cat >> .hg/hgrc <<EOF |
|
356 | $ cat >> .hg/hgrc <<EOF | |
356 | > [remotefilelog] |
|
357 | > [remotefilelog] | |
357 | > backgroundrepack=True |
|
358 | > backgroundrepack=True | |
358 | > EOF |
|
359 | > EOF | |
359 | $ clearcache |
|
360 | $ clearcache | |
360 | $ hg prefetch -r 0 |
|
361 | $ hg prefetch -r 0 | |
361 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
362 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
362 | $ hg prefetch -r 1 |
|
363 | $ hg prefetch -r 1 | |
363 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
364 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
364 | $ hg prefetch -r 2 |
|
365 | $ hg prefetch -r 2 | |
365 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
366 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
366 | $ hg prefetch -r 3 |
|
367 | $ hg prefetch -r 3 | |
367 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
368 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
368 |
|
369 | |||
369 | $ hg pull |
|
370 | $ hg pull | |
370 | pulling from ssh://user@dummy/master |
|
371 | pulling from ssh://user@dummy/master | |
371 | searching for changes |
|
372 | searching for changes | |
372 | no changes found |
|
373 | no changes found | |
373 | (running background incremental repack) |
|
374 | (running background incremental repack) | |
374 | $ sleep 0.5 |
|
375 | $ sleep 0.5 | |
375 | $ hg debugwaitonrepack >/dev/null 2>&1 |
|
376 | $ hg debugwaitonrepack >/dev/null 2>&1 | |
376 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack |
|
377 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack | |
377 | -r--r--r-- 303 156a6c1c83aeb69422d7936e0a46ba9bc06a71c0.datapack |
|
378 | -r--r--r-- 303 156a6c1c83aeb69422d7936e0a46ba9bc06a71c0.datapack | |
378 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack |
|
379 | $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack | |
379 | -r--r--r-- 336 604552d403a1381749faf656feca0ca265a6d52c.histpack |
|
380 | -r--r--r-- 336 604552d403a1381749faf656feca0ca265a6d52c.histpack | |
380 |
|
381 | |||
381 | Test environment variable resolution |
|
382 | Test environment variable resolution | |
382 | $ CACHEPATH=$TESTTMP/envcache hg prefetch --config 'remotefilelog.cachepath=$CACHEPATH' |
|
383 | $ CACHEPATH=$TESTTMP/envcache hg prefetch --config 'remotefilelog.cachepath=$CACHEPATH' | |
383 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
384 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
384 | $ find $TESTTMP/envcache | sort |
|
385 | $ find $TESTTMP/envcache | sort | |
385 | $TESTTMP/envcache |
|
386 | $TESTTMP/envcache | |
386 | $TESTTMP/envcache/master |
|
387 | $TESTTMP/envcache/master | |
387 | $TESTTMP/envcache/master/95 |
|
388 | $TESTTMP/envcache/master/95 | |
388 | $TESTTMP/envcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a |
|
389 | $TESTTMP/envcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a | |
389 | $TESTTMP/envcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/577959738234a1eb241ed3ed4b22a575833f56e0 |
|
390 | $TESTTMP/envcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/577959738234a1eb241ed3ed4b22a575833f56e0 | |
390 | $TESTTMP/envcache/repos |
|
391 | $TESTTMP/envcache/repos | |
391 |
|
392 | |||
392 | Test local remotefilelog blob is correct when based on a pack |
|
393 | Test local remotefilelog blob is correct when based on a pack | |
393 | $ hg prefetch -r . |
|
394 | $ hg prefetch -r . | |
394 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) |
|
395 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) | |
395 | $ echo >> y |
|
396 | $ echo >> y | |
396 | $ hg commit -m y2 |
|
397 | $ hg commit -m y2 | |
397 | $ hg debugremotefilelog .hg/store/data/95cb0bfd2977c761298d9624e4b4d4c72a39974a/b70860edba4f8242a1d52f2a94679dd23cb76808 |
|
398 | $ hg debugremotefilelog .hg/store/data/95cb0bfd2977c761298d9624e4b4d4c72a39974a/b70860edba4f8242a1d52f2a94679dd23cb76808 | |
398 | size: 9 bytes |
|
399 | size: 9 bytes | |
399 | path: .hg/store/data/95cb0bfd2977c761298d9624e4b4d4c72a39974a/b70860edba4f8242a1d52f2a94679dd23cb76808 |
|
400 | path: .hg/store/data/95cb0bfd2977c761298d9624e4b4d4c72a39974a/b70860edba4f8242a1d52f2a94679dd23cb76808 | |
400 | key: b70860edba4f |
|
401 | key: b70860edba4f | |
401 |
|
402 | |||
402 | node => p1 p2 linknode copyfrom |
|
403 | node => p1 p2 linknode copyfrom | |
403 | b70860edba4f => 577959738234 000000000000 08d3fbc98c48 |
|
404 | b70860edba4f => 577959738234 000000000000 08d3fbc98c48 | |
404 | 577959738234 => 1bb2e6237e03 000000000000 c7faf2fc439a x |
|
405 | 577959738234 => 1bb2e6237e03 000000000000 c7faf2fc439a x | |
405 | 1bb2e6237e03 => d4a3ed9310e5 000000000000 0b03bbc9e1e7 |
|
406 | 1bb2e6237e03 => d4a3ed9310e5 000000000000 0b03bbc9e1e7 | |
406 | d4a3ed9310e5 => aee31534993a 000000000000 421535db10b6 |
|
407 | d4a3ed9310e5 => aee31534993a 000000000000 421535db10b6 | |
407 | aee31534993a => 1406e7411862 000000000000 a89d614e2364 |
|
408 | aee31534993a => 1406e7411862 000000000000 a89d614e2364 | |
408 | 1406e7411862 => 000000000000 000000000000 b292c1e3311f |
|
409 | 1406e7411862 => 000000000000 000000000000 b292c1e3311f | |
409 |
|
410 | |||
410 | Test limiting the max delta chain length |
|
411 | Test limiting the max delta chain length | |
411 | $ hg repack --config packs.maxchainlen=1 |
|
412 | $ hg repack --config packs.maxchainlen=1 | |
412 | $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.dataidx |
|
413 | $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.dataidx | |
413 | $TESTTMP/hgcache/master/packs/f258af4c033dd5cd32b4dbc42a1efcd8e4c7d909: |
|
414 | $TESTTMP/hgcache/master/packs/f258af4c033dd5cd32b4dbc42a1efcd8e4c7d909: | |
414 | x: |
|
415 | x: | |
415 | Node Delta Base Delta Length Blob Size |
|
416 | Node Delta Base Delta Length Blob Size | |
416 | 1bb2e6237e03 000000000000 8 8 |
|
417 | 1bb2e6237e03 000000000000 8 8 | |
417 | d4a3ed9310e5 1bb2e6237e03 12 6 |
|
418 | d4a3ed9310e5 1bb2e6237e03 12 6 | |
418 | aee31534993a 000000000000 4 4 |
|
419 | aee31534993a 000000000000 4 4 | |
419 | 1406e7411862 aee31534993a 12 2 |
|
420 | 1406e7411862 aee31534993a 12 2 | |
420 |
|
421 | |||
421 | Total: 36 20 (80.0% bigger) |
|
422 | Total: 36 20 (80.0% bigger) | |
422 | y: |
|
423 | y: | |
423 | Node Delta Base Delta Length Blob Size |
|
424 | Node Delta Base Delta Length Blob Size | |
424 | 577959738234 000000000000 70 8 |
|
425 | 577959738234 000000000000 70 8 | |
425 |
|
426 | |||
426 | Total: 70 8 (775.0% bigger) |
|
427 | Total: 70 8 (775.0% bigger) | |
427 |
|
428 | |||
428 | Test huge pack cleanup using different values of packs.maxpacksize: |
|
429 | Test huge pack cleanup using different values of packs.maxpacksize: | |
429 | $ hg repack --incremental --debug |
|
430 | $ hg repack --incremental --debug | |
430 | $ hg repack --incremental --debug --config packs.maxpacksize=512 |
|
431 | $ hg repack --incremental --debug --config packs.maxpacksize=512 | |
431 | removing oversize packfile $TESTTMP/hgcache/master/packs/f258af4c033dd5cd32b4dbc42a1efcd8e4c7d909.datapack (425 bytes) |
|
432 | removing oversize packfile $TESTTMP/hgcache/master/packs/f258af4c033dd5cd32b4dbc42a1efcd8e4c7d909.datapack (425 bytes) | |
432 | removing oversize packfile $TESTTMP/hgcache/master/packs/f258af4c033dd5cd32b4dbc42a1efcd8e4c7d909.dataidx (1.21 KB) |
|
433 | removing oversize packfile $TESTTMP/hgcache/master/packs/f258af4c033dd5cd32b4dbc42a1efcd8e4c7d909.dataidx (1.21 KB) | |
433 |
|
434 | |||
434 | Do a repack where the new pack reuses a delta from the old pack |
|
435 | Do a repack where the new pack reuses a delta from the old pack | |
435 | $ clearcache |
|
436 | $ clearcache | |
436 | $ hg prefetch -r '2::3' |
|
437 | $ hg prefetch -r '2::3' | |
437 | 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over * (glob) |
|
438 | 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over * (glob) | |
438 | $ hg repack |
|
439 | $ hg repack | |
439 | $ hg debugdatapack $CACHEDIR/master/packs/*.datapack |
|
440 | $ hg debugdatapack $CACHEDIR/master/packs/*.datapack | |
440 | $TESTTMP/hgcache/master/packs/9ec6b30891bd851320acb7c66b69a2bdf41c8df3: |
|
441 | $TESTTMP/hgcache/master/packs/9ec6b30891bd851320acb7c66b69a2bdf41c8df3: | |
441 | x: |
|
442 | x: | |
442 | Node Delta Base Delta Length Blob Size |
|
443 | Node Delta Base Delta Length Blob Size | |
443 | 1bb2e6237e03 000000000000 8 8 |
|
444 | 1bb2e6237e03 000000000000 8 8 | |
444 | d4a3ed9310e5 1bb2e6237e03 12 6 |
|
445 | d4a3ed9310e5 1bb2e6237e03 12 6 | |
445 |
|
446 | |||
446 | Total: 20 14 (42.9% bigger) |
|
447 | Total: 20 14 (42.9% bigger) | |
447 | $ hg prefetch -r '0::1' |
|
448 | $ hg prefetch -r '0::1' | |
448 | 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over * (glob) |
|
449 | 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over * (glob) | |
449 | $ hg repack |
|
450 | $ hg repack | |
450 | $ hg debugdatapack $CACHEDIR/master/packs/*.datapack |
|
451 | $ hg debugdatapack $CACHEDIR/master/packs/*.datapack | |
451 | $TESTTMP/hgcache/master/packs/156a6c1c83aeb69422d7936e0a46ba9bc06a71c0: |
|
452 | $TESTTMP/hgcache/master/packs/156a6c1c83aeb69422d7936e0a46ba9bc06a71c0: | |
452 | x: |
|
453 | x: | |
453 | Node Delta Base Delta Length Blob Size |
|
454 | Node Delta Base Delta Length Blob Size | |
454 | 1bb2e6237e03 000000000000 8 8 |
|
455 | 1bb2e6237e03 000000000000 8 8 | |
455 | d4a3ed9310e5 1bb2e6237e03 12 6 |
|
456 | d4a3ed9310e5 1bb2e6237e03 12 6 | |
456 | aee31534993a d4a3ed9310e5 12 4 |
|
457 | aee31534993a d4a3ed9310e5 12 4 | |
457 | 1406e7411862 aee31534993a 12 2 |
|
458 | 1406e7411862 aee31534993a 12 2 | |
458 |
|
459 | |||
459 | Total: 44 20 (120.0% bigger) |
|
460 | Total: 44 20 (120.0% bigger) |
General Comments 0
You need to be logged in to leave comments.
Login now