comparison rhodecode/lib/db_manage.py @ 549:f99075170eb4

more renames for rhode code !!
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 06 Oct 2010 03:34:18 +0200
parents 1e757ac98988
children 2642f128ad46
comparison
equal deleted inserted replaced
548:b75b77ef649d 549:f99075170eb4
32 sys.path.append(ROOT) 32 sys.path.append(ROOT)
33 33
34 from rhodecode.lib.auth import get_crypt_password 34 from rhodecode.lib.auth import get_crypt_password
35 from rhodecode.lib.utils import ask_ok 35 from rhodecode.lib.utils import ask_ok
36 from rhodecode.model import init_model 36 from rhodecode.model import init_model
37 from rhodecode.model.db import User, Permission, HgAppUi, HgAppSettings, \ 37 from rhodecode.model.db import User, Permission, RhodeCodeUi, RhodeCodeSettings, \
38 UserToPerm 38 UserToPerm
39 from rhodecode.model import meta 39 from rhodecode.model import meta
40 from sqlalchemy.engine import create_engine 40 from sqlalchemy.engine import create_engine
41 import logging 41 import logging
42 42
105 105
106 if not os.path.isdir(path): 106 if not os.path.isdir(path):
107 log.error('You entered wrong path: %s', path) 107 log.error('You entered wrong path: %s', path)
108 sys.exit() 108 sys.exit()
109 109
110 hooks1 = HgAppUi() 110 hooks1 = RhodeCodeUi()
111 hooks1.ui_section = 'hooks' 111 hooks1.ui_section = 'hooks'
112 hooks1.ui_key = 'changegroup.update' 112 hooks1.ui_key = 'changegroup.update'
113 hooks1.ui_value = 'hg update >&2' 113 hooks1.ui_value = 'hg update >&2'
114 114
115 hooks2 = HgAppUi() 115 hooks2 = RhodeCodeUi()
116 hooks2.ui_section = 'hooks' 116 hooks2.ui_section = 'hooks'
117 hooks2.ui_key = 'changegroup.repo_size' 117 hooks2.ui_key = 'changegroup.repo_size'
118 hooks2.ui_value = 'python:rhodecode.lib.hooks.repo_size' 118 hooks2.ui_value = 'python:rhodecode.lib.hooks.repo_size'
119 119
120 web1 = HgAppUi() 120 web1 = RhodeCodeUi()
121 web1.ui_section = 'web' 121 web1.ui_section = 'web'
122 web1.ui_key = 'push_ssl' 122 web1.ui_key = 'push_ssl'
123 web1.ui_value = 'false' 123 web1.ui_value = 'false'
124 124
125 web2 = HgAppUi() 125 web2 = RhodeCodeUi()
126 web2.ui_section = 'web' 126 web2.ui_section = 'web'
127 web2.ui_key = 'allow_archive' 127 web2.ui_key = 'allow_archive'
128 web2.ui_value = 'gz zip bz2' 128 web2.ui_value = 'gz zip bz2'
129 129
130 web3 = HgAppUi() 130 web3 = RhodeCodeUi()
131 web3.ui_section = 'web' 131 web3.ui_section = 'web'
132 web3.ui_key = 'allow_push' 132 web3.ui_key = 'allow_push'
133 web3.ui_value = '*' 133 web3.ui_value = '*'
134 134
135 web4 = HgAppUi() 135 web4 = RhodeCodeUi()
136 web4.ui_section = 'web' 136 web4.ui_section = 'web'
137 web4.ui_key = 'baseurl' 137 web4.ui_key = 'baseurl'
138 web4.ui_value = '/' 138 web4.ui_value = '/'
139 139
140 paths = HgAppUi() 140 paths = RhodeCodeUi()
141 paths.ui_section = 'paths' 141 paths.ui_section = 'paths'
142 paths.ui_key = '/' 142 paths.ui_key = '/'
143 paths.ui_value = os.path.join(path, '*') 143 paths.ui_value = os.path.join(path, '*')
144 144
145 145
146 hgsettings1 = HgAppSettings() 146 hgsettings1 = RhodeCodeSettings()
147 147
148 hgsettings1.app_settings_name = 'realm' 148 hgsettings1.app_settings_name = 'realm'
149 hgsettings1.app_settings_value = 'hg-app authentication' 149 hgsettings1.app_settings_value = 'rhodecode authentication'
150 150
151 hgsettings2 = HgAppSettings() 151 hgsettings2 = RhodeCodeSettings()
152 hgsettings2.app_settings_name = 'title' 152 hgsettings2.app_settings_name = 'title'
153 hgsettings2.app_settings_value = 'hg-app' 153 hgsettings2.app_settings_value = 'rhodecode'
154 154
155 try: 155 try:
156 self.sa.add(hooks1) 156 self.sa.add(hooks1)
157 self.sa.add(hooks2) 157 self.sa.add(hooks2)
158 self.sa.add(web1) 158 self.sa.add(web1)
213 ('repository.admin', 'Repository admin access'), 213 ('repository.admin', 'Repository admin access'),
214 ('hg.admin', 'Hg Administrator'), 214 ('hg.admin', 'Hg Administrator'),
215 ('hg.create.repository', 'Repository create'), 215 ('hg.create.repository', 'Repository create'),
216 ('hg.create.none', 'Repository creation disabled'), 216 ('hg.create.none', 'Repository creation disabled'),
217 ('hg.register.none', 'Register disabled'), 217 ('hg.register.none', 'Register disabled'),
218 ('hg.register.manual_activate', 'Register new user with hg-app without manual activation'), 218 ('hg.register.manual_activate', 'Register new user with rhodecode without manual activation'),
219 ('hg.register.auto_activate', 'Register new user with hg-app without auto activation'), 219 ('hg.register.auto_activate', 'Register new user with rhodecode without auto activation'),
220 ] 220 ]
221 221
222 for p in perms: 222 for p in perms:
223 new_perm = Permission() 223 new_perm = Permission()
224 new_perm.permission_name = p[0] 224 new_perm.permission_name = p[0]