Re: [VOTE] merge the log-message-templates branch to trunk
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Mon, 15 Sep 2014 10:25:42 +0100
Stefan Sperling wrote:
TEMPLATES, HINTS and REVPROPS
The FreeBSD patch provides two things to the user. It provides a template to be filled in, and it also provides a help message describing how to do so. I think we need to recognize that these are different. (And we should not merely separate them with a command-line-client-specific 'ignore...' message.) So, maybe'svn:log-template' for the template part and 'svn:log-hint' for the help message part (which 'svn' would show below the 'ignore' line and GUIs would show elsewhere).
The top part of the FreeBSD log message, while being presented as a template, is effectively a group of property fields. Ideally for this sort of usage we would also provide an easier way of setting a group of revision properties, and not only support putting plain text in svn:log.
Instead of a 'get_log_message(list_of_commit_items)' we should have 'get_rev_props_for_commit(list_of_commit_items)', and instead of a template we should have:
- a list of required and optional rev-props (usually including svn:log);
> And perhaps we could introduce a template syntax to specify
Not entirely.
UPGRADE PATHS
Once we release this, the 'svn:log-template' property will exist in people's repositories for all time, and for all clients (although only clients that query it will see it).
We will want to upgrade the functionality. One of the obvious upgrades is we will want to insert run-time substitutions in the text. I recommend we anticipate this now by defining a minimal syntax for substitutions. For example, we may want to use forms like '$foo' and '${foo bar}'. To anticipate this, we could declare now that '$' is a special character and must be doubled ('$$') if it is to appear literally, and that any '$' not followed by '$' has behaviour that may differ between different (present and future) clients.
Another possible upgrade path is to introduce in the future a new property name ('svn:log-template2'? 'svn:log-template-with-substitution'?) for the new functionality, and keep supporting the old one for back-compat. If we anticipate taking this path in the future, then I would suggest the current version be called 'svn:static-log-template'. This upgrade path will always be open to us but is not always the best option.
EXAMPLES
Before we release this, I would like to see a couple more real-world examples of this feature in action, to see how well it meets real needs. Can we set an svn:log-template property (or
For example, we might set svn:log-template on '^/subversion/branches' to:
]]]
If not, if we don't want to do this, then: why not? Is the feature not suitable for our usage, or why do we not want to use it?
Are there other examples "out there" like FreeBSD but different?
- Julian
|
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.