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

Re: Commit Hook Error

From: Andrey Repin <anrdaemon_at_freemail.ru>
Date: Sat, 5 Sep 2009 15:23:57 +0400

Greetings, Jake Stone!

> Hello all! I am working on some simple commit hooks for my repository,
> and I ran into a slight issue.

> I am using some easy batch commands to grab information from the svnlook
> tool so I can send emails about the commit, but "svnlook author" is
> being stubborn. Running from the command line, svnlook author gives the
> correct committer's username, yet this code:

> FOR /F "tokens=*" %%i in ('%SVNDIR%\svnlook author -r "%REV%"
> "%REPOS%"') do SET TOOLOUTPUT=%%i
> SET AUTHOR=%TOOLOUTPUT%

> FOR /F "tokens=*" %%i in ('%SVNDIR%\svnlook date -r "%REV%" "%REPOS%"')
> do SET TOOLOUTPUT=%%i
> SET DATE=%TOOLOUTPUT%

> SET SUBJECT="%REPOSNAME% updated by %AUTHOR% on %DATE%"

> Will produce a subject of "Repository updated by on Sat 09/05/2009"
> This is obviously rather frustrating, since the exact same command works
> on date but not author. I could just tell the commands to append their
> information to a file, but then it'd be harder to make email subject
> lines, etc like the one above.

> Any ideas?

Yes. RTFM "SET /?". Your code is wrong. Also RTFM "FOR /?" as your FOR line is
wrong too.
I know this can be done in cmd, but the way to have it function properly just
too frustrating... you better choose different tools.

--
WBR,
 Andrey Repin (anrdaemon_at_freemail.ru) 05.09.2009, <15:20>
Sorry for my terrible english...
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2391271
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-05 13:25:57 CEST

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.