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

Re: Hack/Work Around for Log Message Templates?

From: Brian Huddleston <brianh_at_huddleston.net>
Date: 2005-04-14 14:25:42 CEST

Yeah, I was thinking something along that line:

pseudo code:

mv temp-filename-from-subversion temp-filename-from-subversion.tmp
cat template >> temp-filename-from-subversion
cat temp-filename-from-subversion.tmp >> temp-filename-from-subversion
rm temp-filename-from-subversion.tmp
$EDITOR temp-filename-from-subversion

Does anyone see any issues with that?

-Brian
----- Original Message -----
From: "Ph. Marek" <philipp.marek@bmlv.gv.at>
To: <users@subversion.tigris.org>
Cc: "Daniel Patterson" <danpat@danpat.net>; "Brian Huddleston"
<brianh@huddleston.net>
Sent: Thursday, April 14, 2005 3:50 AM
Subject: Re: Hack/Work Around for Log Message Templates?

> On Thursday 14 April 2005 10:15, Daniel Patterson wrote:
>> Maybe write a small "svncommit" wrapper that does something like:
>>
>> ------------------------------------------
>> #!/bin/sh
>>
>> cat <<EOT > template.tmp
>> Active Issues:
>> Resolved Issues:
>> Description:
>> EOT
>> # TODO: check VISUAL, EDITOR and have a fallback....
>> $EDITOR template.tmp
>> # TODO: Check return code from editor, quit if it fails
>> svn commit -F template.tmp "$@"
>> # TODO: maybe only delete this if the commit is ok?
>> rm template.temp
>> ------------------------------------------
>>
>> Heck, you could write a wrapper for the whole of the "svn" command,
>> and intercept calls to "commit". Unfortunately, that won't pick up
>> the list of files and stick them on the bottom, unlike the default
>> incantation of $EDITOR. You might be able to do some trickery
>> with "$@" and "svn st" to work out, and then fiddle with
>> template.tmp to remove them before you call "svn commit"...
>>
>> I hope you've got a nice way of rolling this out to everyone
>> though :-)
> How about just setting SVN_EDITOR or EDITOR to a script on svn-commit :-)
>
>
> Regards,
>
> Phil
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Apr 14 14:27:33 2005

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.