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

Re: [VOTE] merge the log-message-templates branch to trunk

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Mon, 15 Sep 2014 15:56:07 +0100

Johan Corveleyn wrote:
> On Mon, Sep 15, 2014 at 12:58 PM, Stefan Sperling <stsp_at_elego.de> wrote:
>...
>>> Are there other examples "out there" like FreeBSD but different?
>>
>> I don't know. I was hoping to get something finished that satisfies the
>> FreeBSD use case, and nothing else. They obviously have a need for this,
>> else they wouldn't have written a custom patch. AFAIK nobody else has
>> loudly complained about the lack of this feature or made concrete
>> proposals for what it should look like.
>
> I'm sure it has been discussed often before. I did a quick search of the
> users@ archives, and found a relevant thread from 2006:
>
> http://svn.haxx.se/users/archive-2006-08/0612.shtml
>
> The OP mentions it as a hard requirement for them, and compares it with
> some CVS feature. It also refers vaguely to prior discussions and even
> design proposals (but no concrete links unfortunately). It might be worth
> digging some more in the archives.

Here's a description of CVS log message capabilities: <http://cvsbook.red-bean.com/cvsbook.html#The%20verifymsg%20And%20rcsinfo%20Files>.

In essence, you can define:

††† * a static template text
††††† (per repository path, with only the closest path winning);

††† * a log message editor command
††††† (which can do as much processing as you like, similar to how the SVN_EDITOR configuration can do so, within the limitations of running on the client side);

††† * a log message checker command
††††† (which could be done in Subversion in a pre-commit hook).

> Also, lots of hits can be found if you google for "svn log template". For
> instance on stackoverflow:
>
> http://stackoverflow.com/questions/983026/how-do-i-create-a-svn-commit-message-template-and-hook-to-verify

The script in the answer by JoeRandomUser highlights a problem with putting template text above the 'ignored' line: aborting the commit by exiting the editor then doesn't work as expected. We could, I suppose, work around that by checking whether the template text has been altered.

> And apparently there is an analogous TortoiseSVN feature:
>
> http://weblogs.asp.net/akjoshi/tsvn_3A00_logtemplate-_3A00_-Enforcing-strict-format-to-svn-check_2D00_in-mails.-
>
> It might be interesting to see how the TSVN feature works (and analyze
> whether our proposed API might be able to replace their implementation
> eventually) ...

It's a static template text stored in a property, so I guess quite similar to stsp's current implementation.

- Julian
Received on 2014-09-15 16:56:41 CEST

This is an archived mail posted to the Subversion Dev mailing list.