Show More
@@ -41,6 +41,7 b' from rhodecode.lib.auth import LoginRequ' | |||||
41 | HasReposGroupPermissionAll, HasReposGroupPermissionAny, AuthUser |
|
41 | HasReposGroupPermissionAll, HasReposGroupPermissionAny, AuthUser | |
42 | from rhodecode.lib.base import BaseController, render |
|
42 | from rhodecode.lib.base import BaseController, render | |
43 | from rhodecode.lib.celerylib import tasks, run_task |
|
43 | from rhodecode.lib.celerylib import tasks, run_task | |
|
44 | from rhodecode.lib.exceptions import HgsubversionImportError | |||
44 | from rhodecode.lib.utils import repo2db_mapper, set_rhodecode_config, \ |
|
45 | from rhodecode.lib.utils import repo2db_mapper, set_rhodecode_config, \ | |
45 | check_git_version |
|
46 | check_git_version | |
46 | from rhodecode.model.db import RhodeCodeUi, Repository, RepoGroup, \ |
|
47 | from rhodecode.model.db import RhodeCodeUi, Repository, RepoGroup, \ | |
@@ -287,6 +288,11 b' class SettingsController(BaseController)' | |||||
287 | sett.ui_section = 'extensions' |
|
288 | sett.ui_section = 'extensions' | |
288 |
|
289 | |||
289 | sett.ui_active = form_result['extensions_hgsubversion'] |
|
290 | sett.ui_active = form_result['extensions_hgsubversion'] | |
|
291 | if sett.ui_active: | |||
|
292 | try: | |||
|
293 | import hgsubversion | |||
|
294 | except ImportError: | |||
|
295 | raise HgsubversionImportError | |||
290 | Session().add(sett) |
|
296 | Session().add(sett) | |
291 |
|
297 | |||
292 | # sett = RhodeCodeUi.get_by_key('hggit') |
|
298 | # sett = RhodeCodeUi.get_by_key('hggit') | |
@@ -303,6 +309,12 b' class SettingsController(BaseController)' | |||||
303 |
|
309 | |||
304 | h.flash(_('Updated VCS settings'), category='success') |
|
310 | h.flash(_('Updated VCS settings'), category='success') | |
305 |
|
311 | |||
|
312 | except HgsubversionImportError: | |||
|
313 | log.error(traceback.format_exc()) | |||
|
314 | h.flash(_('Unable to activate hgsubversion support. ' | |||
|
315 | 'The "hgsubversion" library is missing'), | |||
|
316 | category='error') | |||
|
317 | ||||
306 | except Exception: |
|
318 | except Exception: | |
307 | log.error(traceback.format_exc()) |
|
319 | log.error(traceback.format_exc()) | |
308 | h.flash(_('Error occurred during updating ' |
|
320 | h.flash(_('Error occurred during updating ' |
General Comments 0
You need to be logged in to leave comments.
Login now