##// END OF EJS Templates
clone-bundles: add a command to clear all bundles
marmoute -
r51306:10318b88 default
parent child Browse files
Show More
@@ -977,3 +977,20 b' def cmd_admin_clone_bundles_refresh(ui, '
977 977 update_bundle_list(repo, new_bundles=[result])
978 978 update_ondisk_manifest(repo)
979 979 cleanup_tmp_bundle(repo, generating_bundle)
980
981
982 @command(b'admin::clone-bundles-clear', [], b'')
983 def cmd_admin_clone_bundles_clear(ui, repo: localrepo.localrepository):
984 """remove existing clone bundle caches
985
986 See `hg help admin::clone-bundles-refresh` for details on how to regenerate
987 them.
988
989 This command will only affect bundles currently available, it will not
990 affect bundles being asynchronously generated.
991 """
992 bundles = read_auto_gen(repo)
993 delete = [b for b in bundles if b.ready]
994 for o in delete:
995 delete_bundle(repo, o)
996 update_bundle_list(repo, del_bundles=delete)
@@ -318,3 +318,20 b' the "outdated\' bundle should be refreshe'
318 318 full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg (glob)
319 319 full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob)
320 320 $ ls -1 ../server/.hg/tmp-bundles
321
322 Test more command options
323 =========================
324
325 bundle clearing
326 ---------------
327
328 $ hg -R ../server/ admin::clone-bundles-clear
329 clone-bundles: deleting bundle full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob)
330 clone-bundles: deleting bundle full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg (glob)
331 clone-bundles: deleting bundle full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob)
332
333 Nothing should remain
334
335 $ cat ../server/.hg/clonebundles.manifest
336 $ ls -1 ../final-upload
337 $ ls -1 ../server/.hg/tmp-bundles
@@ -1782,6 +1782,7 b' Test keyword search help'
1782 1782
1783 1783 Extension Commands:
1784 1784
1785 admin::clone-bundles-clear remove existing clone bundle caches
1785 1786 admin::clone-bundles-refresh generate clone bundles according to the
1786 1787 configuration
1787 1788 qclone clone main and patch repository at same time
General Comments 0
You need to be logged in to leave comments. Login now