diff tests/test-clonebundles-autogen.t @ 50438:3973b1dc3ee3

clone-bundles: add an option to generate bundles in the background This is what the "on-change" version have been doing from the start, it seems useful to also offer this option in the command.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 14 Mar 2023 05:30:34 +0100
parents 10318b88b1d6
children 1299525832d0
line wrap: on
line diff
--- a/tests/test-clonebundles-autogen.t	Tue Mar 14 05:09:16 2023 +0100
+++ b/tests/test-clonebundles-autogen.t	Tue Mar 14 05:30:34 2023 +0100
@@ -335,3 +335,26 @@
   $ cat ../server/.hg/clonebundles.manifest
   $ ls -1 ../final-upload
   $ ls -1 ../server/.hg/tmp-bundles
+
+background generation
+---------------------
+
+generate bundle using background subprocess
+(since we are in devel mode, the command will still wait for the background
+process to end)
+
+  $ hg -R ../server/ admin::clone-bundles-refresh --background
+  11 changesets found
+  11 changesets found
+  clone-bundles: starting bundle generation: v1
+  clone-bundles: starting bundle generation: v2
+
+bundles should have been generated
+
+  $ cat ../server/.hg/clonebundles.manifest
+  file:/*/$TESTTMP/final-upload/full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v1 REQUIRESNI=true (glob)
+  file:/*/$TESTTMP/final-upload/full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v2 REQUIRESNI=true (glob)
+  $ ls -1 ../final-upload
+  full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob)
+  full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob)
+  $ ls -1 ../server/.hg/tmp-bundles