----- Original Message -----
> autoqa-git-hook.wsgi:
> >def index(environ, start_response):
> > """This function will be mounted on "/"
> > """
> > start_response('200 OK', [('Content-Type',
'text/html')])
> > return ['''Thank you, come again.''']
>
> Could you please provide a usage description instead? I have had
> a hard time finding out correct arguments.
This isn't intended for humans to run, so I didn't spend a lot of time
on human friendly responses. I also didn't want to worry about html
presentation here. Would it be okay to say something generic like ...
"Consult autoqa documentation for assistance."
and we start documenting our hooks on the wiki?
I am not sure if we understand each other. I run the wsgi application
and I had absolutely no idea how to make it work. If it just prints
out a usage message, then it's clear. I.e. when I access localhost:8080,
it could print out (just an example):
'''
Invalid URL. Access this app like:
http://server/git-hook/REPONAME/BRANCHNAME
for running tests for git repo REPONAME and git branch BRANCHNAME.
Example:
http://server/git-hook/anaconda.git/master
Optional arguments (used in the query string):
dryrun: do not execute, just print out commands
'''
Then I immediately know how to use this app. I have used similar
approach for my 'aqc' tool:
http://git.fedorahosted.org/git/?p=autoqa.git;a=blob;f=utils/aqc-ks/aqc-k...
(line 15)
> >## Next, enable the post-receive hook
> >$ cp /usr/share/autoqa/git-post-receive/post-receive.sample
> >hooks/post-receive
> ./.git/hooks/post-receive ? ^^^^^^^^^^^^^^^^^^
>
This one maybe went unnoticed, is the destination dir correct (missing .git/ prefix?)
Thank you for the review comments! I've made several corrections to
the
'clumens' branch based on your feedback. Let me know what you think.
http://git.fedorahosted.org/git/?p=autoqa.git;a=commit;h=f0ca4818f73ab933...
Quoting from the patch:
+ # XXX: should we escape the URLs?
I am almost sure
we don't have to, since we don't run
it through bash (which is the source of escaping requirements),
but run it directly as a system command.
Escaping would be needed, if you run Popen with shell=True, AFAIK.