Mercurial > hg
diff hgext/clonebundles.py @ 50751:0a55206c5a1e
branching: merge stable into default
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Thu, 06 Jul 2023 16:07:34 +0200 |
parents | b852c34dc2b8 |
children | 335aeb3d670b |
line wrap: on
line diff
--- a/hgext/clonebundles.py Thu Jun 22 11:28:17 2023 +0200 +++ b/hgext/clonebundles.py Thu Jul 06 16:07:34 2023 +0200 @@ -248,7 +248,7 @@ This logic can be manually triggered using the `admin::clone-bundles-refresh` command, or automatically on each repository change if -`clone-bundles.auto-generate.on-change` is set to `yes`. +`clone-bundles.auto-generate.on-change` is set to `yes`:: [clone-bundles] auto-generate.on-change=yes @@ -972,8 +972,16 @@ targets = repo.ui.configlist( b'clone-bundles', b'auto-generate.formats' ) - if enabled and targets: - tr.addpostclose(CAT_POSTCLOSE, make_auto_bundler(self)) + if enabled: + if not targets: + repo.ui.warn( + _( + b'clone-bundle auto-generate enabled, ' + b'but no formats specified: disabling generation\n' + ) + ) + else: + tr.addpostclose(CAT_POSTCLOSE, make_auto_bundler(self)) return tr @localrepo.unfilteredmethod