[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: pre-commit hooks does not show any output

From: Daevid Vincent <daevid_at_daevid.com>
Date: Thu, 15 May 2008 12:38:50 -0700

Yeah, I struggled last night for several hours trying to find what would
seem to be a pretty standard pre-commit script. I would have expected the
examples would be more verbose and have some "uncomment this line, make sure
this path is correct, and you're golden" type of stuff in there. Mine had a
reference to "commit-access-control.pl "$REPOS" "$TXN"
commit-access-control.cfg || exit 1" . I don't even have a file named
"commit-access-control.pl" on my entire file system !?!


Anyways Hari, Hopefully this will save you some gray hair pulling.


The first trick that nobody mentions is that you have to redirect all output
to stderr (?!) so you have to do this kind of redirection annoyance:


echo "A commit log message is required." 1>&2


The next thing that took me forever to figure out (and find examples on the
net) is that you have to do this completely convoluted "SVNLOOK" thing to
get the filenames you are trying to check. GRRR.


Another huge issue I found is that almost all the examples are in Python! I
would have liked to find a PHP one ideally, or again, at least have the
default .tmpl ones (in Bash) be more explicit.


Long story short, here is what I came up with so far in the five plus hours
I spent last night on it

(I will keep it updated as I learn more and find more interesting/useful
parts to add to the script):





From: Hari Kodungallur [mailto:hkodungallur_at_gmail.com]
Sent: Thursday, May 15, 2008 7:08 AM
To: prakash tiwary
Cc: users_at_subversion.tigris.org
Subject: Re: pre-commit hooks does not show any output



On Thu, May 15, 2008 at 6:17 AM, prakash tiwary <prakash.tiwary_at_gmail.com>

  My pre-commit hooks does not show any output . It shows following two

Transmitting file data .svn: Commit failed (details follow):
svn: 'pre-commit' hook failed with error output:

What could be the reason?


Received on 2008-05-15 21:39:55 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.