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

Re: Modifying log message in pre-commit hook

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Thu, 20 Mar 2008 01:35:43 -0400

kmradke_at_rockwellcollins.com writes:
> I would like to expand an user entered BUGID in the log message in the
> pre-commit hook (I.E. add missing zeros at the beginning of the
> number). I have the new value and the old log message, I just
> do not know how to apply the changes to the transaction in the hook.
>
> svnadmin setlog does not take a transaction argument. Should it?
>
> svn propset/propedit do not take transaction arguments. (I'm ok with this
> since I would rather use the specific svnadmin setlog.)
>
> The pre-commit.tmpl file seems to indicate changing revision properties
> such as svn:log is ok, but there doesn't seem to be an easy way to do it
> without using either the perl or python API directly.
>
> It is possible to rewrite the log message in the post-commit hook, but
> doing it there would significantly complicate other hooks for non-SVN
> related reasons.
>
> Thoughts?

Yes, you could do it in the post-commit hook...

As far as I know, the cmdline programs (well, svnadmin) shipped with svn
don't give you a way to edit txn properties. But you could "pretty
easily" write a program to do it using one of the bindings sets (say,
the Python bindings). I'm actually kind of in favor of 'svnadmin
setlog' taking a -t txn argument, but that's certainly not going to
happen for the 1.5 release.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-03-20 06:36:03 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.