[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: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 15 Sep 2014 10:34:31 +0200

On Mon, Sep 15, 2014 at 08:58:37AM +0100, Julian Foad wrote:
> Justin Erenkrantz wrote:
> > On Wed, Sep 10, 2014 at 1:06 PM, Stefan Sperling <stsp_at_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
>

I think putting the template below the ignore line isn't very
intuitive. What's the point of having a template if you're
not always going to make use of it? I can see that it's easy
to just move the ignore line to make use of the template but
I think whatever we do here we'll leave some folks happy and
others unhappy.

So perhaps a static template text isn't going to get us very far.
An it seems we'll need some extra flexibility anyway to fully
emulate the FreeBSD patch.

Should we perhaps allow the template to indicate where the
ignore line and changed-paths list should go?

And perhaps we could introduce a template syntax to specify
key-value pairs (e.g. "%KEYWORD:%") which are removed automatically
if the value is left empty?

So in the above use case the svn:log-template property would
look something like:

[[[

%PR:%
%Submitted by:%
[...]
%Sponsored by:%
%ignore-line%
> 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.

%changed-paths%
]]]

And the resulting template presented to the user would be:

[[[

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

Am I going overboard with this? :)
Received on 2014-09-15 10:35:11 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.