You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Sean Laurent <se...@neuronfarm.com> on 2005/01/10 22:07:21 UTC

Alter Log Message in Hook

Okay,
So I just realized I have a dumb question... 

Currently I have a post-commit hook which, among other things, checks the log 
message for a phrase like "BUG#xxxx". If the hook finds the text, it adds a 
bugnote to the related issue in our bugtracker which includes a link to the 
related revision in ViewSVN.  This works fine.  However, I just had a user 
request the opposite: If the log message includes a reference to a bug, 
include (in parentheses) a link to the bug in the database.

Example before:
blah blah fixes BUG#42.

Example after:
blah blah fixes BUG#42 (http://server/viewsvn?view=rev&rev=42).


My dumb question is whether or not this is even remotely safe to do.  On the 
one hand, it seems like changing the log message would qualify as modifying 
the transaction, which is a "very bad thing"...  On the other hand, the log 
message is unversioned and isn't stored on the client anyway.  If it is safe, 
is there an easier way of changing the log message in a hook script than 
calling 'svn propset svn:log -r XXX --rev-prop "blahblahblah"'?

Any input would be greatly appreciated.

-Sean
------------------------------
A good friend will come and bail you out of jail... but a true friend will be 
sitting next to you saying, "Damn...that was fun!"
------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Alter Log Message in Hook

Posted by Max Bowsher <ma...@ukf.net>.
Sean Laurent wrote:
> Okay,
> So I just realized I have a dumb question...
>
> Currently I have a post-commit hook which, among other things, checks the 
> log
> message for a phrase like "BUG#xxxx". If the hook finds the text, it adds 
> a
> bugnote to the related issue in our bugtracker which includes a link to 
> the
> related revision in ViewSVN.  This works fine.  However, I just had a user
> request the opposite: If the log message includes a reference to a bug,
> include (in parentheses) a link to the bug in the database.
>
> Example before:
> blah blah fixes BUG#42.
>
> Example after:
> blah blah fixes BUG#42 (http://server/viewsvn?view=rev&rev=42).
>
>
> My dumb question is whether or not this is even remotely safe to do.  On 
> the
> one hand, it seems like changing the log message would qualify as 
> modifying
> the transaction, which is a "very bad thing"...  On the other hand, the 
> log
> message is unversioned and isn't stored on the client anyway.  If it is 
> safe,
> is there an easier way of changing the log message in a hook script than
> calling 'svn propset svn:log -r XXX --rev-prop "blahblahblah"'?

Yes, it is safe, revision properties are the one thing you are allowed to 
modify.

svn propset is the easiest way to do this - I'm curious - how could it be 
easier than running one command?

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org