You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@red-bean.com> on 2007/10/10 17:25:41 UTC

Re: Please clarify hooks

[moving to dev@subversion.tigris.org]

Sounds like the text within post-commit.tmpl itself should be
clarified.  There's an explicit paragraph in the template that says
"on windows, you should name the hook script post-commit.bat or
post-commit.exe", but there's no text which says "on unix, this file
(or whatever hook script you use) must be named 'post-commit' and be
executable."

Book wording aside, this seems like a really easy change to the
default post-commit.tmpl text.  Should we file an enhancement issue?


On 10/10/07, Auke Booij <au...@gmail.com> wrote:
> Hello svn pepz,
>
> I've recently tried to set up hooks for my server, in particular a
> post-commit hook. It took me days to find out that I had to rename
> post-commit.tmpl to post-commit in the hooks/ directory. I read the
> complete text in the post-commit.tmpl file (though I have to forgive
> that I did not exactl read everything in the book), which suggested that
> THAT file was executed and not a post-commit file. Nothing in the
> post-commit.tmpl file suggested that I had to rename anything and, apart
> from only one single sentence in the svnbook, the same went for the book.
> Of course, this is not just your fault, I just had to think a little
> deeper and realize that a template is not something actually being used.
> Though, it would sure be nice to clarify the complete hooks section. An
> example set of files, for example a very basic email or log script, with
> the files post-commit and logger (the sh script) given, would be nice. I
> personally know how to use chmod, but it would be handy for a lot of
> users to explain that they should run chmod a+x myscript.
>
> Thanks,
> Auke Booij.
>
> _______________________________________________
> svnbook-dev mailing list
> svnbook-dev@red-bean.com
> http://www.red-bean.com/mailman/listinfo/svnbook-dev
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Please clarify hooks

Posted by Karl Fogel <kf...@red-bean.com>.
"Ben Collins-Sussman" <su...@red-bean.com> writes:
> [moving to dev@subversion.tigris.org]
>
> Sounds like the text within post-commit.tmpl itself should be
> clarified.  There's an explicit paragraph in the template that says
> "on windows, you should name the hook script post-commit.bat or
> post-commit.exe", but there's no text which says "on unix, this file
> (or whatever hook script you use) must be named 'post-commit' and be
> executable."
>
> Book wording aside, this seems like a really easy change to the
> default post-commit.tmpl text.  Should we file an enhancement issue?

The first paragraph (and others) of all the .tmpl files states this
pretty clearly.  In libsvn_repos/repos.c, search for "SCRIPT_NAME" --
*with* the double-quotes -- to see what I mean.

Occasionally, a user may miss the point, by reading too fast or
whatever, but we can't prevent that in general.  I don't feel a
rewrite is warranted.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org