Update svnlite(1) commit template. This makes it possible to set the
"freebsd-sponsored-by" and "freebsd-mfc-after" in ~/.subversion/config, in the "[miscellany]" section - just like you already can with devel/subversion port/package. MFC after: 1 month Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
6e572e084b
commit
786e3c1bac
@ -333,7 +333,6 @@ truncate_buffer_at_prefix(apr_size_t *new_len,
|
||||
|
||||
static const char *prefixes[] = {
|
||||
"PR:",
|
||||
"Differential Revision:",
|
||||
"Submitted by:",
|
||||
"Reviewed by:",
|
||||
"Approved by:",
|
||||
@ -342,7 +341,8 @@ static const char *prefixes[] = {
|
||||
"MFH:",
|
||||
"Relnotes:",
|
||||
"Security:",
|
||||
"Sponsored by:"
|
||||
"Sponsored by:",
|
||||
"Differential Revision:",
|
||||
};
|
||||
|
||||
void
|
||||
@ -401,30 +401,42 @@ svn_cl__get_log_message(const char **log_msg,
|
||||
svn_stringbuf_t *default_msg = NULL;
|
||||
struct log_msg_baton *lmb = baton;
|
||||
svn_stringbuf_t *message = NULL;
|
||||
svn_config_t *cfg;
|
||||
const char *mfc_after, *sponsored_by;
|
||||
|
||||
cfg = lmb->config ? svn_hash_gets(lmb->config, SVN_CONFIG_CATEGORY_CONFIG) : NULL;
|
||||
|
||||
/* Set default message. */
|
||||
default_msg = svn_stringbuf_create(APR_EOL_STR, pool);
|
||||
svn_stringbuf_appendcstr(default_msg, APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "PR:\t\t" APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "Differential Revision:\t" APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "Submitted by:\t" APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "Reviewed by:\t" APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "Approved by:\t" APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "Obtained from:\t" APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "MFC after:\t" APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "MFC after:\t");
|
||||
svn_config_get(cfg, &mfc_after, SVN_CONFIG_SECTION_MISCELLANY, "freebsd-mfc-after", NULL);
|
||||
if (mfc_after != NULL)
|
||||
svn_stringbuf_appendcstr(default_msg, mfc_after);
|
||||
svn_stringbuf_appendcstr(default_msg, APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "MFH:\t\t" APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "Relnotes:\t" APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "Security:\t" APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "Sponsored by:\t"
|
||||
svn_stringbuf_appendcstr(default_msg, "Sponsored by:\t");
|
||||
svn_config_get(cfg, &sponsored_by, SVN_CONFIG_SECTION_MISCELLANY, "freebsd-sponsored-by",
|
||||
#ifdef HAS_ORGANIZATION_NAME
|
||||
ORGANIZATION_NAME
|
||||
ORGANIZATION_NAME);
|
||||
#else
|
||||
NULL);
|
||||
#endif
|
||||
APR_EOL_STR);
|
||||
if (sponsored_by != NULL)
|
||||
svn_stringbuf_appendcstr(default_msg, sponsored_by);
|
||||
svn_stringbuf_appendcstr(default_msg, APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "Differential Revision:\t" APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, EDITOR_EOF_PREFIX);
|
||||
svn_stringbuf_appendcstr(default_msg, APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "> Description of fields to fill in above: 76 columns --|" APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "> PR: If a Bugzilla PR is affected by the change." APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "> Differential Revision: https://reviews.freebsd.org/D### (*full* phabric URL needed)." APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "> PR: If a GNATS PR is affected by the change." APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "> Submitted by: If someone else sent in the change." APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "> Reviewed by: If someone else reviewed your modification." APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "> Approved by: If you needed approval for this commit." APR_EOL_STR);
|
||||
@ -434,6 +446,7 @@ svn_cl__get_log_message(const char **log_msg,
|
||||
svn_stringbuf_appendcstr(default_msg, "> Relnotes: Set to 'yes' for mention in release notes." APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "> Security: Vulnerability reference (one per line) or description." APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "> Sponsored by: If the change was sponsored by an organization." APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "> Differential Revision: https://reviews.freebsd.org/D### (*full* phabric URL needed)." APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, "> Empty fields above will be automatically removed." APR_EOL_STR);
|
||||
svn_stringbuf_appendcstr(default_msg, APR_EOL_STR);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user