Open GoogleCodeExporter opened 9 years ago
Ok, I've managed to resolve this. I basically stopped, moved the hooks folder,
restarted Gerrit and moved the hooks folder back and it now works.
Truly odd. Unfortunately, I don't know enough (any thing) about Java to dig
into this myself. If those who can want to close the ticket I opened please
feel free but if you want to investigate and I can provide any further
information please do let me know.
Original comment by evil...@gmail.com
on 12 Apr 2012 at 1:26
Original comment by mf...@codeaurora.org
on 13 Apr 2012 at 12:39
Seen similar issues after updating to 2.3.
When using symbolic links to point to a common hook-script the first argument
to the script will be changed after updating the common hook-script.
As stated above, recreating the folder will make it operational again, but will
fail again after updating the hook.
Commenting an issue with comment-added symlinked to python-script gives:
sys.argv= ['/home/gerrit2/gerrit/hooks/comment-added', ... ]
After updating the python-script, commenting an issue gives:
sys.argv= ['/home/gerrit2/gerrit/hooks/hook', ... ]
Original comment by claus.ro...@lumigon.com
on 16 May 2012 at 7:50
Heh. Glad it wasn't just me going insane :)
Original comment by evil...@gmail.com
on 16 May 2012 at 9:51
I think the change here might be the server doing a "resolve" call on the file
path. Which is possibly chasing symbolic links back to the original. And it
does it a few times, once for "hooks" and again for the individual hook
commands. And there may be some differences between startup and later during
server execution. Ick.
I'm not sure when these changes were made, or why, but I was looking at the
hook setup code over the weekend as I was looking at ejecting it to a plugin,
and it was reading funny to me with all of the resolve calls here.
Original comment by sop@google.com
on 16 May 2012 at 3:56
You know, it would be nice if there was an option to just use one script and
have the "hook" name passed in rather then having to have multiple scripts (or,
as in my case, one script with symlinks). Both are valid solutions but I
suspect having one script that can handle hooks is generally going to be
simpler.
Original comment by evil...@gmail.com
on 16 May 2012 at 6:06
Original issue reported on code.google.com by
evil...@gmail.com
on 11 Apr 2012 at 6:33