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

RE: Re: Change the log message for a transaction BEFORE it's be committed?

From: Reedick, Andrew <jr9445_at_ATT.COM>
Date: Tue, 3 Feb 2009 16:26:28 -0600

> -----Original Message-----
> From: blackhole_at_collab.net [mailto:blackhole_at_collab.net]
> Sent: Tuesday, February 03, 2009 2:40 PM
> To: users_at_subversion.tigris.org
> Subject: RE: Re: Change the log message for a transaction BEFORE it's
> be committed?
>
> > On Tue, Feb 3, 2009 at 13:20, <ric_rps_at_hotmail.com> wrote:
> > > I need to change the log message for a transaction in a pre-commit
> script...it is possible?
> >
> > Why do you think you need to change it?
>
> cause I have a client application that will set some values and i need
> record this values in the log message or some property
>

In theory, if you can link the pre-commit transaction to the post commit
revision number, you can set the values in the post-commit hook. Ex:
if the check-in is transaction 1234, which becomes revision 199, you
could add your custom values to the svn:log attribute for revision 199
in the post-commit hook.

However, I don't think that's possible out of the box. One idea, which
may or may not be sane or practical, is to use 'svnlook changed
--transaction' and 'svnlook cat --transaction' in the pre-commit hook to
generate an md5 hash. Create a temp file using the md5 hash as the name
and put the custom values in the file. During the post-commit hook, use
'svnlook changed --revision' and 'svnlook cat --revision' to generate
the md5. Look to see if a file with that md5 hash for a name already
exists. If so, then use 'svnadmin setlog' to add the custom values to
the log message. However, keyword expansion might mangle the
post-commit md5 value.

Again, it's just an idea, and I make no claims to practicality.

*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA621

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1098974

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-02-03 23:31:33 CET

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.