# HG changeset patch # User Marcin Kuzminski # Date 2012-02-28 03:25:16 # Node ID fb51a6fc10aeae04246e4b79245279d8980dadc6 # Parent 766696ee9487d761000a8fb511b451a4c4839756 updated CONTRIBUTORS - code garden diff --git a/CONTRIBUTORS b/CONTRIBUTORS --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -15,4 +15,5 @@ List of contributors to RhodeCode projec Les Peabody Jonas Oberschweiber Matt Zuba - Aras Pranckevicius \ No newline at end of file + Aras Pranckevicius + Tony Bussieres diff --git a/docs/changelog.rst b/docs/changelog.rst --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -20,6 +20,7 @@ fixes - fixed git protocol issues with repos-groups - fixed git remote repos validator that prevented from cloning remote git repos - fixes #370 ending slashes fixes for repo and groups +- fixes #368 improved git-protocol detection to handle other clients 1.3.1 (**2012-02-27**) ---------------------- diff --git a/docs/theme/nature/layout.html b/docs/theme/nature/layout.html --- a/docs/theme/nature/layout.html +++ b/docs/theme/nature/layout.html @@ -13,6 +13,6 @@
Flattr this -
+ {% endblock %}} diff --git a/rhodecode/lib/__init__.py b/rhodecode/lib/__init__.py --- a/rhodecode/lib/__init__.py +++ b/rhodecode/lib/__init__.py @@ -231,7 +231,7 @@ def safe_str(unicode_, to_encoding=None) :rtype: str :returns: str object """ - + # if it's not basestr cast to str if not isinstance(unicode_, basestring): return str(unicode_) diff --git a/rhodecode/lib/middleware/simplegit.py b/rhodecode/lib/middleware/simplegit.py --- a/rhodecode/lib/middleware/simplegit.py +++ b/rhodecode/lib/middleware/simplegit.py @@ -82,9 +82,11 @@ log = logging.getLogger(__name__) GIT_PROTO_PAT = re.compile(r'git-upload-pack|git-receive-pack|info\/refs') + def is_git(action): return action in ['pull','push'] + class SimpleGit(BaseVCSController): def _handle_request(self, environ, start_response): @@ -230,16 +232,18 @@ class SimpleGit(BaseVCSController): return User.get_by_username(username) def __get_action(self, environ): - """Maps git request commands into a pull or push command. + """ + Maps git request commands into a pull or push command. :param environ: """ service = environ['QUERY_STRING'].split('=') if len(service) > 1: service_cmd = service[1] - mapping = {'git-receive-pack': 'push', - 'git-upload-pack': 'pull', - } + mapping = { + 'git-receive-pack': 'push', + 'git-upload-pack': 'pull', + } return mapping.get(service_cmd, service_cmd if service_cmd else 'other') diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -1038,7 +1038,7 @@ class CacheInvalidation(Base, BaseModel) prefix = '' iid = rhodecode.CONFIG.get('instance_id') if iid: - prefix = iid + prefix = iid return "%s%s" % (prefix, key) @classmethod diff --git a/rhodecode/model/forms.py b/rhodecode/model/forms.py --- a/rhodecode/model/forms.py +++ b/rhodecode/model/forms.py @@ -672,7 +672,7 @@ def RepoForm(edit=False, old_data={}, su user = All(UnicodeString(not_empty=True), ValidRepoUser) chained_validators = [ValidCloneUri()(), - ValidRepoName(edit, old_data), + ValidRepoName(edit, old_data), ValidPerms()] return _RepoForm