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

Re: Locking to prevent changes to a branch?

From: David Weintraub <qazwart_at_gmail.com>
Date: 2005-06-23 18:50:00 CEST

On 6/23/05, O'Hearn, Mike <Mike.OHearn@jenzabar.net> wrote:
> Ok got it. One last question. I am using a .bat file to call the perl
> script. It is working and the commit is failing, but how can I ouput
> something telling the user why the commit failed?

If the pre-commit script returns a non-zero exit status, the
Subversion server will inform the client that the commit failed, give
a standard reason for failure, then return any text that went to
STDERR. It is up to the client program to print out this text.

The standard Subversion command line client will print out this
information. So will TortoiseSVN, but only about the first 80 lines.

In my Perl script, I put in the following line at the beginning of the script:

select(STDERR);

That way, the Perl "print" command will automatically default to
printing everything on STDERR.

It you're testing, and you put in debug statements in your program,
you will need to force the pre-commit script to exit with a non-zero
status to see these debug statements.

--
David Weintraub
qazwart@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 23 19:05:00 2005

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