Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Aug 2015 15:20:50 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r287034 - head/contrib/subversion/subversion/svn
Message-ID:  <201508231520.t7NFKoV6066870@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Sun Aug 23 15:20:49 2015
New Revision: 287034
URL: https://svnweb.freebsd.org/changeset/base/287034

Log:
  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

Modified:
  head/contrib/subversion/subversion/svn/util.c

Modified: head/contrib/subversion/subversion/svn/util.c
==============================================================================
--- head/contrib/subversion/subversion/svn/util.c	Sun Aug 23 14:53:54 2015	(r287033)
+++ head/contrib/subversion/subversion/svn/util.c	Sun Aug 23 15:20:49 2015	(r287034)
@@ -333,7 +333,6 @@ truncate_buffer_at_prefix(apr_size_t *ne
 
 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
   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
   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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508231520.t7NFKoV6066870>