diff options
author | Marcin Kuzminski <marcin@python-works.com> | 2010-11-18 02:41:38 +0100 |
---|---|---|
committer | Marcin Kuzminski <marcin@python-works.com> | 2010-11-18 02:41:38 +0100 |
commit | fb90b1f3dcbce8f37fb4a370d7ed7b814b96d7fb (patch) | |
tree | 3704cfffc057e70e631a438ddbdddd594baa72e7 /rhodecode/model/forms.py | |
parent | d303c6f36e4c1375314b4c64c1e3bed0af8497b2 (diff) |
Disable git support due to large problems with dulwich.
Added one point of controll over supported backends in rhodecode.BACKENDS
--HG--
branch : beta
Diffstat (limited to 'rhodecode/model/forms.py')
-rw-r--r-- | rhodecode/model/forms.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/rhodecode/model/forms.py b/rhodecode/model/forms.py index edeb0402..f19b4f15 100644 --- a/rhodecode/model/forms.py +++ b/rhodecode/model/forms.py @@ -31,7 +31,7 @@ from rhodecode.model.user import UserModel from rhodecode.model.repo import RepoModel from rhodecode.model.db import User from webhelpers.pylonslib.secure_form import authentication_token -from vcs import BACKENDS +from rhodecode import BACKENDS import formencode import logging import os @@ -301,28 +301,28 @@ def PasswordResetForm(): email = All(ValidSystemEmail(), Email(not_empty=True)) return _PasswordResetForm -def RepoForm(edit=False, old_data={}): +def RepoForm(edit=False, old_data={}, supported_backends=BACKENDS.keys()): class _RepoForm(formencode.Schema): allow_extra_fields = True filter_extra_fields = False repo_name = All(UnicodeString(strip=True, min=1, not_empty=True), ValidRepoName(edit, old_data)) description = UnicodeString(strip=True, min=1, not_empty=True) private = StringBoolean(if_missing=False) - repo_type = OneOf(BACKENDS.keys()) + repo_type = OneOf(supported_backends) if edit: user = All(Int(not_empty=True), ValidRepoUser) chained_validators = [ValidPerms] return _RepoForm -def RepoForkForm(edit=False, old_data={}): +def RepoForkForm(edit=False, old_data={}, supported_backends=BACKENDS.keys()): class _RepoForkForm(formencode.Schema): allow_extra_fields = True filter_extra_fields = False fork_name = All(UnicodeString(strip=True, min=1, not_empty=True), ValidRepoName(edit, old_data)) description = UnicodeString(strip=True, min=1, not_empty=True) private = StringBoolean(if_missing=False) - repo_type = All(ValidForkType(old_data), OneOf(BACKENDS.keys())) + repo_type = All(ValidForkType(old_data), OneOf(supported_backends)) return _RepoForkForm def RepoSettingsForm(edit=False, old_data={}): |