Mercurial > kallithea
changeset 2026:c6e288dcb4a2 beta
improved logging in git/hg middlewares
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 23 Feb 2012 03:51:39 +0200 |
parents | 7e979933ffec |
children | 88d5e42a66c3 |
files | rhodecode/lib/middleware/simplegit.py rhodecode/lib/middleware/simplehg.py |
diffstat | 2 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/lib/middleware/simplegit.py Thu Feb 23 03:39:35 2012 +0200 +++ b/rhodecode/lib/middleware/simplegit.py Thu Feb 23 03:51:39 2012 +0200 @@ -124,7 +124,7 @@ 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 @@ #============================================================== # 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 @@ #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:
--- a/rhodecode/lib/middleware/simplehg.py Thu Feb 23 03:39:35 2012 +0200 +++ b/rhodecode/lib/middleware/simplehg.py Thu Feb 23 03:51:39 2012 +0200 @@ -120,7 +120,6 @@ #============================================================== # 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 @@ # 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: