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

hook-scripts & .bat files

From: Steven Higgan <steven.higgan_at_orcon.net.nz>
Date: 2004-09-09 07:09:30 CEST

Ok SOMEBODY must have came up against this one so here goes.

What I am trying to do is fire off a hook script from a .bat file, I THINK I
have got most of the syntax right (at least from what I have read) but iam
having trouble trying to figure out how to assign a variable a result from
an operation eg::

<from post-commit.bat>
SET REPOS=%1
SET REV=%2
SET LOG=`D:\INSTALLS\Subversion\bin\svnlook log -r %REV% %REPOS%`
SET AUTHOR=`D:\INSTALLS\Subversion\bin\svnlook author -r %REV% %REPOS%`
SET TRAC_ENV='D:\MEDIA\DB-TRAC\cfl.db'

D:\INSTALLS\Python\Python.exe
D:\MEDIA\DB-SVN\c.f.l\hooks\trac-post-commit-hook -p %TRAC_ENV% -r %REV% -u
%AUTHOR% -m %LOG%

SET REPOS=
SET REV=
SET LOG=
SET AUTHOR=
SET TRAC_ENV=

So how would I assign the value of LOG to be what svnlook returns?

If I can get it right I might even be able to submit a patch to the dev list
to provide examples of how us windows weenies can run hook scripts from bat
files.

---------------------------------------------------------------------------
Steven H - 3rd Year B.I.T. Otago Polytechnic, Dunedin New Zealand

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Sep 9 07:55:13 2004

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.