# HG changeset patch # User Marcin Kuzminski # Date 2018-08-29 21:28:28 # Node ID ef7f85259a6091176a7a0c1a3ce399159f0cb7a7 # Parent 1db1b667663ccf9313bb4f1687ca40b925bd1420 git-hooks: store git-env into hooks, so we can use the sandbox storage area, and execute rcextension pre-commit hooks, to read not yet commit objects in GIT. diff --git a/vcsserver/hooks.py b/vcsserver/hooks.py --- a/vcsserver/hooks.py +++ b/vcsserver/hooks.py @@ -274,7 +274,8 @@ def pre_push(ui, repo, node=None, **kwar def pre_push_ssh(ui, repo, node=None, **kwargs): - if _extras_from_ui(ui).get('SSH'): + extras = _extras_from_ui(ui) + if extras.get('SSH'): return pre_push(ui, repo, node, **kwargs) return 0 @@ -452,6 +453,9 @@ def git_pre_receive(unused_repo_path, re detect_force_push = extras.get('detect_force_push') for push_ref in rev_data: + # store our git-env which holds the temp store + push_ref['git_env'] = [ + (k, v) for k, v in os.environ.items() if k.startswith('GIT')] push_ref['pruned_sha'] = '' if not detect_force_push: # don't check for forced-push when we don't need to