Show More
@@ -607,7 +607,9 b' class GeneratedBundle(BundleBase):' | |||||
607 |
|
607 | |||
608 | def manifest_line(self): |
|
608 | def manifest_line(self): | |
609 | """serialize the object to include as a line in pullbundles.manifest""" |
|
609 | """serialize the object to include as a line in pullbundles.manifest""" | |
610 |
templ = b"%s BUNDLESPEC=%s |
|
610 | templ = b"%s BUNDLESPEC=%s" | |
|
611 | if self.file_url.startswith(b'http'): | |||
|
612 | templ += b" REQUIRESNI=true" | |||
611 | return templ % (self.file_url, self.bundle_type) |
|
613 | return templ % (self.file_url, self.bundle_type) | |
612 |
|
614 | |||
613 | def __eq__(self, other): |
|
615 | def __eq__(self, other): |
@@ -42,7 +42,7 b' Test bundles are generated on push' | |||||
42 | added 2 changesets with 2 changes to 2 files |
|
42 | added 2 changesets with 2 changes to 2 files | |
43 | clone-bundles: starting bundle generation: v2 |
|
43 | clone-bundles: starting bundle generation: v2 | |
44 | $ cat ../server/.hg/clonebundles.manifest |
|
44 | $ cat ../server/.hg/clonebundles.manifest | |
45 |
file:/*/$TESTTMP/final-upload/full-v2-2_revs-aaff8d2ffbbf_tip-*_txn.hg BUNDLESPEC=v2 |
|
45 | file:/*/$TESTTMP/final-upload/full-v2-2_revs-aaff8d2ffbbf_tip-*_txn.hg BUNDLESPEC=v2 (glob) | |
46 | $ ls -1 ../final-upload |
|
46 | $ ls -1 ../final-upload | |
47 | full-v2-2_revs-aaff8d2ffbbf_tip-*_txn.hg (glob) |
|
47 | full-v2-2_revs-aaff8d2ffbbf_tip-*_txn.hg (glob) | |
48 | $ ls -1 ../server/.hg/tmp-bundles |
|
48 | $ ls -1 ../server/.hg/tmp-bundles | |
@@ -65,7 +65,7 b' Newer bundles are generated with more pu' | |||||
65 | clone-bundles: starting bundle generation: v2 |
|
65 | clone-bundles: starting bundle generation: v2 | |
66 |
|
66 | |||
67 | $ cat ../server/.hg/clonebundles.manifest |
|
67 | $ cat ../server/.hg/clonebundles.manifest | |
68 |
file:/*/$TESTTMP/final-upload/full-v2-4_revs-6427147b985a_tip-*_txn.hg BUNDLESPEC=v2 |
|
68 | file:/*/$TESTTMP/final-upload/full-v2-4_revs-6427147b985a_tip-*_txn.hg BUNDLESPEC=v2 (glob) | |
69 | $ ls -1 ../final-upload |
|
69 | $ ls -1 ../final-upload | |
70 | full-v2-2_revs-aaff8d2ffbbf_tip-*_txn.hg (glob) |
|
70 | full-v2-2_revs-aaff8d2ffbbf_tip-*_txn.hg (glob) | |
71 | full-v2-4_revs-6427147b985a_tip-*_txn.hg (glob) |
|
71 | full-v2-4_revs-6427147b985a_tip-*_txn.hg (glob) | |
@@ -90,7 +90,7 b' Older bundles are cleaned up with more p' | |||||
90 | clone-bundles: starting bundle generation: v2 |
|
90 | clone-bundles: starting bundle generation: v2 | |
91 |
|
91 | |||
92 | $ cat ../server/.hg/clonebundles.manifest |
|
92 | $ cat ../server/.hg/clonebundles.manifest | |
93 |
file:/*/$TESTTMP/final-upload/full-v2-6_revs-b1010e95ea00_tip-*_txn.hg BUNDLESPEC=v2 |
|
93 | file:/*/$TESTTMP/final-upload/full-v2-6_revs-b1010e95ea00_tip-*_txn.hg BUNDLESPEC=v2 (glob) | |
94 | $ ls -1 ../final-upload |
|
94 | $ ls -1 ../final-upload | |
95 | full-v2-4_revs-6427147b985a_tip-*_txn.hg (glob) |
|
95 | full-v2-4_revs-6427147b985a_tip-*_txn.hg (glob) | |
96 | full-v2-6_revs-b1010e95ea00_tip-*_txn.hg (glob) |
|
96 | full-v2-6_revs-b1010e95ea00_tip-*_txn.hg (glob) | |
@@ -115,7 +115,7 b' Check ratio' | |||||
115 | adding file changes |
|
115 | adding file changes | |
116 | added 1 changesets with 1 changes to 1 files |
|
116 | added 1 changesets with 1 changes to 1 files | |
117 | $ cat ../server/.hg/clonebundles.manifest |
|
117 | $ cat ../server/.hg/clonebundles.manifest | |
118 |
file:/*/$TESTTMP/final-upload/full-v2-6_revs-b1010e95ea00_tip-*_txn.hg BUNDLESPEC=v2 |
|
118 | file:/*/$TESTTMP/final-upload/full-v2-6_revs-b1010e95ea00_tip-*_txn.hg BUNDLESPEC=v2 (glob) | |
119 | $ ls -1 ../final-upload |
|
119 | $ ls -1 ../final-upload | |
120 | full-v2-4_revs-6427147b985a_tip-*_txn.hg (glob) |
|
120 | full-v2-4_revs-6427147b985a_tip-*_txn.hg (glob) | |
121 | full-v2-6_revs-b1010e95ea00_tip-*_txn.hg (glob) |
|
121 | full-v2-6_revs-b1010e95ea00_tip-*_txn.hg (glob) | |
@@ -140,7 +140,7 b' Check absolute number of revisions' | |||||
140 | added 1 changesets with 1 changes to 1 files |
|
140 | added 1 changesets with 1 changes to 1 files | |
141 | clone-bundles: starting bundle generation: v2 |
|
141 | clone-bundles: starting bundle generation: v2 | |
142 | $ cat ../server/.hg/clonebundles.manifest |
|
142 | $ cat ../server/.hg/clonebundles.manifest | |
143 |
file:/*/$TESTTMP/final-upload/full-v2-8_revs-8353e8af1306_tip-*_txn.hg BUNDLESPEC=v2 |
|
143 | file:/*/$TESTTMP/final-upload/full-v2-8_revs-8353e8af1306_tip-*_txn.hg BUNDLESPEC=v2 (glob) | |
144 | $ ls -1 ../final-upload |
|
144 | $ ls -1 ../final-upload | |
145 | full-v2-6_revs-b1010e95ea00_tip-*_txn.hg (glob) |
|
145 | full-v2-6_revs-b1010e95ea00_tip-*_txn.hg (glob) | |
146 | full-v2-8_revs-8353e8af1306_tip-*_txn.hg (glob) |
|
146 | full-v2-8_revs-8353e8af1306_tip-*_txn.hg (glob) | |
@@ -158,7 +158,7 b' Check absolute number of revisions' | |||||
158 | adding file changes |
|
158 | adding file changes | |
159 | added 1 changesets with 1 changes to 1 files |
|
159 | added 1 changesets with 1 changes to 1 files | |
160 | $ cat ../server/.hg/clonebundles.manifest |
|
160 | $ cat ../server/.hg/clonebundles.manifest | |
161 |
file:/*/$TESTTMP/final-upload/full-v2-8_revs-8353e8af1306_tip-*_txn.hg BUNDLESPEC=v2 |
|
161 | file:/*/$TESTTMP/final-upload/full-v2-8_revs-8353e8af1306_tip-*_txn.hg BUNDLESPEC=v2 (glob) | |
162 | $ ls -1 ../final-upload |
|
162 | $ ls -1 ../final-upload | |
163 | full-v2-6_revs-b1010e95ea00_tip-*_txn.hg (glob) |
|
163 | full-v2-6_revs-b1010e95ea00_tip-*_txn.hg (glob) | |
164 | full-v2-8_revs-8353e8af1306_tip-*_txn.hg (glob) |
|
164 | full-v2-8_revs-8353e8af1306_tip-*_txn.hg (glob) | |
@@ -208,7 +208,7 b' generation logic.' | |||||
208 | clone-bundles: starting bundle generation: v2 |
|
208 | clone-bundles: starting bundle generation: v2 | |
209 | 10 changesets found |
|
209 | 10 changesets found | |
210 | $ cat ../server/.hg/clonebundles.manifest |
|
210 | $ cat ../server/.hg/clonebundles.manifest | |
211 |
file:/*/$TESTTMP/final-upload/full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg BUNDLESPEC=v2 |
|
211 | file:/*/$TESTTMP/final-upload/full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg BUNDLESPEC=v2 (glob) | |
212 | $ ls -1 ../final-upload |
|
212 | $ ls -1 ../final-upload | |
213 | full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg (glob) |
|
213 | full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg (glob) | |
214 | full-v2-8_revs-8353e8af1306_tip-*_txn.hg (glob) |
|
214 | full-v2-8_revs-8353e8af1306_tip-*_txn.hg (glob) | |
@@ -220,7 +220,7 b' Check the command cleans up older bundle' | |||||
220 | $ hg -R ../server/ admin::clone-bundles-refresh |
|
220 | $ hg -R ../server/ admin::clone-bundles-refresh | |
221 | clone-bundles: deleting bundle full-v2-8_revs-8353e8af1306_tip-*_txn.hg (glob) |
|
221 | clone-bundles: deleting bundle full-v2-8_revs-8353e8af1306_tip-*_txn.hg (glob) | |
222 | $ cat ../server/.hg/clonebundles.manifest |
|
222 | $ cat ../server/.hg/clonebundles.manifest | |
223 |
file:/*/$TESTTMP/final-upload/full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg BUNDLESPEC=v2 |
|
223 | file:/*/$TESTTMP/final-upload/full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg BUNDLESPEC=v2 (glob) | |
224 | $ ls -1 ../final-upload |
|
224 | $ ls -1 ../final-upload | |
225 | full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg (glob) |
|
225 | full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg (glob) | |
226 | $ ls -1 ../server/.hg/tmp-bundles |
|
226 | $ ls -1 ../server/.hg/tmp-bundles | |
@@ -284,8 +284,8 b' refresh the bundles' | |||||
284 | the bundle for the "new" format should have been added |
|
284 | the bundle for the "new" format should have been added | |
285 |
|
285 | |||
286 | $ cat ../server/.hg/clonebundles.manifest |
|
286 | $ cat ../server/.hg/clonebundles.manifest | |
287 |
file:/*/$TESTTMP/final-upload/full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v1 |
|
287 | file:/*/$TESTTMP/final-upload/full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v1 (glob) | |
288 |
file:/*/$TESTTMP/final-upload/full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg BUNDLESPEC=v2 |
|
288 | file:/*/$TESTTMP/final-upload/full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg BUNDLESPEC=v2 (glob) | |
289 | $ ls -1 ../final-upload |
|
289 | $ ls -1 ../final-upload | |
290 | full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob) |
|
290 | full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob) | |
291 | full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg (glob) |
|
291 | full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg (glob) | |
@@ -311,8 +311,8 b' refresh the bundles' | |||||
311 | the "outdated' bundle should be refreshed |
|
311 | the "outdated' bundle should be refreshed | |
312 |
|
312 | |||
313 | $ cat ../server/.hg/clonebundles.manifest |
|
313 | $ cat ../server/.hg/clonebundles.manifest | |
314 |
file:/*/$TESTTMP/final-upload/full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v1 |
|
314 | file:/*/$TESTTMP/final-upload/full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v1 (glob) | |
315 |
file:/*/$TESTTMP/final-upload/full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v2 |
|
315 | file:/*/$TESTTMP/final-upload/full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v2 (glob) | |
316 | $ ls -1 ../final-upload |
|
316 | $ ls -1 ../final-upload | |
317 | full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob) |
|
317 | full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob) | |
318 | full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg (glob) |
|
318 | full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg (glob) | |
@@ -352,9 +352,33 b' process to end)' | |||||
352 | bundles should have been generated |
|
352 | bundles should have been generated | |
353 |
|
353 | |||
354 | $ cat ../server/.hg/clonebundles.manifest |
|
354 | $ cat ../server/.hg/clonebundles.manifest | |
355 |
file:/*/$TESTTMP/final-upload/full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v1 |
|
355 | file:/*/$TESTTMP/final-upload/full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v1 (glob) | |
356 |
file:/*/$TESTTMP/final-upload/full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v2 |
|
356 | file:/*/$TESTTMP/final-upload/full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v2 (glob) | |
357 | $ ls -1 ../final-upload |
|
357 | $ ls -1 ../final-upload | |
358 | full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob) |
|
358 | full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob) | |
359 | full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob) |
|
359 | full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob) | |
360 | $ ls -1 ../server/.hg/tmp-bundles |
|
360 | $ ls -1 ../server/.hg/tmp-bundles | |
|
361 | ||||
|
362 | Test HTTP URL | |||
|
363 | ========================= | |||
|
364 | ||||
|
365 | $ hg -R ../server/ admin::clone-bundles-clear | |||
|
366 | clone-bundles: deleting bundle full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob) | |||
|
367 | clone-bundles: deleting bundle full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob) | |||
|
368 | ||||
|
369 | $ cat >> ../server/.hg/hgrc << EOF | |||
|
370 | > [clone-bundles] | |||
|
371 | > url-template = https://example.com/final-upload/{basename} | |||
|
372 | > EOF | |||
|
373 | $ hg -R ../server/ admin::clone-bundles-refresh | |||
|
374 | clone-bundles: starting bundle generation: v1 | |||
|
375 | 11 changesets found | |||
|
376 | clone-bundles: starting bundle generation: v2 | |||
|
377 | 11 changesets found | |||
|
378 | ||||
|
379 | ||||
|
380 | bundles should have been generated with the SNIREQUIRED option | |||
|
381 | ||||
|
382 | $ cat ../server/.hg/clonebundles.manifest | |||
|
383 | https://example.com/final-upload/full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v1 REQUIRESNI=true (glob) | |||
|
384 | https://example.com/final-upload/full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v2 REQUIRESNI=true (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now