Login | Register
My pages Projects Community openCollabNet

Discussions > users [DISABLED] > Re: Commit Hook Error

subversion
Discussion topic

There will be a brief maintenance window every Friday at 17:00 Pacific.
For further details, see CollabNet's maintenance and upgrade policy.

Back to topic list

Re: Commit Hook Error

Author Andrey Repin <anrdaemon at freemail dot ru>
Full name Andrey Repin <anrdaemon at freemail dot ru>
Date 2009-09-05 04:25:01 PDT
Message 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 dot ru) 05.09.2009, <15:20>

Sorry for my terrible english...

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

Messages

Show all messages in topic

Commit Hook Error Jake Stone <jake dot the dot stone at gmail dot com> Jake Stone <jake dot the dot stone at gmail dot com> 2009-09-05 03:01:19 PDT
     Re: Commit Hook Error Andrey Repin <anrdaemon at freemail dot ru> Andrey Repin <anrdaemon at freemail dot ru> 2009-09-05 04:25:01 PDT
Messages per page: