[PATCH 2 of 6 v3] ini: introduce setting 'git_hook_interpreter'
Thomas De Schampheleire
patrickdepinguin at gmail.com
Wed Apr 10 07:41:22 UTC 2019
El mié., 10 abr. 2019 a las 1:09, Mads Kiilerich
(<mads at kiilerich.com>) escribió:
>
> On 4/8/19 10:14 PM, Thomas De Schampheleire wrote:
> > # HG changeset patch
> > # User Thomas De Schampheleire <thomas.de_schampheleire at nokia.com>
> > # Date 1554751977 -7200
> > # Mon Apr 08 21:32:57 2019 +0200
> > # Branch stable
> > # Node ID fa06015a39a0d757790a334207b4066beefee64f
> > # Parent a4ad7b50bab39a528ac147ae3f50791434313127
> > ini: introduce setting 'git_hook_interpreter'
> >
> > As preparation to fix issues with Git hooks that cannot be executed in all
> > cases due to an incorrect interpreter (issue #333), introduce a
> > configuration setting 'git_hook_interpreter'.
> >
> > 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.
> >
> > diff --git a/development.ini b/development.ini
>
> > diff --git a/kallithea/lib/paster_commands/template.ini.mako b/kallithea/lib/paster_commands/template.ini.mako
> > --- a/kallithea/lib/paster_commands/template.ini.mako
> > +++ b/kallithea/lib/paster_commands/template.ini.mako
> > @@ -211,6 +211,17 @@ use_htsts = false
> > <%text>## number of commits stats will parse on each iteration</%text>
> > commit_parse_limit = 25
> >
> > +<%text>## Path to Python executable to be used for git hooks.</%text>
> > +<%text>## This value will be written inside the git hook scripts as the text</%text>
> > +<%text>## after '#!' (shebang). When empty or not defined, the value of</%text>
> > +<%text>## 'sys.executable' at the time of installation of the git hooks is</%text>
> > +<%text>## used, which is correct in many cases but not when using uwsgi.</%text>
>
>
> I think this should be "for example not when using uwsgi"
>
>
> Also: Should this perhaps already give an example for Windows (and/or
> mention why not and what to do)?
Problem is that I don't know the actual situation on Windows.
It should be tested first in various cases (e.g. gearbox, uwsgi, apache).
Until that is done, I didn't feel comfortable in advising things that
may be wrong.
>
>
>
> > +<%text>## FIXME this setting is not yet used.</%text>
> > +# git_hook_interpreter = /srv/kallithea/venv/bin/python2
>
>
> Hmm. That is *the* python interpreter to use. Do we really want to
> constrain the name to only be for hooks, and then introduce a config use
> using another name when/if we need it for other purposes?
>
>
>
> Perhaps. Or perhaps name it `python_interpreter` instead. I just would
> like it to be deliberate decision.
I went back and forth between these names. I guess I wanted to make
clear that this is (currently) only controlling git hooks, nothing
else. Perhaps that can be mentioned in a comment instead.
>
>
>
> > +%if git_hook_interpreter:
> > +git_hook_interpreter = ${git_hook_interpreter}
> > +%endif
> > +
> > <%text>## path to git executable</%text>
> > git_path = git
> >
>
>
More information about the kallithea-general
mailing list