##// END OF EJS Templates
stream-clone-test: simplify testing of secret cloning restriction...
marmoute -
r52371:f9a6bae0 default
parent child Browse files
Show More
@@ -277,6 +277,10 b' the result should be a valid repository.'
277 $ hg verify -R clone-background --quiet
277 $ hg verify -R clone-background --quiet
278
278
279 Cannot stream clone when there are secret changesets
279 Cannot stream clone when there are secret changesets
280 ----------------------------------------------------
281
282 If secret changeset are present the should not be cloned (by default) and the
283 clone falls back to a bundle clone.
280
284
281 $ hg -R server phase --force --secret -r tip
285 $ hg -R server phase --force --secret -r tip
282 $ hg clone --stream -U http://localhost:$HGPORT secret-denied
286 $ hg clone --stream -U http://localhost:$HGPORT secret-denied
@@ -291,40 +295,22 b' Cannot stream clone when there are secre'
291 $ killdaemons.py
295 $ killdaemons.py
292
296
293 Streaming of secrets can be overridden by server config
297 Streaming of secrets can be overridden by server config
298 -------------------------------------------------------
299
300 Secret changeset can still be streamed if the server is configured to do so.
294
301
295 $ cd server
302 $ cd server
296 $ hg serve --config server.uncompressedallowsecret=true -p $HGPORT -d --pid-file=hg.pid
303 $ hg serve --config server.uncompressedallowsecret=true -p $HGPORT -d --pid-file=hg.pid
297 $ cat hg.pid > $DAEMON_PIDS
304 $ cat hg.pid > $DAEMON_PIDS
298 $ cd ..
305 $ cd ..
299
306
300 #if stream-legacy
301 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
302 streaming all changes
303 1091 files to transfer, 102 KB of data (no-zstd !)
304 transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
305 1091 files to transfer, 98.8 KB of data (zstd !)
306 transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !)
307 searching for changes
308 no changes found
309 #endif
310 #if stream-bundle2-v2
311 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
307 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
312 streaming all changes
308 streaming all changes
313 1094 files to transfer, 102 KB of data (no-zstd !)
309 * files to transfer* (glob) (no-stream-bundle2-v3 !)
314 transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
310 * entries to transfer (glob) (stream-bundle2-v3 !)
315 1094 files to transfer, 98.9 KB of data (zstd no-rust !)
311 transferred * KB in * seconds (* */sec) (glob)
316 transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !)
312 searching for changes (stream-legacy !)
317 1096 files to transfer, 99.0 KB of data (zstd rust !)
313 no changes found (stream-legacy !)
318 transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !)
319 #endif
320 #if stream-bundle2-v3
321 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
322 streaming all changes
323 1093 entries to transfer
324 transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
325 transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !)
326 transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !)
327 #endif
328
314
329 $ killdaemons.py
315 $ killdaemons.py
330
316
@@ -373,6 +359,10 b" there is no security so it isn't importa"
373 added 2 changesets with 1025 changes to 1025 files
359 added 2 changesets with 1025 changes to 1025 files
374 new changesets 96ee1d7354c4:c17445101a72
360 new changesets 96ee1d7354c4:c17445101a72
375
361
362 (revert introduction of secret changeset)
363
364 $ hg -R server phase --draft 'secret()'
365
376 Stream clone while repo is changing:
366 Stream clone while repo is changing:
377
367
378 $ mkdir changing
368 $ mkdir changing
@@ -415,10 +405,6 b' actually serving file content'
415 Stream repository with bookmarks
405 Stream repository with bookmarks
416 --------------------------------
406 --------------------------------
417
407
418 (revert introduction of secret changeset)
419
420 $ hg -R server phase --draft 'secret()'
421
422 add a bookmark
408 add a bookmark
423
409
424 $ hg -R server bookmark -r tip some-bookmark
410 $ hg -R server bookmark -r tip some-bookmark
General Comments 0
You need to be logged in to leave comments. Login now