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

Re: Svn log inside a post-commit hook

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-11-09 20:51:29 CET

On Nov 9, 2007, at 12:56, Harvey, Edward wrote:

>> Edward, what you could do is to have a line like this in the
>> post-commit hook:
>> /usr/local/bin/svn log -r $REV "file://$REPOS" > /tmp/mylog
> Actually, this is the reason for the post. If you look back at the
> original post, you'll see "But when I try to write 'svn log' into a
> post-commit hook, it appears it can't perform that operation."
> Inside a post-commit hook, "svn log" just exits with no output,
> presumably because svn server is still in the middle of an atomic
> operation. So "svn" can't do anything inside the post-commit hook,
> but
> "svnlook" still works.

Perhaps an error is occurring. Have you tried redirecting the error
output, like this?

/usr/local/bin/svn log -r $REV "file://$REPOS" >/tmp/mylog 2>/tmp/

Then examine the contents of /tmp/myerrors

> That being said, this is what I settled on as an alternative:
> I see that svnlook can do a whole bunch of stuff.
> svnlook author
> svnlook date
> svnlook log
> And so on. If I run svnlook several times, storing the output of
> each,
> I can gather all the info that "svn log --verbose" normally would
> display. And just assemble it myself.

I'd recommend that instead.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Nov 9 20:52:05 2007

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.