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

pre-commit.bat with return message

From: Andreas Guther <Andreas.Guther_at_markettools.com>
Date: 2006-04-05 05:46:09 CEST

Hi:

I am working on getting a pre-commit.bat (Windows; not other choice) to return a message to the user in case of error.

I just want to check that the user enters a comment and in case one is missing I want to give an error message back.

Unfortunately I am not able to find a way to accomplish that. I am not sure if this is a dos command problem or a subversion communicating with dos problem.

My dos batch script looks as follows:

[... path settings ommited...]
SVNLOOK.exe log -t "%2" "%1" | grep.exe "[a-zA-Z0-9]" > nul || GOTO ERROR
GOTO OK
:ERROR
ECHO "Please enter comment and then retry commit!"
exit 1
:OK
exit 0

The output I get is the following:

commit -m "" C:/workspace/test-project-003/README.txt
    Sending workspace/test-project-003/README.txt
    Transmitting file data ...
    A repository hook failed
svn: Commit failed (details follow):
svn: MERGE request failed on '/repos/test_repos/test-project-003'
svn: 'pre-commit' hook failed with error output:

The "error output" is empty!

I found the following email on the issue which provides a solution for Linux/Unix. Following the example the echo should have the same result, shouldn't it?

Any idea what is missing?

Thanks in advance for any help 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Apr 5 05:47:11 2006

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.