[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

From: Ryan Schmidt <subversion-2008a_at_ryandesign.com>
Date: Fri, 21 Mar 2008 03:13:36 -0500

On Mar 20, 2008, at 11:07, DePriest Richard 403 wrote:

> Ryan Schmidt wrote:
>
>> On Mar 19, 2008, at 16:58, DePriest Richard 403 wrote:
>>
>>> I have another question about pre-commit hooks. I have been
>>> trying to
>>> get a pre-commit hook to process and not let anyone commit a change
>>> without having a lock on the modified file. When I test my hook the
>>> commit fails everytime. If I remove the pre-commit hook the commit
>>> will work fine. I just figured I have something not coded
>>> correctly in
>>> my hook or the perl scipt it calls.
>>> After numerous tests, I have discovered a couple of things. It is
>>> looking like th pre-commit hook is not executing correctly. The
>>> reason
>>> I say that is because I coded a pre-commit hook with only an exit 0
>>> line. This hook causes the commit to fail. I am using the tortoise
>>> GUI. Anybody out there got any ideas.
>>
>> Can't suggest anything unless you show us the code of the hook script
>> itself...
>
>
> Here is the pre-commit hook I am trying to use (just for testing).
> This
> is the text file. On the server the hook is named pre-commit and the
> permissions are set to 777 (rwxrwxrwx)
>
> <pre-commit.txt>

Your file just contains the single line "exit 0". You will need at
least one more line before that indicating what program is supposed
to execute it, e.g. "#!/bin/sh"

Don't forget to Reply All so everyone gets your replies, not just me.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-03-21 09:14:21 CET

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.