Changeset - fb51a6fc10ae
[Not reviewed]
beta
0 7 0
Marcin Kuzminski - 14 years ago 2012-02-28 04:25:16
marcin@python-works.com
updated CONTRIBUTORS
- code garden
3 files changed with 9 insertions and 3 deletions:
0 comments (0 inline, 0 general)
CONTRIBUTORS
Show inline comments
 
@@ -6,13 +6,14 @@ List of contributors to RhodeCode projec
 
    cejones
 
    Thomas Waldmann <tw-public@gmx.de>
 
    Lorenzo M. Catucci <lorenzo@sancho.ccd.uniroma2.it>
 
    Dmitri Kuznetsov
 
    Jared Bunting <jared.bunting@peachjean.com>
 
    Steve Romanow <slestak989@gmail.com>
 
    Augosto Hermann <augusto.herrmann@planejamento.gov.br>    
 
    Ankit Solanki <ankit.solanki@gmail.com>    
 
    Liad Shani <liadff@gmail.com>
 
    Les Peabody <lpeabody@gmail.com>
 
    Jonas Oberschweiber <jonas.oberschweiber@d-velop.de>
 
    Matt Zuba <matt.zuba@goodwillaz.org>
 
    Aras Pranckevicius <aras@unity3d.com>
 
\ No newline at end of file
 
    Aras Pranckevicius <aras@unity3d.com>
 
    Tony Bussieres <t.bussieres@gmail.com>
docs/changelog.rst
Show inline comments
 
@@ -11,24 +11,25 @@ Changelog
 
:branch: beta
 

	
 
news
 
++++
 

	
 

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

	
 
news
 
++++
 

	
 

	
 
fixes
 
+++++
 

	
 
- redirection loop occurs when remember-me wasn't checked during login
rhodecode/lib/middleware/simplegit.py
Show inline comments
 
@@ -73,27 +73,29 @@ from rhodecode.lib import safe_str
 
from rhodecode.lib.base import BaseVCSController
 
from rhodecode.lib.auth import get_container_username
 
from rhodecode.lib.utils import is_valid_repo
 
from rhodecode.model.db import User
 

	
 
from webob.exc import HTTPNotFound, HTTPForbidden, HTTPInternalServerError
 

	
 
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):
 
        #======================================================================
 
        # GET ACTION PULL or PUSH
 
        #======================================================================
 
        action = self.__get_action(environ)
 

	
 
        if not is_git(action):
 
            return self.application(environ, start_response)
 

	
 
        proxy_key = 'HTTP_X_REAL_IP'
 
@@ -221,27 +223,29 @@ class SimpleGit(BaseVCSController):
 
            if repo_name.endswith('/'):
 
                repo_name = repo_name.rstrip('/')
 
        except:
 
            log.error(traceback.format_exc())
 
            raise
 

	
 
        return repo_name
 

	
 
    def __get_user(self, username):
 
        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',
 
            mapping = {
 
                'git-receive-pack': 'push',
 
                       'git-upload-pack': 'pull',
 
                       }
 

	
 
            return mapping.get(service_cmd,
 
                               service_cmd if service_cmd else 'other')
 
        else:
 
            return 'other'
0 comments (0 inline, 0 general)