With the new-style hooks, the refusal of push in a pre-receive hook is done by raising an exception from that hook (e.g. pagure_force_commit). The problem with that is that this shows the traceback to user. Since refusing a commit in pre-receive hook is not an application exception, but a user interaction feature, I think the tracebacks shouldn't be shown.
pagure_force_commit
I think it might make sense for pre-receive hooks to print the traceback only if HOOK_DEBUG is set to True. Would that make sense?
HOOK_DEBUG
True
Would that make sense?
It does to me!
Metadata Update from @pingou: - Issue tagged with: RFE, hook
Metadata Update from @pingou: - Issue assigned to pingou
Metadata Update from @pingou: - Issue set to the milestone: 5.2
Commit 7716e2dc fixes this issue