Show More
@@ -23,6 +23,7 b' import os' | |||||
23 | import sys |
|
23 | import sys | |
24 | import paste.deploy |
|
24 | import paste.deploy | |
25 |
|
25 | |||
|
26 | import kallithea | |||
26 | from kallithea.lib.db_manage import DbManage |
|
27 | from kallithea.lib.db_manage import DbManage | |
27 | from kallithea.lib.paster_commands.common import BasePasterCommand |
|
28 | from kallithea.lib.paster_commands.common import BasePasterCommand | |
28 | from kallithea.model.meta import Session |
|
29 | from kallithea.model.meta import Session | |
@@ -103,4 +104,14 b' class Command(BasePasterCommand):' | |||||
103 | dbmanage.populate_default_permissions() |
|
104 | dbmanage.populate_default_permissions() | |
104 | Session().commit() |
|
105 | Session().commit() | |
105 |
|
106 | |||
|
107 | # initial repository scan | |||
|
108 | kallithea.config.middleware.make_app_without_logging( | |||
|
109 | self.config.global_conf, **self.config.local_conf) | |||
|
110 | added, _ = kallithea.lib.utils.repo2db_mapper(kallithea.model.scm.ScmModel().repo_scan()) | |||
|
111 | if added: | |||
|
112 | print 'Initial repository scan: added following repositories:' | |||
|
113 | print '\t','\n\t'.join(added) | |||
|
114 | else: | |||
|
115 | print 'Initial repository scan: no repositories found.' | |||
|
116 | ||||
106 | print 'Database set up successfully.' |
|
117 | print 'Database set up successfully.' |
General Comments 0
You need to be logged in to leave comments.
Login now