Show More
@@ -111,7 +111,7 b' def log_push_action(ui, repo, **kwargs):' | |||
|
111 | 111 | Maps user last push action to new changeset id, from mercurial |
|
112 | 112 | |
|
113 | 113 | :param ui: |
|
114 | :param repo: | |
|
114 | :param repo: repo object containing the `ui` object | |
|
115 | 115 | """ |
|
116 | 116 | |
|
117 | 117 | extras = dict(repo.ui.configitems('rhodecode_extras')) |
@@ -201,7 +201,7 b' class SimpleGit(BaseVCSController):' | |||
|
201 | 201 | # invalidate cache on push |
|
202 | 202 | if action == 'push': |
|
203 | 203 | self._invalidate_cache(repo_name) |
|
204 | self._handle_githooks(action, baseui, environ) | |
|
204 | self._handle_githooks(repo_name, action, baseui, environ) | |
|
205 | 205 | |
|
206 | 206 | log.info('%s action on GIT repo "%s"' % (action, repo_name)) |
|
207 | 207 | app = self.__make_app(repo_name, repo_path) |
@@ -264,7 +264,7 b' class SimpleGit(BaseVCSController):' | |||
|
264 | 264 | op = getattr(self, '_git_stored_op', 'pull') |
|
265 | 265 | return op |
|
266 | 266 | |
|
267 | def _handle_githooks(self, action, baseui, environ): | |
|
267 | def _handle_githooks(self, repo_name, action, baseui, environ): | |
|
268 | 268 | from rhodecode.lib.hooks import log_pull_action, log_push_action |
|
269 | 269 | service = environ['QUERY_STRING'].split('=') |
|
270 | 270 | if len(service) < 2: |
@@ -279,9 +279,9 b' class SimpleGit(BaseVCSController):' | |||
|
279 | 279 | pull_hook = 'preoutgoing.pull_logger' |
|
280 | 280 | _hooks = dict(baseui.configitems('hooks')) or {} |
|
281 | 281 | if action == 'push' and _hooks.get(push_hook): |
|
282 | log_push_action(ui=baseui, repo=repo._repo) | |
|
282 | log_push_action(ui=baseui, repo=_repo._repo) | |
|
283 | 283 | elif action == 'pull' and _hooks.get(pull_hook): |
|
284 | log_pull_action(ui=baseui, repo=repo._repo) | |
|
284 | log_pull_action(ui=baseui, repo=_repo._repo) | |
|
285 | 285 | |
|
286 | 286 | def __inject_extras(self, repo_path, baseui, extras={}): |
|
287 | 287 | """ |
General Comments 0
You need to be logged in to leave comments.
Login now