[PATCH 2 of 2] setup-db: perform an initial repository scan as stated by the docs (issue #302)
Mads Kiilerich
mads at kiilerich.com
Wed May 2 01:44:23 UTC 2018
On 05/01/2018 10:13 PM, Thomas De Schampheleire wrote:
> --- a/kallithea/lib/paster_commands/setup_db.py
> +++ b/kallithea/lib/paster_commands/setup_db.py
> @@ -19,6 +19,7 @@ Databaset setup gearbox command for Kall
> """
>
>
> +import gearbox
> import os
> import sys
> import paste.deploy
> @@ -103,4 +104,7 @@ class Command(BasePasterCommand):
> dbmanage.populate_default_permissions()
> Session().commit()
>
> + # initial repository scan
> + gearbox.main.GearBox().run(['repo-scan', '-c', self.args.config_file])
Could we do something like
+ self.config.local_conf['initial_repo_scan'] = True
+
kallithea.config.middleware.make_app_without_logging(self.config.global_conf,
**self.config.local_conf)
instead? Or perhaps even better: call repo2db_mapper explicitly, as
repo_scan does, instead of using initial_repo_scan.
(I consider the "scan on each startup" so much of a mis-feature that I
would be happy to drop it completely.)
/Mads
More information about the kallithea-general
mailing list