From owner-svn-src-all@freebsd.org Sun Aug 23 15:20:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C19829C0923; Sun, 23 Aug 2015 15:20:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A56F61A18; Sun, 23 Aug 2015 15:20:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7NFKonn066871; Sun, 23 Aug 2015 15:20:50 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7NFKoV6066870; Sun, 23 Aug 2015 15:20:50 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201508231520.t7NFKoV6066870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2015 15:20:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287034 - head/contrib/subversion/subversion/svn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Aug 2015 15:20:50 -0000 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);