Mercurial > kallithea
view .hgignore @ 7633:1bafb2d07709 stable
hooks: make the Python interpreter for Git hooks configurable as 'git_hook_interpreter' (Issue #333)
Commit 5e501b6ee639 introduced the use of 'sys.executable' as interpreter
for git hooks instead of 'python2' with the following argument:
"Windows doesn't necessarily have "python2" available in $PATH, but we
still want to make sure we don't end up invoking a python3. Using the
absolute path seems more safe."
But, sys.executable does not necessarily point to Python. When Kallithea is
started under uWSGI, sys.executable points to the uwsgi executable. As a
result, the interpreter encoded in the git hooks on the server repositories
would be:
#!/path/to/uwsgi
And pushing to such repo would result in following client errors:
$ git push
Password for 'http://user@localhost:5050':
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 241 bytes | 241.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: unable to load configuration from hooks/pre-receive
To http://localhost:5050/gitrepo-new
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://user@localhost:5050/gitrepo-new'
Fix this problem by introducing a configuration setting 'git_hook_interpreter'
that allow administrators to specify which Python interpreter to use.
A subsequent commit will cause its value to be filled in automatically when
generating a new ini file, but an administrator can always override it.
author | Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> |
---|---|
date | Mon, 08 Apr 2019 21:32:57 +0200 |
parents | 2e7ffb755d4f |
children | f0013f65982d |
line wrap: on
line source
syntax: glob *.pyc *.swp *.sqlite *.tox *.egg-info *.egg *.mo .eggs/ tarballcache/ syntax: regexp ^rcextensions ^build ^dist/ ^docs/build/ ^docs/_build/ ^data$ ^sql_dumps/ ^\.settings$ ^\.project$ ^\.pydevproject$ ^\.coverage$ ^kallithea/front-end/node_modules$ ^kallithea/front-end/package-lock\.json$ ^kallithea/front-end/tmp$ ^kallithea/public/codemirror$ ^kallithea/public/css/select2-spinner\.gif$ ^kallithea/public/css/select2\.png$ ^kallithea/public/css/select2x2\.png$ ^kallithea/public/css/style\.css$ ^kallithea/public/css/style\.css\.map$ ^kallithea/public/js/bootstrap\.js$ ^kallithea/public/js/dataTables\.bootstrap\.js$ ^kallithea/public/js/jquery\.atwho\.min\.js$ ^kallithea/public/js/jquery\.caret\.min\.js$ ^kallithea/public/js/jquery\.dataTables\.js$ ^kallithea/public/js/jquery\.flot\.js$ ^kallithea/public/js/jquery\.flot\.selection\.js$ ^kallithea/public/js/jquery\.flot\.time\.js$ ^kallithea/public/js/jquery\.min\.js$ ^kallithea/public/js/select2\.js$ ^theme\.less$ ^kallithea\.db$ ^test\.db$ ^Kallithea\.egg-info$ ^my\.ini$ ^fabfile.py ^\.idea$ ^\.cache$ ^\.pytest_cache$ /__pycache__$