Mercurial > kallithea
comparison pylons_app/lib/db_manage.py @ 392:b27d32cb3157
Implemented hooks system,
Added repo size hook, and active flag on ui settings in the database to able to toggle them.
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 06 Aug 2010 02:03:22 +0200 |
parents | 55377fdc1fc6 |
children | 3ed2d46a2ca7 |
comparison
equal
deleted
inserted
replaced
391:a9814a642e11 | 392:b27d32cb3157 |
---|---|
88 | 88 |
89 if not os.path.isdir(path): | 89 if not os.path.isdir(path): |
90 log.error('You entered wrong path') | 90 log.error('You entered wrong path') |
91 sys.exit() | 91 sys.exit() |
92 | 92 |
93 hooks = HgAppUi() | 93 hooks1 = HgAppUi() |
94 hooks.ui_section = 'hooks' | 94 hooks1.ui_section = 'hooks' |
95 hooks.ui_key = 'changegroup' | 95 hooks1.ui_key = 'changegroup.update' |
96 hooks.ui_value = 'hg update >&2' | 96 hooks1.ui_value = 'hg update >&2' |
97 | 97 |
98 hooks2 = HgAppUi() | |
99 hooks2.ui_section = 'hooks' | |
100 hooks2.ui_key = 'changegroup.repo_size' | |
101 hooks2.ui_value = 'python:pylons_app.lib.hooks.repo_size' | |
102 | |
98 web1 = HgAppUi() | 103 web1 = HgAppUi() |
99 web1.ui_section = 'web' | 104 web1.ui_section = 'web' |
100 web1.ui_key = 'push_ssl' | 105 web1.ui_key = 'push_ssl' |
101 web1.ui_value = 'false' | 106 web1.ui_value = 'false' |
102 | 107 |
129 hgsettings2 = HgAppSettings() | 134 hgsettings2 = HgAppSettings() |
130 hgsettings2.app_settings_name = 'title' | 135 hgsettings2.app_settings_name = 'title' |
131 hgsettings2.app_settings_value = 'hg-app' | 136 hgsettings2.app_settings_value = 'hg-app' |
132 | 137 |
133 try: | 138 try: |
134 #self.sa.add(hooks) | 139 self.sa.add(hooks1) |
140 self.sa.add(hooks2) | |
135 self.sa.add(web1) | 141 self.sa.add(web1) |
136 self.sa.add(web2) | 142 self.sa.add(web2) |
137 self.sa.add(web3) | 143 self.sa.add(web3) |
138 self.sa.add(web4) | 144 self.sa.add(web4) |
139 self.sa.add(paths) | 145 self.sa.add(paths) |