Changeset - c6e288dcb4a2
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 14 years ago 2012-02-23 02:51:39
marcin@python-works.com
improved logging in git/hg middlewares
2 files changed with 3 insertions and 5 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/middleware/simplegit.py
Show inline comments
 
@@ -124,7 +124,7 @@ class SimpleGit(BaseVCSController):
 
        if action in ['pull', 'push']:
 
            anonymous_user = self.__get_user('default')
 
            username = anonymous_user.username
 
            anonymous_perm = self._check_permission(action,anonymous_user,
 
            anonymous_perm = self._check_permission(action, anonymous_user,
 
                                                    repo_name)
 

	
 
            if anonymous_perm is not True or anonymous_user.active is False:
 
@@ -157,7 +157,6 @@ class SimpleGit(BaseVCSController):
 
                #==============================================================
 
                # CHECK PERMISSIONS FOR THIS REQUEST USING GIVEN USERNAME
 
                #==============================================================
 
                log.info('%s action on GIT repo "%s"' % (action, repo_name))
 
                if action in ['pull', 'push']:
 
                    try:
 
                        user = self.__get_user(username)
 
@@ -190,7 +189,7 @@ class SimpleGit(BaseVCSController):
 
            #invalidate cache on push
 
            if action == 'push':
 
                self._invalidate_cache(repo_name)
 

	
 
            log.info('%s action on GIT repo "%s"' % (action, repo_name))
 
            app = self.__make_app(repo_name, repo_path)
 
            return app(environ, start_response)
 
        except Exception:
rhodecode/lib/middleware/simplehg.py
Show inline comments
 
@@ -120,7 +120,6 @@ class SimpleHg(BaseVCSController):
 
                #==============================================================
 
                # CHECK PERMISSIONS FOR THIS REQUEST USING GIVEN USERNAME
 
                #==============================================================
 
                log.info('%s action on HG repo "%s"' % (action, repo_name))
 
                if action in ['pull', 'push']:
 
                    try:
 
                        user = self.__get_user(username)
 
@@ -161,7 +160,7 @@ class SimpleHg(BaseVCSController):
 
            # invalidate cache on push
 
            if action == 'push':
 
                self._invalidate_cache(repo_name)
 

	
 
            log.info('%s action on HG repo "%s"' % (action, repo_name))
 
            app = self.__make_app(repo_path, baseui, extras)
 
            return app(environ, start_response)
 
        except RepoError, e:
0 comments (0 inline, 0 general)