Marcin Kuzminski avatar Marcin Kuzminski committed fb51a6f

- code garden

Comments (0)

Files changed (7)

     Les Peabody <>
     Jonas Oberschweiber <>
     Matt Zuba <>
-    Aras Pranckevicius <>
+    Aras Pranckevicius <>
+    Tony Bussieres <>


 - 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**)


     <div style="padding:5px">
      <a href="" target="_blank">
      <img src="" alt="Flattr this" title="Flattr this" border="0" /></a>
-   </div>  
+   </div>
 {% endblock %}}


     :rtype: str
     :returns: str object
     # if it's not basestr cast to str
     if not isinstance(unicode_, basestring):
         return str(unicode_)


 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):
         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')


         prefix = ''
         iid = rhodecode.CONFIG.get('instance_id')
         if iid:
-            prefix = iid 
+            prefix = iid
         return "%s%s" % (prefix, key)


             user = All(UnicodeString(not_empty=True), ValidRepoUser)
         chained_validators = [ValidCloneUri()(),
-                              ValidRepoName(edit, old_data), 
+                              ValidRepoName(edit, old_data),
     return _RepoForm
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.