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

Re: Commiter's IP address in commit comment?

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-12-21 14:06:56 CET

On Dec 21, 2007, at 06:27, Alan Barrett wrote:

> On Thu, 20 Dec 2007, John Peacock wrote:
>
>> There is no way currently to inject additional meta-data during a
>> commit;
>> in fact this is by design. If you were to alter a transaction
>> during a
>> commit, the data on the server would not be the same as the data
>> on the
>> client, with predictable problems.
>
> Well, you can't change file contents or properties, but a post-commit
> hook can change the log message. Get the old message with:
>
> svnlook propget --revprop -r ${REV} ${REPOSITORY} svn:log
>
> and set the new message with:
>
> svnadmin setlog --bypass-hooks -r ${REV} ${REPOSITORY} ${TEMPFILE}

You could also set any arbitrary new property of the revision if you
like, e.g. this post-commit hook sets a new property on the revision
called "ipaddress" (but you'll have to figure out how to get the IP
address):

#!/bin/sh

REPOS="$1"
REV="$2"

IPADDRESS="you'll have to figure it out"

svn propset ipaddress --revprop -r "${REV}" "${IPADDRESS}" "file://$
{REPOS}"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Dec 21 14:15:38 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.