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

SV: SV: Request Tag-PreCommit-Script/hook for use at the OS: Windows Server 2003

From: René Vestergaard <rve_at_techno-matic.dk>
Date: 2005-10-12 12:12:14 CEST

Now the "/tags/"-repository-paths can't be commit'ed (fine),
but they can not be created either (bad)
(created = create a branch/tag to "/tags/v1.0").

Is there any way to allow Branch/Tag-command to execute, but permit
commit's?

The pre-commit.cmd script/hook file on the server:
--------------------------------------------------
rem Documentation:
rem PercentChar1 = D:/Data/Subversion
rem PercentChar2 = 90-1
rem svnlook dirs-changed -t VERSION PATH = extract the repository-path
rem find "/tags/" = if "/tags/" is in repository-path then set
errorlevel=1

c:\subversion\svnlook dirs-changed -t %2 %1 | find "/tags/"

rem If Sucessed then execute: exit 0
if errorlevel 1 exit 0

rem If Failed then execute: exit 1
exit 1
--------------------------------------------------

-----Oprindelig meddelelse-----
Fra: Greg Thomas [mailto:thomasgd@omc.bt.co.uk]
Sendt: 12. oktober 2005 10:21
Til: René Vestergaard
Cc: users@subversion.tigris.org
Emne: Re: SV: Request Tag-PreCommit-Script/hook for use at the OS:
Windows Server 2003

On Wed, 12 Oct 2005 10:03:52 +0200, René Vestergaard
<rve@techno-matic.dk> wrote:

>Now I get this error:
>---------------------
>"Commit failed,
> pre-commit hook failed,
> svnlook: missing argument: t"
>
>I wrote the following in the pre-commit.cmd file on the server:
>---------------------------------------------------------------
>c:\subversion\svnlook dirs-changed -t %TRANS% %REPOS% | find "/tags/"
>if errorlevel 1 exit 1
>exit 0

I've no idea if the idea will work, but the syntax you need is

c:\subversion\svnlook dirs-changed -t %1 %2 | find "/tags/"

HTH,

Greg

--
This post represents the views of the author and does
not necessarily accurately represent the views of BT.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Oct 12 12:14:20 2005

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.