Discussions  >  CollabNet Subversion Admins  >  Re: Pre-Commit Hook on Windows

Back to topic list

Re: Pre-Commit Hook on Windows

Author markphip (OCN Member)
Full name Mark Phippard
Date 2011-09-22 10:16:43 PDT
Message On 9/22/11 11:39 AM, "Matt Hartwell" <XXXX@XXXX> wrote:

> I've been working with SVN for a little while now and am pushing for further
> use at the company I work for. I was given a requirement (that I argued
> against for some period) for a couple of repositories to require locking. I
> think the best approach for this is to ensure the svn:needs-lock is set on
> file check-in so I've written a pre-commit hook. Problem is I haven't done
> much work with hooks or in Windows environments and the script is working as
> expected. It won't commit files that don't have the property set, but it's
> also giving the same error if the property is set. I'll attache the
> pre-commit.bat file I'm using, but here's the error I'm getting:
>
> Command: Commit
> Adding: D:\temp\r12\branc​hes\Modules\AP\CU​944 - AP
> Imaging\UnixScripts\test3.txt
> Sending content: D:\temp\r12\branc​hes\Modules\AP\CU​944 - AP
> Imaging\UnixScripts\test3.txt
> Error: Commit failed (details follow):
> Error: Commit blocked by pre-commit hook (exit code 1) with output:
> Error: Commit Denied
> Error: Files must have property svn:needs-lock set to be committed to
> repository
> Error: branches/Modules/AP/CU944 - AP Imaging/UnixScripts/test3.txt
> Finished!:
>
> Any thoughts??

It looks like the hook is running correctly as you are clearly getting the
message from the hook. So any problem would be in the logic within the
script itself and you should look there.

Mark

« Previous message in topic | 2 of 7 | Next message in topic »

Messages

Show all messages in topic

Pre-Commit Hook on Windows mhartwel (OCN Member) Matt Hartwell 2011-09-22 08:39:19 PDT
     Re: Pre-Commit Hook on Windows markphip (OCN Member) Mark Phippard 2011-09-22 10:16:43 PDT
     RE: Pre-Commit Hook on Windows mhartwel (OCN Member) Matt Hartwell 2011-09-22 18:57:19 PDT
         Re: Pre-Commit Hook on Windows markphip (OCN Member) Mark Phippard 2011-09-22 19:17:11 PDT
         Re: Pre-Commit Hook on Windows cmpilato (OCN Member) C. Michael Pilato 2011-09-23 06:45:26 PDT
             Re: Pre-Commit Hook on Windows markphip (OCN Member) Mark Phippard 2011-09-23 06:54:14 PDT
                 RE: Re: Pre-Commit Hook on Windows mhartwel (OCN Member) Matt Hartwell 2011-09-23 13:43:50 PDT
Messages per page: