[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-18 02:04:47 CEST

For those of you who are curious here is the script I came up with (windows
version):

@echo off
set FILE=%1

echo Active Issues: > %FILE%.tmp
echo Resolved Issues: >> %FILE%.tmp
echo Description (what changed and why): >> %FILE%.tmp

type %FILE% >> %FILE%.tmp

move %FILE%.tmp %FILE%
%SVN_REAL_EDITOR% %FILE%

So you set a couple of environmental variables:

SVN_EDITOR to the path to the name of the batch file.

SVN_REAL_EDITOR to the name of whatever your real EDITOR should be.

*boom* You've just converted a show stopper (was for us anyway) into a mere
support and CM headache. :-)

*wonders what he would have to bribe Karl with to get him to put 1973 on the
roadmap*

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

> 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
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Apr 18 02:06:52 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.