# HG changeset patch # User Marcin Kuzminski # Date 2012-07-26 13:36:44 # Node ID 91c442a489bb9242909bdd284c8645808e0942c1 # Parent 09e54a646eb6ca502d2546c12c1e69af7a973c6a sqlalchemy sessions cleanup in admin Cleanup settings options diff --git a/rhodecode/controllers/admin/admin.py b/rhodecode/controllers/admin/admin.py --- a/rhodecode/controllers/admin/admin.py +++ b/rhodecode/controllers/admin/admin.py @@ -45,7 +45,7 @@ class AdminController(BaseController): @HasPermissionAllDecorator('hg.admin') def index(self): - users_log = self.sa.query(UserLog)\ + users_log = UserLog.query()\ .options(joinedload(UserLog.user))\ .options(joinedload(UserLog.repository))\ .order_by(UserLog.action_date.desc()) diff --git a/rhodecode/controllers/admin/ldap_settings.py b/rhodecode/controllers/admin/ldap_settings.py --- a/rhodecode/controllers/admin/ldap_settings.py +++ b/rhodecode/controllers/admin/ldap_settings.py @@ -40,6 +40,7 @@ from rhodecode.lib.auth import LoginRequ from rhodecode.lib.exceptions import LdapImportError from rhodecode.model.forms import LdapSettingsForm from rhodecode.model.db import RhodeCodeSetting +from rhodecode.model.meta import Session log = logging.getLogger(__name__) @@ -119,9 +120,9 @@ class LdapSettingsController(BaseControl v = ldap_active setting = RhodeCodeSetting.get_by_name(k) setting.app_settings_value = v - self.sa.add(setting) + Session().add(setting) - self.sa.commit() + Session().commit() h.flash(_('Ldap settings updated successfully'), category='success') if not ldap_active: diff --git a/rhodecode/controllers/admin/notifications.py b/rhodecode/controllers/admin/notifications.py --- a/rhodecode/controllers/admin/notifications.py +++ b/rhodecode/controllers/admin/notifications.py @@ -83,7 +83,7 @@ class NotificationsController(BaseContro # mark all read nm.mark_all_read_for_user(self.rhodecode_user.user_id, filter_=request.GET.getall('type')) - Session.commit() + Session().commit() c.user = self.rhodecode_user notif = nm.get_for_user(self.rhodecode_user.user_id, filter_=request.GET.getall('type')) @@ -112,7 +112,7 @@ class NotificationsController(BaseContro == c.rhodecode_user.user_id) if h.HasPermissionAny('hg.admin')() or owner: NotificationModel().mark_read(c.rhodecode_user.user_id, no) - Session.commit() + Session().commit() return 'ok' except Exception: Session.rollback() @@ -134,7 +134,7 @@ class NotificationsController(BaseContro == c.rhodecode_user.user_id) if h.HasPermissionAny('hg.admin')() or owner: NotificationModel().delete(c.rhodecode_user.user_id, no) - Session.commit() + Session().commit() return 'ok' except Exception: Session.rollback() @@ -158,7 +158,7 @@ class NotificationsController(BaseContro if unotification: if unotification.read is False: unotification.mark_as_read() - Session.commit() + Session().commit() c.notification = no return render('admin/notifications/show_notification.html') diff --git a/rhodecode/controllers/admin/permissions.py b/rhodecode/controllers/admin/permissions.py --- a/rhodecode/controllers/admin/permissions.py +++ b/rhodecode/controllers/admin/permissions.py @@ -102,7 +102,7 @@ class PermissionsController(BaseControll form_result = _form.to_python(dict(request.POST)) form_result.update({'perm_user_name': id}) permission_model.update(form_result) - Session.commit() + Session().commit() h.flash(_('Default permissions updated successfully'), category='success') diff --git a/rhodecode/controllers/admin/repos.py b/rhodecode/controllers/admin/repos.py --- a/rhodecode/controllers/admin/repos.py +++ b/rhodecode/controllers/admin/repos.py @@ -167,7 +167,7 @@ class ReposController(BaseController): action_logger(self.rhodecode_user, 'admin_created_repo', form_result['repo_name_full'], self.ip_addr, self.sa) - Session.commit() + Session().commit() except formencode.Invalid, errors: c.new_repo = errors.value['repo_name'] @@ -229,7 +229,7 @@ class ReposController(BaseController): changed_name = repo.repo_name action_logger(self.rhodecode_user, 'admin_updated_repo', changed_name, self.ip_addr, self.sa) - Session.commit() + Session().commit() except formencode.Invalid, errors: defaults = self.__load_data(repo_name) defaults.update(errors.value) @@ -273,7 +273,7 @@ class ReposController(BaseController): repo_model.delete(repo) invalidate_cache('get_repo_cached_%s' % repo_name) h.flash(_('deleted repository %s') % repo_name, category='success') - Session.commit() + Session().commit() except IntegrityError, e: if e.message.find('repositories_fork_id_fkey') != -1: log.error(traceback.format_exc()) @@ -303,7 +303,7 @@ class ReposController(BaseController): try: RepoModel().revoke_user_permission(repo=repo_name, user=request.POST['user_id']) - Session.commit() + Session().commit() except Exception: log.error(traceback.format_exc()) h.flash(_('An error occurred during deletion of repository user'), @@ -322,7 +322,7 @@ class ReposController(BaseController): RepoModel().revoke_users_group_permission( repo=repo_name, group_name=request.POST['users_group_id'] ) - Session.commit() + Session().commit() except Exception: log.error(traceback.format_exc()) h.flash(_('An error occurred during deletion of repository' @@ -340,7 +340,7 @@ class ReposController(BaseController): try: RepoModel().delete_stats(repo_name) - Session.commit() + Session().commit() except Exception, e: h.flash(_('An error occurred during deletion of repository stats'), category='error') @@ -356,7 +356,7 @@ class ReposController(BaseController): try: ScmModel().mark_for_invalidation(repo_name) - Session.commit() + Session().commit() except Exception, e: h.flash(_('An error occurred during cache invalidation'), category='error') @@ -380,7 +380,7 @@ class ReposController(BaseController): self.scm_model.toggle_following_repo(repo_id, user_id) h.flash(_('Updated repository visibility in public journal'), category='success') - Session.commit() + Session().commit() except: h.flash(_('An error occurred during setting this' ' repository in public journal'), diff --git a/rhodecode/controllers/admin/repos_groups.py b/rhodecode/controllers/admin/repos_groups.py --- a/rhodecode/controllers/admin/repos_groups.py +++ b/rhodecode/controllers/admin/repos_groups.py @@ -115,7 +115,7 @@ class ReposGroupsController(BaseControll group_description=form_result['group_description'], parent=form_result['group_parent_id'] ) - Session.commit() + Session().commit() h.flash(_('created repos group %s') \ % form_result['group_name'], category='success') #TODO: in futureaction_logger(, '', '', '', self.sa) @@ -162,7 +162,7 @@ class ReposGroupsController(BaseControll try: form_result = repos_group_form.to_python(dict(request.POST)) ReposGroupModel().update(id, form_result) - Session.commit() + Session().commit() h.flash(_('updated repos group %s') \ % form_result['group_name'], category='success') #TODO: in futureaction_logger(, '', '', '', self.sa) @@ -201,7 +201,7 @@ class ReposGroupsController(BaseControll try: ReposGroupModel().delete(id) - Session.commit() + Session().commit() h.flash(_('removed repos group %s') % gr.group_name, category='success') #TODO: in future action_logger(, '', '', '', self.sa) except IntegrityError, e: @@ -234,7 +234,7 @@ class ReposGroupsController(BaseControll ReposGroupModel().revoke_user_permission( repos_group=group_name, user=request.POST['user_id'] ) - Session.commit() + Session().commit() except Exception: log.error(traceback.format_exc()) h.flash(_('An error occurred during deletion of group user'), @@ -254,7 +254,7 @@ class ReposGroupsController(BaseControll repos_group=group_name, group_name=request.POST['users_group_id'] ) - Session.commit() + Session().commit() except Exception: log.error(traceback.format_exc()) h.flash(_('An error occurred during deletion of group' @@ -291,7 +291,7 @@ class ReposGroupsController(BaseControll c.repo_cnt = 0 - c.groups = self.sa.query(RepoGroup).order_by(RepoGroup.group_name)\ + c.groups = RepoGroup.query().order_by(RepoGroup.group_name)\ .filter(RepoGroup.group_parent_id == id).all() return render('admin/repos_groups/repos_groups.html') diff --git a/rhodecode/controllers/admin/settings.py b/rhodecode/controllers/admin/settings.py --- a/rhodecode/controllers/admin/settings.py +++ b/rhodecode/controllers/admin/settings.py @@ -51,8 +51,6 @@ from rhodecode.model.user import UserMod from rhodecode.model.db import User from rhodecode.model.notification import EmailNotificationModel from rhodecode.model.meta import Session -from pylons.decorators import jsonify -from rhodecode.model.pull_request import PullRequestModel log = logging.getLogger(__name__) @@ -109,6 +107,7 @@ class SettingsController(BaseController) # h.form(url('admin_setting', setting_id=ID), # method='put') # url('admin_setting', setting_id=ID) + if setting_id == 'mapping': rm_obsolete = request.POST.get('destroy', False) log.debug('Rescanning directories with destroy=%s' % rm_obsolete) @@ -121,123 +120,115 @@ class SettingsController(BaseController) h.flash(_('Repositories successfully' ' rescanned added: %s,removed: %s') % (added, removed), - category='success') + category='success') if setting_id == 'whoosh': repo_location = self.get_hg_ui_settings()['paths_root_path'] full_index = request.POST.get('full_index', False) run_task(tasks.whoosh_index, repo_location, full_index) + h.flash(_('Whoosh reindex task scheduled'), category='success') - h.flash(_('Whoosh reindex task scheduled'), category='success') if setting_id == 'global': application_form = ApplicationSettingsForm()() try: form_result = application_form.to_python(dict(request.POST)) - - try: - hgsettings1 = RhodeCodeSetting.get_by_name('title') - hgsettings1.app_settings_value = \ - form_result['rhodecode_title'] + except formencode.Invalid, errors: + return htmlfill.render( + render('admin/settings/settings.html'), + defaults=errors.value, + errors=errors.error_dict or {}, + prefix_error=False, + encoding="UTF-8" + ) - hgsettings2 = RhodeCodeSetting.get_by_name('realm') - hgsettings2.app_settings_value = \ - form_result['rhodecode_realm'] + try: + sett1 = RhodeCodeSetting.get_by_name('title') + sett1.app_settings_value = form_result['rhodecode_title'] + Session().add(sett1) - hgsettings3 = RhodeCodeSetting.get_by_name('ga_code') - hgsettings3.app_settings_value = \ - form_result['rhodecode_ga_code'] + sett2 = RhodeCodeSetting.get_by_name('realm') + sett2.app_settings_value = form_result['rhodecode_realm'] + Session().add(sett2) - self.sa.add(hgsettings1) - self.sa.add(hgsettings2) - self.sa.add(hgsettings3) - self.sa.commit() - set_rhodecode_config(config) - h.flash(_('Updated application settings'), - category='success') + sett3 = RhodeCodeSetting.get_by_name('ga_code') + sett3.app_settings_value = form_result['rhodecode_ga_code'] + Session().add(sett3) + + Session().commit() + set_rhodecode_config(config) + h.flash(_('Updated application settings'), category='success') - except Exception: - log.error(traceback.format_exc()) - h.flash(_('error occurred during updating ' - 'application settings'), - category='error') + except Exception: + log.error(traceback.format_exc()) + h.flash(_('error occurred during updating ' + 'application settings'), + category='error') - self.sa.rollback() - + if setting_id == 'vcs': + application_form = ApplicationUiSettingsForm()() + try: + form_result = application_form.to_python(dict(request.POST)) except formencode.Invalid, errors: return htmlfill.render( render('admin/settings/settings.html'), defaults=errors.value, errors=errors.error_dict or {}, prefix_error=False, - encoding="UTF-8") + encoding="UTF-8" + ) - if setting_id == 'mercurial': - application_form = ApplicationUiSettingsForm()() try: - form_result = application_form.to_python(dict(request.POST)) # fix namespaces for hooks _f = lambda s: s.replace('.', '_') - try: - hgsettings1 = self.sa.query(RhodeCodeUi)\ - .filter(RhodeCodeUi.ui_key == 'push_ssl').one() - hgsettings1.ui_value = form_result['web_push_ssl'] + sett1 = RhodeCodeUi.query()\ + .filter(RhodeCodeUi.ui_key == 'push_ssl').one() + sett1.ui_value = form_result['web_push_ssl'] - hgsettings2 = self.sa.query(RhodeCodeUi)\ - .filter(RhodeCodeUi.ui_key == '/').one() - hgsettings2.ui_value = form_result['paths_root_path'] + sett2 = RhodeCodeUi.query()\ + .filter(RhodeCodeUi.ui_key == '/').one() + sett2.ui_value = form_result['paths_root_path'] - #HOOKS - hgsettings3 = self.sa.query(RhodeCodeUi)\ - .filter(RhodeCodeUi.ui_key == RhodeCodeUi.HOOK_UPDATE)\ - .one() - hgsettings3.ui_active = bool(form_result[_f('hooks_%s' % - RhodeCodeUi.HOOK_UPDATE)]) + #HOOKS + sett3 = RhodeCodeUi.query()\ + .filter(RhodeCodeUi.ui_key == RhodeCodeUi.HOOK_UPDATE)\ + .one() + sett3.ui_active = bool(form_result[_f('hooks_%s' % + RhodeCodeUi.HOOK_UPDATE)]) - hgsettings4 = self.sa.query(RhodeCodeUi)\ - .filter(RhodeCodeUi.ui_key == RhodeCodeUi.HOOK_REPO_SIZE)\ - .one() - hgsettings4.ui_active = bool(form_result[_f('hooks_%s' % - RhodeCodeUi.HOOK_REPO_SIZE)]) - - hgsettings5 = self.sa.query(RhodeCodeUi)\ - .filter(RhodeCodeUi.ui_key == RhodeCodeUi.HOOK_PUSH)\ - .one() - hgsettings5.ui_active = bool(form_result[_f('hooks_%s' % - RhodeCodeUi.HOOK_PUSH)]) + sett4 = RhodeCodeUi.query()\ + .filter(RhodeCodeUi.ui_key == RhodeCodeUi.HOOK_REPO_SIZE)\ + .one() + sett4.ui_active = bool(form_result[_f('hooks_%s' % + RhodeCodeUi.HOOK_REPO_SIZE)]) - hgsettings6 = self.sa.query(RhodeCodeUi)\ - .filter(RhodeCodeUi.ui_key == RhodeCodeUi.HOOK_PULL)\ - .one() - hgsettings6.ui_active = bool(form_result[_f('hooks_%s' % - RhodeCodeUi.HOOK_PULL)]) + sett5 = RhodeCodeUi.query()\ + .filter(RhodeCodeUi.ui_key == RhodeCodeUi.HOOK_PUSH)\ + .one() + sett5.ui_active = bool(form_result[_f('hooks_%s' % + RhodeCodeUi.HOOK_PUSH)]) - self.sa.add(hgsettings1) - self.sa.add(hgsettings2) - self.sa.add(hgsettings3) - self.sa.add(hgsettings4) - self.sa.add(hgsettings5) - self.sa.add(hgsettings6) - self.sa.commit() + sett6 = RhodeCodeUi.query()\ + .filter(RhodeCodeUi.ui_key == RhodeCodeUi.HOOK_PULL)\ + .one() + sett6.ui_active = bool(form_result[_f('hooks_%s' % + RhodeCodeUi.HOOK_PULL)]) - h.flash(_('Updated mercurial settings'), - category='success') - - except: - log.error(traceback.format_exc()) - h.flash(_('error occurred during updating ' - 'application settings'), category='error') + Session().add(sett1) + Session().add(sett2) + Session().add(sett3) + Session().add(sett4) + Session().add(sett5) + Session().add(sett6) + Session().commit() - self.sa.rollback() + h.flash(_('Updated mercurial settings'), category='success') - except formencode.Invalid, errors: - return htmlfill.render( - render('admin/settings/settings.html'), - defaults=errors.value, - errors=errors.error_dict or {}, - prefix_error=False, - encoding="UTF-8") + except Exception: + log.error(traceback.format_exc()) + h.flash(_('error occurred during updating ' + 'application settings'), category='error') if setting_id == 'hooks': ui_key = request.POST.get('new_hook_ui_key') @@ -259,8 +250,8 @@ class SettingsController(BaseController) if update: h.flash(_('Updated hooks'), category='success') - self.sa.commit() - except: + Session().commit() + except Exception: log.error(traceback.format_exc()) h.flash(_('error occurred during hook creation'), category='error') @@ -296,7 +287,7 @@ class SettingsController(BaseController) if setting_id == 'hooks': hook_id = request.POST.get('hook_id') RhodeCodeUi.delete(hook_id) - self.sa.commit() + Session().commit() @HasPermissionAllDecorator('hg.admin') def show(self, setting_id, format='html'): @@ -329,7 +320,7 @@ class SettingsController(BaseController) # url('admin_settings_my_account') c.user = User.get(self.rhodecode_user.user_id) - all_repos = self.sa.query(Repository)\ + all_repos = Session().query(Repository)\ .filter(Repository.user_id == c.user.user_id)\ .order_by(func.lower(Repository.repo_name)).all() @@ -369,7 +360,7 @@ class SettingsController(BaseController) UserModel().update_my_account(uid, form_result) h.flash(_('Your account was updated successfully'), category='success') - Session.commit() + Session().commit() except formencode.Invalid, errors: c.user = User.get(self.rhodecode_user.user_id) @@ -386,10 +377,10 @@ class SettingsController(BaseController) % form_result.get('username'), category='error') return redirect(url('my_account')) - + @NotAnonymous() def my_account_my_repos(self): - all_repos = self.sa.query(Repository)\ + all_repos = Session().query(Repository)\ .filter(Repository.user_id == self.rhodecode_user.user_id)\ .order_by(func.lower(Repository.repo_name))\ .all() @@ -425,7 +416,7 @@ class SettingsController(BaseController) @NotAnonymous() def get_hg_ui_settings(self): - ret = self.sa.query(RhodeCodeUi).all() + ret = RhodeCodeUi.query().all() if not ret: raise Exception('Could not get application ui settings !') diff --git a/rhodecode/controllers/admin/users.py b/rhodecode/controllers/admin/users.py --- a/rhodecode/controllers/admin/users.py +++ b/rhodecode/controllers/admin/users.py @@ -126,7 +126,7 @@ class UsersController(BaseController): None, self.ip_addr, self.sa) h.flash(_('created user %s') % usr, category='success') - Session.commit() + Session().commit() except formencode.Invalid, errors: return htmlfill.render( render('admin/users/user_add.html'), @@ -166,7 +166,7 @@ class UsersController(BaseController): action_logger(self.rhodecode_user, 'admin_updated_user:%s' % usr, None, self.ip_addr, self.sa) h.flash(_('User updated successfully'), category='success') - Session.commit() + Session().commit() except formencode.Invalid, errors: c.user_email_map = UserEmailMap.query()\ .filter(UserEmailMap.user == c.user).all() @@ -198,7 +198,7 @@ class UsersController(BaseController): user_model = UserModel() try: user_model.delete(id) - Session.commit() + Session().commit() h.flash(_('successfully deleted user'), category='success') except (UserOwnsReposException, DefaultUserException), e: h.flash(e, category='warning') @@ -252,7 +252,7 @@ class UsersController(BaseController): user_model.grant_perm(id, perm) h.flash(_("Granted 'repository create' permission to user"), category='success') - Session.commit() + Session().commit() else: perm = Permission.get_by_key('hg.create.repository') user_model.revoke_perm(id, perm) @@ -261,7 +261,7 @@ class UsersController(BaseController): user_model.grant_perm(id, perm) h.flash(_("Revoked 'repository create' permission to user"), category='success') - Session.commit() + Session().commit() return redirect(url('edit_user', id=id)) def add_email(self, id): @@ -274,7 +274,7 @@ class UsersController(BaseController): try: user_model.add_extra_email(id, email) - Session.commit() + Session().commit() h.flash(_("Added email %s to user") % email, category='success') except formencode.Invalid, error: msg = error.error_dict['email'] @@ -290,6 +290,6 @@ class UsersController(BaseController): # url('user_emails_delete', id=ID, method='delete') user_model = UserModel() user_model.delete_extra_email(id, request.POST.get('del_email')) - Session.commit() + Session().commit() h.flash(_("Removed email from user"), category='success') return redirect(url('edit_user', id=id)) diff --git a/rhodecode/controllers/admin/users_groups.py b/rhodecode/controllers/admin/users_groups.py --- a/rhodecode/controllers/admin/users_groups.py +++ b/rhodecode/controllers/admin/users_groups.py @@ -65,7 +65,7 @@ class UsersGroupsController(BaseControll def index(self, format='html'): """GET /users_groups: All items in the collection""" # url('users_groups') - c.users_groups_list = self.sa.query(UsersGroup).all() + c.users_groups_list = UsersGroup().query().all() return render('admin/users_groups/users_groups.html') def create(self): @@ -82,7 +82,7 @@ class UsersGroupsController(BaseControll 'admin_created_users_group:%s' % gr, None, self.ip_addr, self.sa) h.flash(_('created users group %s') % gr, category='success') - Session.commit() + Session().commit() except formencode.Invalid, errors: return htmlfill.render( render('admin/users_groups/users_group_add.html'), @@ -117,7 +117,7 @@ class UsersGroupsController(BaseControll c.group_members_obj] c.available_members = [(x.user_id, x.username) for x in - self.sa.query(User).all()] + User.query().all()] available_members = [safe_unicode(x[0]) for x in c.available_members] @@ -133,7 +133,7 @@ class UsersGroupsController(BaseControll 'admin_updated_users_group:%s' % gr, None, self.ip_addr, self.sa) h.flash(_('updated users group %s') % gr, category='success') - Session.commit() + Session().commit() except formencode.Invalid, errors: e = errors.error_dict or {} @@ -165,7 +165,7 @@ class UsersGroupsController(BaseControll try: UsersGroupModel().delete(id) - Session.commit() + Session().commit() h.flash(_('successfully deleted users group'), category='success') except UsersGroupsAssignedException, e: h.flash(e, category='error') @@ -183,7 +183,7 @@ class UsersGroupsController(BaseControll """GET /users_groups/id/edit: Form to edit an existing item""" # url('edit_users_group', id=ID) - c.users_group = self.sa.query(UsersGroup).get(id) + c.users_group = UsersGroup.get(id) if not c.users_group: return redirect(url('users_groups')) @@ -192,7 +192,7 @@ class UsersGroupsController(BaseControll c.group_members = [(x.user_id, x.username) for x in c.group_members_obj] c.available_members = [(x.user_id, x.username) for x in - self.sa.query(User).all()] + User.query().all()] defaults = c.users_group.get_dict() perm = Permission.get_by_key('hg.create.repository') defaults.update({'create_repo_perm': @@ -219,7 +219,7 @@ class UsersGroupsController(BaseControll h.flash(_("Granted 'repository create' permission to user"), category='success') - Session.commit() + Session().commit() else: perm = Permission.get_by_key('hg.create.repository') UsersGroupModel().revoke_perm(id, perm) @@ -228,5 +228,5 @@ class UsersGroupsController(BaseControll UsersGroupModel().grant_perm(id, perm) h.flash(_("Revoked 'repository create' permission to user"), category='success') - Session.commit() + Session().commit() return redirect(url('edit_users_group', id=id)) diff --git a/rhodecode/lib/db_manage.py b/rhodecode/lib/db_manage.py --- a/rhodecode/lib/db_manage.py +++ b/rhodecode/lib/db_manage.py @@ -59,7 +59,7 @@ class DbManage(object): def init_db(self): engine = create_engine(self.dburi, echo=self.log_sql) init_model(engine) - self.sa = meta.Session + self.sa = meta.Session() def create_tables(self, override=False, defaults={}): """ @@ -445,18 +445,25 @@ class DbManage(object): paths.ui_key = '/' paths.ui_value = path - hgsettings1 = RhodeCodeSetting('realm', 'RhodeCode authentication') - hgsettings2 = RhodeCodeSetting('title', 'RhodeCode') - hgsettings3 = RhodeCodeSetting('ga_code', '') + sett1 = RhodeCodeSetting('realm', 'RhodeCode authentication') + sett2 = RhodeCodeSetting('title', 'RhodeCode') + sett3 = RhodeCodeSetting('ga_code', '') + + sett4 = RhodeCodeSetting('show_public_icon', True) + sett5 = RhodeCodeSetting('show_private_icon', True) + sett6 = RhodeCodeSetting('stylify_metatags', False) self.sa.add(web1) self.sa.add(web2) self.sa.add(web3) self.sa.add(web4) self.sa.add(paths) - self.sa.add(hgsettings1) - self.sa.add(hgsettings2) - self.sa.add(hgsettings3) + self.sa.add(sett1) + self.sa.add(sett2) + self.sa.add(sett3) + self.sa.add(sett4) + self.sa.add(sett5) + self.sa.add(sett6) self.create_ldap_options() diff --git a/rhodecode/templates/admin/settings/settings.html b/rhodecode/templates/admin/settings/settings.html --- a/rhodecode/templates/admin/settings/settings.html +++ b/rhodecode/templates/admin/settings/settings.html @@ -115,8 +115,8 @@ ${h.end_form()} -

${_('Mercurial settings')}

- ${h.form(url('admin_setting', setting_id='mercurial'),method='put')} +

${_('VCS settings')}

+ ${h.form(url('admin_setting', setting_id='vcs'),method='put')}