Justin Erenkrantz wrote:
> On Wed, Sep 10, 2014 at 1:06 PM, Stefan Sperling <s...@elego.de> wrote:
>>  I believe the functionality is useful and complete. One user I have
>>  in mind who would probably make use of this is the FreeBSD project.
>>  They patch their Subversion clients to define a log message template
>>  with the following content:
> ...
>>  For example, with:
>> 
>>    $ svn ci iota.txt epsilon/gamma.txt
>> 
>>  we might see the following default log message:
>> 
>>    --Log message template from '/'--
>>    The root log message template.
>>    This always applies since it is defined at the root of the repository.
>>    --Log message template from 'trunk/epsilon'--
>>    This is a template set on 'trunk/epsilon', which in this example
>>    was contributed by the commit target epsilon/gamma.txt.
>>    --This line, and those below, will be ignored--
>> 
>>  The "--Log message template from --" line does not appear if only
>>  a single template applies to the commit.
> 
> If the functionality follows what is described above, my only request
> is that we insert the template/property value *after* the ignore line
> - I don't think that these templates should be the default - but, they
> should augment/replace what is presented below the ignore line.

I just took a look at the FreeBSD patch [1] that Stefan mentioned. It actually 
inserts text both before and after the 'ignore' line, like this:

[[[

PR:
Submitted by:
[...]
Sponsored by:
--This line, and those below, will be ignored--
> Description of fields to fill in above:                     76 columns --|
> PR:            If a GNATS PR is affected by the change.
> Submitted by:  If someone else sent in the change.
> [...]
> Sponsored by:  If the change was sponsored by an organization.
> Empty fields above will be automatically removed.

[... the automatic listing of changes goes here ...]
]]]

A log message template with a 'will be ignored' line in it would produce almost 
exactly this result with Stefan's current scheme. That would work for a single 
template. Multiple before-and-after templates concatenated wouldn't retain the 
overall before-and-after effect, unless the concatenation code were to split 
each template at the 'ignore' line found in it, and concatenate the top parts 
and the bottom parts separately.

Also I wonder, if this feature adds the template text before the 'ignore line', 
if we should give the user a configuration option to turn it off. I'm thinking 
of the scenario where a user on such a project is currently using their own 
work-around, so that introducing this feature could annoy them if there is no 
way to turn it off because their own work-around needs to remain in place for a 
while. But maybe that's over-cautious. Anyway, I am happy for this feature to 
be enabled by default, because obviously it doesn't do anything unless the log 
message template property is present.

- Julian

[1] 
http://svnweb.freebsd.org/ports/head/devel/subversion/files/extra-patch-fbsd-template?revision=361003&view=markup

Reply via email to