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

Re: Can the commit message be changed by a hook?

From: Alan Barrett <apb_at_cequrux.com>
Date: 2006-11-02 22:01:56 CET

On Thu, 02 Nov 2006, Ryan Schmidt wrote:
> On Nov 2, 2006, at 07:53, Erik Forsberg wrote:
> >Can I change the commit message written into the repository using a
> >hook?
>
> You should be able to do that in the post-commit hook, yes.

Right. See tools/hook-scripts/log-police.py in the svn distribution
for an example.

I use

    ${SVNLOOK} propget --revprop -r "${REV}" "${REPOS}" svn:log

to get the original log message, massage it as desired, and then

    ${SVNADMIN} setlog --bypass-hooks -r "${REV}" "${REPOS}" "${TMPFILE}"

to store the new message.

> Note that you also need to install a pre-revprop-change hook to allow
> revision properties to be changed, e.g.:

That part's not necessary if you use svnadmin setlog --bypass-hooks.

--apb (Alan Barrett)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Nov 2 22:02:52 2006

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.