tests/test-clonebundles-autogen.t
changeset 50409 a53b8ddf8f3f
parent 50408 23db5f15cc0c
child 50410 10318b88b1d6
equal deleted inserted replaced
50408:23db5f15cc0c 50409:a53b8ddf8f3f
   254   $ post_refresh_manifest=`cat ../server/.hg/clonebundles.manifest|f --sha256 | sed 's/.*=//' | cat`
   254   $ post_refresh_manifest=`cat ../server/.hg/clonebundles.manifest|f --sha256 | sed 's/.*=//' | cat`
   255   $ post_refresh_upload=`ls -1 ../final-upload|f --sha256 | sed 's/.*=//' | cat`
   255   $ post_refresh_upload=`ls -1 ../final-upload|f --sha256 | sed 's/.*=//' | cat`
   256   $ ls -1 ../server/.hg/tmp-bundles
   256   $ ls -1 ../server/.hg/tmp-bundles
   257   $ test "$pre_push_manifest" = "$post_refresh_manifest"
   257   $ test "$pre_push_manifest" = "$post_refresh_manifest"
   258   $ test "$pre_push_upload" = "$post_refresh_upload"
   258   $ test "$pre_push_upload" = "$post_refresh_upload"
       
   259 
       
   260 Test modification of configuration
       
   261 ==================================
       
   262 
       
   263 Testing that later runs adapt to configuration changes even if the repository is
       
   264 unchanged.
       
   265 
       
   266 adding more formats
       
   267 -------------------
       
   268 
       
   269 bundle for added formats should be generated
       
   270 
       
   271 change configuration
       
   272 
       
   273   $ cat >> ../server/.hg/hgrc << EOF
       
   274   > [clone-bundles]
       
   275   > auto-generate.formats = v1, v2
       
   276   > EOF
       
   277 
       
   278 refresh the bundles
       
   279 
       
   280   $ hg -R ../server/ admin::clone-bundles-refresh
       
   281   clone-bundles: starting bundle generation: v1
       
   282   11 changesets found
       
   283 
       
   284 the bundle for the "new" format should have been added
       
   285 
       
   286   $ cat ../server/.hg/clonebundles.manifest
       
   287   file:/*/$TESTTMP/final-upload/full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v1 REQUIRESNI=true (glob)
       
   288   file:/*/$TESTTMP/final-upload/full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg BUNDLESPEC=v2 REQUIRESNI=true (glob)
       
   289   $ ls -1 ../final-upload
       
   290   full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob)
       
   291   full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg (glob)
       
   292   $ ls -1 ../server/.hg/tmp-bundles
       
   293 
       
   294 Changing the ratio
       
   295 ------------------
       
   296 
       
   297 Changing the ratio to something that would have triggered a bundle during the last push.
       
   298 
       
   299   $ cat >> ../server/.hg/hgrc << EOF
       
   300   > [clone-bundles]
       
   301   > trigger.below-bundled-ratio = 0.95
       
   302   > EOF
       
   303 
       
   304 refresh the bundles
       
   305 
       
   306   $ hg -R ../server/ admin::clone-bundles-refresh
       
   307   clone-bundles: starting bundle generation: v2
       
   308   11 changesets found
       
   309 
       
   310 
       
   311 the "outdated' bundle should be refreshed
       
   312 
       
   313   $ cat ../server/.hg/clonebundles.manifest
       
   314   file:/*/$TESTTMP/final-upload/full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v1 REQUIRESNI=true (glob)
       
   315   file:/*/$TESTTMP/final-upload/full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v2 REQUIRESNI=true (glob)
       
   316   $ ls -1 ../final-upload
       
   317   full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob)
       
   318   full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg (glob)
       
   319   full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob)
       
   320   $ ls -1 ../server/.hg/tmp-bundles