From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: [PATCH] [RFC] Allow amendments when generating ChangeLog Date: Thu, 21 Jun 2018 12:33:08 +0200 Message-ID: <87sh5g2zvf.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1529577114 24210 195.159.176.226 (21 Jun 2018 10:31:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 21 Jun 2018 10:31:54 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 21 12:31:50 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fVwsW-0006AT-As for ged-emacs-devel@m.gmane.org; Thu, 21 Jun 2018 12:31:48 +0200 Original-Received: from localhost ([::1]:54382 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVwud-00014q-Eo for ged-emacs-devel@m.gmane.org; Thu, 21 Jun 2018 06:33:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVwtv-00014k-7w for emacs-devel@gnu.org; Thu, 21 Jun 2018 06:33:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVwts-0005yY-4O for emacs-devel@gnu.org; Thu, 21 Jun 2018 06:33:15 -0400 Original-Received: from mail-wr0-x22e.google.com ([2a00:1450:400c:c0c::22e]:46576) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fVwtr-0005yI-RI for emacs-devel@gnu.org; Thu, 21 Jun 2018 06:33:12 -0400 Original-Received: by mail-wr0-x22e.google.com with SMTP id v13-v6so2599681wrp.13 for ; Thu, 21 Jun 2018 03:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:mail-followup-to:mail-copies-to:gmane-reply-to-list :date:message-id:mime-version; bh=HF2+CVquH4xKRJm/7GzN/x4f4wa4b+2Sd2kkrlid2bk=; b=t9NfDb2NNm7kFeVqmIdOw6q/4p/eJ452UmjvxqfaQiLQx8MxqJvz4bNuQjKb/0TU63 j+nmaX0z237hW1dsUyoW80bBifzmzoyQveNCWlJVmY6luZ/jXWcr82LoX4X9NhN3yLNE 1kSWZyuQHz/o/kl+En16BbSt9Njvp9l0TIcsNzesFuSTEYWQcThZzIF7BfJ2fgw9dNt4 ASR+VM4PxtXBoSFh+/FxwWfA2jX3Smifn9GygmqZqigjKY8j7JlIJa17ftBO/B7v4UyI tX4Oznk2IOr0RYCeHxZ2W2bQhxS90iEvEumBKapjQ1XHWMFDTuxis3zXqatxYX6+NdxD duFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:mail-followup-to:mail-copies-to :gmane-reply-to-list:date:message-id:mime-version; bh=HF2+CVquH4xKRJm/7GzN/x4f4wa4b+2Sd2kkrlid2bk=; b=P7k5qyDXQsQz/DbxIJVVkYkH4WYdvIsagKwQWqCeWKXwLMvAXjDLjrjsnbAQ4ccB49 QlLXeP6BtawRoHq/Dmgrp9AOjbVQEDOXPWAU+iII2UcUl6F9Qu145pVooo1bTkH1mxhF PEJKoy6WjBrlxQNmEcrKvzjxhcSiqasAMC55TqA8LoKYQ5Bvu6M0TJqijnQeI8U96jdk Xio1dzxirwVBYLeKPpjI653ezYVzJgJi1tGDX1Jl/YoiGkPfpt6pAQuaoW9b/Exbsqji VVT8v+gbFsZy9EQULlMb0RBaGXPT8yXYmnv9l5aAX3qjZOdFrawfncIJWrCD1X6ORK/8 aciQ== X-Gm-Message-State: APt69E3RmBY2M7nTgrkT/ayfuxN/VHD5crjEfI9iO0fL8rAcjCl7KJCT A+7V51xOsqL2tK2gks0lk7zy/S47GxI= X-Google-Smtp-Source: ADUXVKLQn1AHlP7bE5z9SsaZ3sNjvZRc4r2KDpKsV0yiDi2TQlmQTSKhElIuWOPPlnkmh3w0hyeKlQ== X-Received: by 2002:a5d:4906:: with SMTP id x6-v6mr21153203wrq.66.1529577190131; Thu, 21 Jun 2018 03:33:10 -0700 (PDT) Original-Received: from rpluim-ubuntu ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id n56-v6sm12070123wrn.72.2018.06.21.03.33.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jun 2018 03:33:09 -0700 (PDT) Mail-Followup-To: emacs-devel@gnu.org Mail-Copies-To: never Gmane-Reply-To-List: yes X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226562 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable In theory the way ChangeLogs are now generated it=CA=BCs possible to amend them after the fact, but nobody every implemented support for that. Attached a patch to allow specifying specific amendments to the ChangeLog entries for specific commits, plus a totally randomly chosen example. Regards Robert --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Allow-amendments-when-generating-ChangeLog.patch >From 6347165027e78d9ac792dc407c60c550bb83046d Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Thu, 21 Jun 2018 12:06:49 +0200 Subject: [PATCH] Allow amendments when generating ChangeLog To: emacs-devel@gnu.org * Makefile.in (AMEND_FILE): New variable to specify file used for ChangeLog amendments. (ChangeLog): Pass AMEND_FILE to ChangeLog generation script. * build-aux/amend-emacs-26.txt: New file. Contains commands to perform ChangeLog amendments. * build-aux/gitlog-to-emacslog: Add --amend argument parsing. Pass the result to gitlog-to-changelog. --- Makefile.in | 4 +++- build-aux/amend-emacs-26.txt | 3 +++ build-aux/gitlog-to-emacslog | 11 +++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 build-aux/amend-emacs-26.txt diff --git a/Makefile.in b/Makefile.in index 238df40ded..fd279477ae 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1113,9 +1113,11 @@ CHANGELOG_N = # Convert git commit log to ChangeLog file. make-dist uses this. # I guess this is PHONY so it always updates? +AMEND_FILE = build-aux/amend-emacs-`echo ${version} | sed 's/\..*//'`.txt ChangeLog: $(AM_V_GEN)cd $(srcdir) && \ - ./$(emacslog) -o $(CHANGELOG) -n $(CHANGELOG_HISTORY_INDEX_MAX) + ./$(emacslog) -o $(CHANGELOG) -n $(CHANGELOG_HISTORY_INDEX_MAX) \ + --amend $(AMEND_FILE) # Check that we are in a good state for changing history. PREFERRED_BRANCH = emacs-26 diff --git a/build-aux/amend-emacs-26.txt b/build-aux/amend-emacs-26.txt new file mode 100644 index 0000000000..8ca0d85819 --- /dev/null +++ b/build-aux/amend-emacs-26.txt @@ -0,0 +1,3 @@ +40e1db8ccd1239fc7da5ccd3f5f79017b2b44afc +# satisfy Robert's grammatical peeves +s/reflect it's/reflect its/ diff --git a/build-aux/gitlog-to-emacslog b/build-aux/gitlog-to-emacslog index bdf45360aa..77b3c6d59d 100755 --- a/build-aux/gitlog-to-emacslog +++ b/build-aux/gitlog-to-emacslog @@ -35,6 +35,7 @@ nmax= -f|--force) force=1 ;; -n|--nmax) nmax="$2"; shift ;; -o|--output) output="$2" ; shift ;; + -a|--amend) amend_file="$2" ; shift ;; *) printf '%s\n' "Unrecognized argument: $1" >&2; exit 1 ;; esac shift @@ -67,6 +68,15 @@ new_origin= rm -f "$output" || exit 1 fi +if [ "$amend_file" ]; then + if [ ! -f $amend_file ]; then + printf '%s\n' "Can't find amend file $amend_file" >&2 + exit 1 + else + amend_args="--amend=$amend_file" + fi +fi + # If this is not a Git repository, just generate an empty ChangeLog. test -r .git || { >"$output" @@ -79,6 +89,7 @@ new_origin= ./build-aux/gitlog-to-changelog \ --ignore-matching="^; |^Merge branch '[^']*' of git\.(savannah|sv)\.gnu\.org:/srv/git/emacs|^Merge remote-tracking branch '.*'$" \ --ignore-line='^; ' --format='%B' \ + $amend_args \ "$gen_origin..$new_origin" >"ChangeLog.tmp" || exit if test -r "ChangeLog.tmp"; then -- 2.18.0.rc1 --=-=-=--