##// END OF EJS Templates
raise na OSERROR if repository data sent from git hook to hook handler is somehow invalid
marcink -
r2818:3d0bd5f7 beta
parent child Browse files
Show More
@@ -34,10 +34,9 b' from rhodecode.lib import helpers as h'
34 from rhodecode.lib.utils import action_logger
34 from rhodecode.lib.utils import action_logger
35 from rhodecode.lib.vcs.backends.base import EmptyChangeset
35 from rhodecode.lib.vcs.backends.base import EmptyChangeset
36 from rhodecode.lib.compat import json
36 from rhodecode.lib.compat import json
37 from rhodecode.model.db import Repository, User
37 from rhodecode.lib.exceptions import HTTPLockedRC
38 from rhodecode.lib.utils2 import safe_str
38 from rhodecode.lib.utils2 import safe_str
39 from rhodecode.lib.exceptions import HTTPLockedRC
39 from rhodecode.model.db import Repository, User
40
41
40
42 def _get_scm_size(alias, root_path):
41 def _get_scm_size(alias, root_path):
43
42
@@ -330,7 +329,12 b' def handle_git_receive(repo_path, revs, '
330 # fix if it's not a bare repo
329 # fix if it's not a bare repo
331 if repo_path.endswith('.git'):
330 if repo_path.endswith('.git'):
332 repo_path = repo_path[:-4]
331 repo_path = repo_path[:-4]
332
333 repo = Repository.get_by_full_path(repo_path)
333 repo = Repository.get_by_full_path(repo_path)
334 if not repo:
335 raise OSError('Repository %s not found in database'
336 % (safe_str(repo_path)))
337
334 _hooks = dict(baseui.configitems('hooks')) or {}
338 _hooks = dict(baseui.configitems('hooks')) or {}
335
339
336 extras = json.loads(env['RHODECODE_EXTRAS'])
340 extras = json.loads(env['RHODECODE_EXTRAS'])
General Comments 0
You need to be logged in to leave comments. Login now