Mercurial > kallithea
changeset 2236:37c143aa8616 beta
fixes issue #436 git push error
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 04 May 2012 14:13:17 +0200 |
parents | b6adef467e23 |
children | d919631e8390 |
files | rhodecode/lib/hooks.py rhodecode/lib/middleware/simplegit.py |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/lib/hooks.py Fri May 04 00:42:02 2012 +0200 +++ b/rhodecode/lib/hooks.py Fri May 04 14:13:17 2012 +0200 @@ -111,7 +111,7 @@ Maps user last push action to new changeset id, from mercurial :param ui: - :param repo: + :param repo: repo object containing the `ui` object """ extras = dict(repo.ui.configitems('rhodecode_extras'))
--- a/rhodecode/lib/middleware/simplegit.py Fri May 04 00:42:02 2012 +0200 +++ b/rhodecode/lib/middleware/simplegit.py Fri May 04 14:13:17 2012 +0200 @@ -201,7 +201,7 @@ # invalidate cache on push if action == 'push': self._invalidate_cache(repo_name) - self._handle_githooks(action, baseui, environ) + self._handle_githooks(repo_name, action, baseui, environ) log.info('%s action on GIT repo "%s"' % (action, repo_name)) app = self.__make_app(repo_name, repo_path) @@ -264,7 +264,7 @@ op = getattr(self, '_git_stored_op', 'pull') return op - def _handle_githooks(self, action, baseui, environ): + def _handle_githooks(self, repo_name, action, baseui, environ): from rhodecode.lib.hooks import log_pull_action, log_push_action service = environ['QUERY_STRING'].split('=') if len(service) < 2: @@ -279,9 +279,9 @@ pull_hook = 'preoutgoing.pull_logger' _hooks = dict(baseui.configitems('hooks')) or {} if action == 'push' and _hooks.get(push_hook): - log_push_action(ui=baseui, repo=repo._repo) + log_push_action(ui=baseui, repo=_repo._repo) elif action == 'pull' and _hooks.get(pull_hook): - log_pull_action(ui=baseui, repo=repo._repo) + log_pull_action(ui=baseui, repo=_repo._repo) def __inject_extras(self, repo_path, baseui, extras={}): """