From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#19113: Generate a ChangeLog file from commit logs Date: Fri, 20 Mar 2015 19:37:01 -0700 Organization: UCLA Computer Science Department Message-ID: <550CD94D.7010704@cs.ucla.edu> References: <546D2E75.6090701@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070702080408040003070108" X-Trace: ger.gmane.org 1426905523 32062 80.91.229.3 (21 Mar 2015 02:38:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Mar 2015 02:38:43 +0000 (UTC) To: 19113@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 21 03:38:27 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YZ9Iq-0007Ec-5W for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Mar 2015 03:38:20 +0100 Original-Received: from localhost ([::1]:46437 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZ9Ip-0003UU-7S for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Mar 2015 22:38:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZ9Ie-0003UD-GS for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2015 22:38:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YZ9IY-0005Bf-TV for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2015 22:38:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZ9IY-0005BG-KH for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2015 22:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YZ9IY-0004xu-0n for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2015 22:38:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <546D2E75.6090701@cs.ucla.edu> Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Mar 2015 02:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19113 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 19113-submit@debbugs.gnu.org id=B19113.142690544519030 (code B ref 19113); Sat, 21 Mar 2015 02:38:01 +0000 Original-Received: (at 19113) by debbugs.gnu.org; 21 Mar 2015 02:37:25 +0000 Original-Received: from localhost ([127.0.0.1]:59460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZ9Ht-0004wn-Ey for submit@debbugs.gnu.org; Fri, 20 Mar 2015 22:37:25 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:56149) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YZ9Hm-0004wT-Iy for 19113@debbugs.gnu.org; Fri, 20 Mar 2015 22:37:19 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id DADD2A6000E for <19113@debbugs.gnu.org>; Fri, 20 Mar 2015 19:37:07 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zBjNHNKpBQZY for <19113@debbugs.gnu.org>; Fri, 20 Mar 2015 19:37:04 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 6F86EA6000B for <19113@debbugs.gnu.org>; Fri, 20 Mar 2015 19:37:04 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:100732 Archived-At: This is a multi-part message in MIME format. --------------070702080408040003070108 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit I hacked on this a bit and came up with the attached files, which should be improvements. 'announcement.txt' is a draft email to be sent to emacs-devel about a week before the change. The two patch files have the same role as before, and attempt to address the comments made in this thread. It's now much easier to edit ChangeLog history: run 'make change-history' to prepend newer commit messages to the file ChangeLog.1 (thus marking them as older), edit ChangeLog.1 by hand, and then commit the result. Once ChangeLog.1 gets too big it should be easy to start working on ChangeLog.2. I had trouble implementing Glenn's suggestion of using a '#' prefix to mark ignorable commit messages, as Git typically uses '#' for its own purposes when editing commit messages. I changed the prefix to '; ' and this worked better, so I went with that. It should be easy to use any string that starts with a character other than '#'. --------------070702080408040003070108 Content-Type: text/plain; charset=UTF-8; name="announcement.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="announcement.txt" T24gW2ZpbGwgaW4gdGhlIGRhdGUgaGVyZSAtLSBhYm91dCBhIHdlZWsgZnJvbSB3aGVuI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W5nZUxvZyBoaXN0 b3J5IGZpbGVzKS4KClRoaXMgY2hhbmdlIHdpbGwgYmUgaW5zdGFsbGVkIG9uIHRoZSBtYXN0 ZXIgYnJhbmNoLiAgT3RoZXIKYnJhbmNoZXMgY2FuIGFkb3B0IHRoaXMgY2hhbmdlIHdoZW5l dmVyIGNvbnZlbmllbnQuICBUaGUgZW1hY3MtMjQKYnJhbmNoIGNhbiBjb250aW51ZSB0byB1 c2UgdGhlIG9sZCBwcm9jZWR1cmUsIGFuZCBjaGFuZ2VzIHRvCkNoYW5nZUxvZyBmaWxlcyBp biBlbWFjcy0yNCBjYW4gYmUgZGlzY2FyZGVkIGJ5IGhhbmQgd2hlbiBtZXJnaW5nCnRvIG1h c3Rlci4KCkFsdGhvdWdoIHRoaXMgbmV3IHN0eWxlIG9mIG1haW50ZW5hbmNlIGlzIGNvbW1v biBpbiBvdGhlciBHTlUKcHJvamVjdHMsIEVtYWNzIGhhcyBpdHMgb3duIHNwZWNpYWwgbmVl ZHMgYW5kIG1vc3QgbGlrZWx5IHRoZXJlCndpbGwgYmUgZ2xpdGNoZXMgYWZ0ZXIgdGhlIHRy YW5zaXRpb24uICBXZSB3aWxsIGRvIG91ciBiZXN0IHRvCnN0cmFpZ2h0ZW4gb3V0IHRoZXNl IHByb2JsZW1zIGFzIHRoZXkgb2NjdXIuCg== --------------070702080408040003070108 Content-Type: text/x-patch; name="0001-Rename-ChangeLogs-for-gitlog-to-changelog.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Rename-ChangeLogs-for-gitlog-to-changelog.patch" >From 443656eace2ae1c94a762b8a907f2c4b4e728258 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 19 Mar 2015 19:00:29 -0700 Subject: [PATCH 1/2] Rename ChangeLogs for gitlog-to-changelog This patch was implemented via the following shell commands: find * -name ChangeLog | sed 's,.*,git mv & &.1, s, lisp/ChangeLog\.1$, lisp/ChangeLog.17, s, lisp/erc/ChangeLog\.1$, lisp/erc/ChangeLog.09, s, lisp/gnus/ChangeLog\.1$, lisp/gnus/ChangeLog.3, s, lisp/mh-e/ChangeLog\.1$, lisp/mh-e/ChangeLog.2, s, src/ChangeLog\.1$, src/ChangeLog.13,' | sh git commit -am"[this commit message]" --- ChangeLog | 14669 -------------------- ChangeLog.1 | 14669 ++++++++++++++++++++ admin/ChangeLog | 2591 ---- admin/ChangeLog.1 | 2591 ++++ doc/emacs/ChangeLog | 10933 --------------- doc/emacs/ChangeLog.1 | 10933 +++++++++++++++ doc/lispintro/ChangeLog | 796 -- doc/lispintro/ChangeLog.1 | 796 ++ doc/lispref/ChangeLog | 13982 ------------------- doc/lispref/ChangeLog.1 | 13982 +++++++++++++++++++ doc/man/ChangeLog | 194 - doc/man/ChangeLog.1 | 194 + doc/misc/ChangeLog | 12125 ---------------- doc/misc/ChangeLog.1 | 12125 ++++++++++++++++ etc/ChangeLog | 6888 ---------- etc/ChangeLog.1 | 6888 ++++++++++ leim/ChangeLog | 2596 ---- leim/ChangeLog.1 | 2596 ++++ lib-src/ChangeLog | 8616 ------------ lib-src/ChangeLog.1 | 8616 ++++++++++++ lisp/ChangeLog | 25796 ---------------------------------- lisp/ChangeLog.17 | 25796 ++++++++++++++++++++++++++++++++++ lisp/cedet/ChangeLog | 3478 ----- lisp/cedet/ChangeLog.1 | 3478 +++++ lisp/erc/ChangeLog | 772 -- lisp/erc/ChangeLog.09 | 772 ++ lisp/gnus/ChangeLog | 26293 ----------------------------------- lisp/gnus/ChangeLog.3 | 26293 +++++++++++++++++++++++++++++++++++ lisp/mh-e/ChangeLog | 3696 ----- lisp/mh-e/ChangeLog.2 | 3696 +++++ lisp/org/ChangeLog | 32851 -------------------------------------------- lisp/org/ChangeLog.1 | 32851 ++++++++++++++++++++++++++++++++++++++++++++ lisp/url/ChangeLog | 3087 ----- lisp/url/ChangeLog.1 | 3087 +++++ lwlib/ChangeLog | 1982 --- lwlib/ChangeLog.1 | 1982 +++ msdos/ChangeLog | 1568 --- msdos/ChangeLog.1 | 1568 +++ nextstep/ChangeLog | 330 - nextstep/ChangeLog.1 | 330 + nt/ChangeLog | 3561 ----- nt/ChangeLog.1 | 3561 +++++ oldXMenu/ChangeLog | 730 - oldXMenu/ChangeLog.1 | 730 + src/ChangeLog | 17766 ------------------------ src/ChangeLog.13 | 17766 ++++++++++++++++++++++++ test/ChangeLog | 2935 ---- test/ChangeLog.1 | 2935 ++++ 48 files changed, 198235 insertions(+), 198235 deletions(-) delete mode 100644 ChangeLog create mode 100644 ChangeLog.1 delete mode 100644 admin/ChangeLog create mode 100644 admin/ChangeLog.1 delete mode 100644 doc/emacs/ChangeLog create mode 100644 doc/emacs/ChangeLog.1 delete mode 100644 doc/lispintro/ChangeLog create mode 100644 doc/lispintro/ChangeLog.1 delete mode 100644 doc/lispref/ChangeLog create mode 100644 doc/lispref/ChangeLog.1 delete mode 100644 doc/man/ChangeLog create mode 100644 doc/man/ChangeLog.1 delete mode 100644 doc/misc/ChangeLog create mode 100644 doc/misc/ChangeLog.1 delete mode 100644 etc/ChangeLog create mode 100644 etc/ChangeLog.1 delete mode 100644 leim/ChangeLog create mode 100644 leim/ChangeLog.1 delete mode 100644 lib-src/ChangeLog create mode 100644 lib-src/ChangeLog.1 delete mode 100644 lisp/ChangeLog create mode 100644 lisp/ChangeLog.17 delete mode 100644 lisp/cedet/ChangeLog create mode 100644 lisp/cedet/ChangeLog.1 delete mode 100644 lisp/erc/ChangeLog create mode 100644 lisp/erc/ChangeLog.09 delete mode 100644 lisp/gnus/ChangeLog create mode 100644 lisp/gnus/ChangeLog.3 delete mode 100644 lisp/mh-e/ChangeLog create mode 100644 lisp/mh-e/ChangeLog.2 delete mode 100644 lisp/org/ChangeLog create mode 100644 lisp/org/ChangeLog.1 delete mode 100644 lisp/url/ChangeLog create mode 100644 lisp/url/ChangeLog.1 delete mode 100644 lwlib/ChangeLog create mode 100644 lwlib/ChangeLog.1 delete mode 100644 msdos/ChangeLog create mode 100644 msdos/ChangeLog.1 delete mode 100644 nextstep/ChangeLog create mode 100644 nextstep/ChangeLog.1 delete mode 100644 nt/ChangeLog create mode 100644 nt/ChangeLog.1 delete mode 100644 oldXMenu/ChangeLog create mode 100644 oldXMenu/ChangeLog.1 delete mode 100644 src/ChangeLog create mode 100644 src/ChangeLog.13 delete mode 100644 test/ChangeLog create mode 100644 test/ChangeLog.1 [The rest of this patch is long (about 14 MB) and is omitted here. You can regenerate it by following the above instructions.] --------------070702080408040003070108 Content-Type: text/x-patch; name="0002-Add-support-for-generating-a-ChangeLog-file-from-com.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename*0="0002-Add-support-for-generating-a-ChangeLog-file-from-com.pa"; filename*1="tch" =46rom e4068162684d9c3529d2ced881d1af226f23e446 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 20 Mar 2015 12:18:52 -0700 Subject: [PATCH 2/2] Add support for generating a ChangeLog file from com= mit logs. * .gitignore: Add 'ChangeLog'. * build-aux/gitlog-to-changelog: New file, from Gnulib. * build-aux/gitlog-to-emacslog: New file. * CONTRIBUTE: Document the revised workflow. * Makefile.in (clean): Remove *.tmp and etc/*.tmp* instead of just special cases. (gen_origin): New var. (ChangeLog, unchanged-history-files, change-history) (change-history-commit): New rules. * admin/admin.el (make-manuals-dist--1): Don't worry about doc/ChangeLog. * admin/authors.el: Add a FIXME. * admin/make-tarball.txt: * lisp/calendar/icalendar.el: * lisp/gnus/deuglify.el: * lisp/obsolete/gulp.el: * lwlib/README: Adjust to renamed ChangeLog history files. * admin/merge-gnulib (GNULIB_MODULES): Add gitlog-to-changelog. * admin/notes/repo: Call it 'master' a la Git, not 'trunk' a la Bzr. Remove obsolete discussion of merging ChangeLog files. New section "Maintaining ChangeLog history". * build-aux/git-hooks/pre-commit: Reject attempts to commit files named 'ChangeLog'. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * make-dist: Make and distribute top-level ChangeLog if there's a =2Egit directory. Distribute the new ChangeLog history files instead of scattered ChangeLog files. Distribute the new files gitlog-to-changelog and gitlog-to-emacslog. Fixes: bug#19113 --- .gitignore | 1 + CONTRIBUTE | 85 ++++++-- Makefile.in | 32 ++- admin/admin.el | 6 +- admin/authors.el | 5 +- admin/make-tarball.txt | 19 +- admin/merge-gnulib | 2 +- admin/notes/repo | 54 +++-- build-aux/git-hooks/pre-commit | 18 +- build-aux/gitlog-to-changelog | 445 +++++++++++++++++++++++++++++++++++= ++++++ build-aux/gitlog-to-emacslog | 69 +++++++ lib/gnulib.mk | 9 +- lisp/calendar/icalendar.el | 2 +- lisp/gnus/deuglify.el | 2 +- lisp/obsolete/gulp.el | 2 +- lwlib/README | 2 +- m4/gnulib-comp.m4 | 2 + make-dist | 38 ++-- 18 files changed, 705 insertions(+), 88 deletions(-) create mode 100755 build-aux/gitlog-to-changelog create mode 100755 build-aux/gitlog-to-emacslog diff --git a/.gitignore b/.gitignore index 9810c1d..67d28653 100644 --- a/.gitignore +++ b/.gitignore @@ -237,6 +237,7 @@ info/dir *~ .#* \#*\# +ChangeLog [0-9]*.patch =20 # Built by 'make install'. diff --git a/CONTRIBUTE b/CONTRIBUTE index 5cf015f..8821f68 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -32,21 +32,32 @@ entry in their name, not yours. git distinguishes bet= ween the author and the committer; use the --author option on the commit command to specify the actual author; the committer defaults to you. =20 -** commit messages +** Commit messages =20 -When using git, commit messages should use ChangeLog format, with the -following modifications: +Typically, a patch creates ChangeLog entries by putting them into its +commit message, not by changing a ChangeLog file. Here is an example +commit message (indented): =20 -- Add a single short line explaining the change, then an empty line, - then unindented ChangeLog entries. + Deactivate shifted region =20 - You can use various Emacs functions to ease this process; see (info - "(emacs)Change Log Commands") or - http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Co= mmands.html. + Do not silently extend a region that is not highlighted; + this can happen after a shift. + * doc/emacs/mark.texi (Shift Selection): Document the change. + * lisp/window.el (handle-select-window): + * src/frame.c (Fhandle_switch_frame, Fselected_frame): + Deactivate the mark. + Fixes: bug#19003 + +The general format is as follows. =20 -- The summary line is limited to 72 characters (enforced by a commit - hook). If you have trouble making that a good summary, add a - paragraph below it, before the individual file descriptions. +- Commit messages contain a single short line summarizing the change, + then an empty line, then unindented ChangeLog entries. + +- Limit lines to 78 characters; this is enforced by a commit hook. + It's nicer to limit the summary line to 50 characters; this isn't + enforced. If the change can't be summarized so briefly, add a + paragraph below the blank line, before the individual file + descriptions. =20 - If only a single file is changed, the summary line can be the normal file first line (starting with the asterisk). Then there is no @@ -57,8 +68,6 @@ following modifications: the rationale for a change; that can be done in the commit message between the summary line and the file entries. =20 -** ChangeLog notes - - Emacs generally follows the GNU coding standards when it comes to ChangeLogs: http://www.gnu.org/prep/standards/html_node/Change-Logs.html . One @@ -77,23 +86,28 @@ following modifications: and have a reasonable chance of being read in the future, so it's better that they have good presentation. =20 -- There are multiple ChangeLogs in the emacs source; roughly one per - high-level directory. The ChangeLog entry for a commit belongs in the - lowest ChangeLog that is higher than or at the same level as any file - changed by the commit. - - Use the present tense; describe "what the change does", not "what the change did". =20 - Preferred form for several entries with the same content: =20 - * help.el (view-lossage): - * kmacro.el (kmacro-edit-lossage): - * edmacro.el (edit-kbd-macro): Fix docstring, lossage is now 300 keys= =2E + * lisp/help.el (view-lossage): + * lisp/kmacro.el (kmacro-edit-lossage): + * lisp/edmacro.el (edit-kbd-macro): Fix docstring, lossage is now 300= keys. =20 (Rather than anything involving "ditto" and suchlike.) =20 -- If the commit fixes a bug, add a separate line +- If the commit has authors other than yourself, the commit message + should contain a separate line like the following: + + Co-authored-by: Joe Schmoe + +- If the commit is a tiny change that is exempt from copyright paperwork= , + the commit message should contain a separate line like the following: + + Copyright-paperwork-exempt: yes + +- If the commit fixes a bug, append a separate line =20 Fixes: bug#NNNN =20 @@ -113,6 +127,29 @@ following modifications: of files such as 'configure'. "There is no need" means you don't have to, but you can if you want to. =20 +- If a commit message's first line starts with "; ", the message is + ignored when generating ChangeLog history files via 'make changelog' + or via 'make change-history'. You can use "; " for minor commits + that do not need separate ChangeLog entries. + +** Generating ChangeLog entries + +- You can use various Emacs functions to ease the process of writing + ChangeLog entries; see (info "(emacs)Change Log Commands") or + http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Co= mmands.html. + +- If you use Emacs VC, one way to format ChangeLog entries is to create + a top-level ChangeLog file, and update it with 'C-x 4 a' file as + usual. Do not register the ChangeLog file under git; instead, use + 'C-c C-a' to insert its contents into into your *vc-log* buffer. + +- Alternatively, you can use the vc-dwim command to maintain commit + messages. When you create a source directory, run the shell command + 'git-changelog-symlink-init' to create a symbolic link from + ChangeLog to .git/c/ChangeLog. Edit this ChangeLog via its symlink + with Emacs commands like 'C-x 4 a', and commit the change using the + shell command 'vc-dwim --commit'. Type 'vc-dwim --help' for more. + ** branches =20 Development normally takes places on the trunk. @@ -176,6 +213,10 @@ to the tracker at http://debbugs.gnu.org . You can subscribe to the mailing lists, or see the list archives, by following links from http://savannah.gnu.org/mail/?group=3Demacs . =20 +To email a patch you can use a shell command like 'git format-patch -1' +to create a file, and then attach the file to your email. This nicely +packages the patch's commit message and changes. + ** Document your changes. =20 Any change that matters to end-users should have an entry in etc/NEWS. diff --git a/Makefile.in b/Makefile.in index 4cdd293..dccb88d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -833,7 +833,7 @@ clean: $(clean_dirs:=3D_clean) for dir in test/automated; do \ [ ! -d $$dir ] || $(MAKE) -C $$dir clean; \ done - -rm -f etc/emacs.tmpdesktop etc/emacs.tmpappdata + -rm -f *.tmp etc/*.tmp* -rm -rf info-dir.* =20 ### `bootclean' @@ -1087,6 +1087,36 @@ bootstrap: bootstrap-clean $(MAKE) MAKEFILE_NAME=3Dforce-Makefile force-Makefile $(MAKE) all =20 +# The newest revision that should not appear in the generated ChangeLog.= +gen_origin =3D 13eb26ad38378e0063e9c9313c3ba8af666629dc +# Convert git commit log to ChangeLog file. make-dist uses this. +.PHONY: ChangeLog change-history unchanged-history-files +ChangeLog: + $(AM_V_GEN)distprefix=3D$(distprefix) srcprefix=3D$(srcdir)/ \ + $(srcdir)/build-aux/gitlog-to-emacslog $(gen_origin) + +# Check that history-relevant files match what's in the repository. +# Otherwise, 'make change-history' might mess up the ChangeLog history f= iles. +unchanged-history-files: + x=3D$$(git diff-files --name-only ChangeLog.1 Makefile.in) && \ + test -z "$$x" + +# Copy newer commit messages to the start of the ChangeLog history file,= +# and consider them to be older. +change-history: ChangeLog unchanged-history-files + (sed '/^Copyright/,$$d' ChangeLog.1.tmp= + new_origin=3D$$(git log --pretty=3Dformat:%H HEAD^!) && \ + sed 's/^\(gen_origin *=3D *\).*/\1'"$$new_origin/" \ + Makefile.in.tmp + mv ChangeLog.1.tmp ChangeLog.1 + mv Makefile.in.tmp Makefile.in + $(MAKE) $@-commit + +# If 'make change-history' fails because ChangeLog.1 contains invalid te= xt, +# fix ChangeLog.1 by hand and run 'make change-history-commit'. +change-history-commit: + git commit -m'; make $@' ChangeLog.1 Makefile.in + .PHONY: check-declare =20 check-declare: diff --git a/admin/admin.el b/admin/admin.el index 9bf503e..f7b9155 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -28,10 +28,6 @@ =20 (defvar add-log-time-format) ; in add-log =20 -;; Does this information need to be in every ChangeLog, as opposed to -;; just the top-level one? Only if you allow changes the same -;; day as the release. -;; http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00161.html (defun add-release-logs (root version &optional date) "Add \"Version VERSION released.\" change log entries in ROOT. Root must be the root of an Emacs source tree. @@ -601,7 +597,7 @@ style=3D\"text-align:left\">") (copy-file "../doc/misc/texinfo.tex" stem) (or (equal type "emacs") (copy-file "../doc/emacs/emacsver.texi" ste= m)) (dolist (file (directory-files (format "../doc/%s" type) t)) - (if (or (string-match-p "\\(\\.texi\\'\\|/ChangeLog\\|/README\\'\\= )" file) + (if (or (string-match-p "\\(\\.texi\\'\\|/README\\'\\)" file) (and (equal type "lispintro") (string-match-p "\\.\\(eps\\|pdf\\)\\'" file))) (copy-file file stem))) diff --git a/admin/authors.el b/admin/authors.el index d214ff2..8716785 100644 --- a/admin/authors.el +++ b/admin/authors.el @@ -27,6 +27,9 @@ ;; Use M-x authors RET to create an *Authors* buffer that can used as ;; or merged with Emacs's AUTHORS file. =20 +;; FIXME: This needs to modernized in the light of current practice, +;; which generates a single top-level ChangeLog file from commit logs. + ;;; Code: =20 (defvar authors-coding-system 'utf-8 @@ -76,7 +79,7 @@ files.") ("Gerd M=C3=B6llmann" "Gerd Moellmann") ("Hallvard B. Furuseth" "Hallvard B Furuseth" "Hallvard Furuseth") ("Hrvoje Nik=C5=A1i=C4=87" "Hrvoje Niksic") - ;; lisp/org/ChangeLog 2010-11-11. + ;; lisp/org/ChangeLog.1 2010-11-11. (nil "aaa bbb") (nil "Code Extracted") ; lisp/newcomment.el's "Author:" header ("Jaeyoun Chung" "Jae-youn Chung" "Jae-you Chung" "Chung Jae-youn") diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index 8f8b031..2fe3b69 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -31,28 +31,30 @@ General steps (for each step, check for possible erro= rs): M-x authors RET =20 If there is an "*Authors Errors*" buffer, address the issues. - If there was a ChangeLog typo, fix it. If a file was deleted or - renamed, consider adding an appropriate entry to authors-ignored-fil= es, + If there was a ChangeLog typo, run "make change-history" and then + fix ChangeLog.1. If a file was deleted or renamed, consider + adding an appropriate entry to authors-ignored-files, authors-valid-file-names, or authors-renamed-files-alist. =20 If necessary, repeat M-x authors after making those changes. Save the "*Authors*" buffer as etc/AUTHORS. Check the diff looks reasonable. Maybe add entries to authors-ambiguous-files or authors-aliases, and repeat. - Commit any fixes to ChangeLogs or authors.el. + Commit any fixes to authors.el. =20 3. Set the version number (M-x load-file RET admin/admin.el RET, then M-x set-version RET). For a release, add released ChangeLog - entries (M-x add-release-logs RET). + entries (create a ChangeLog symlink a la vc-dwim, then run M-x + add-release-logs RET, then run the shell command 'vc-dwim --commit')= =2E =20 For a pretest, start at version .90. After .99, use .990 (so that it sorts). =20 The final pretest should be a release candidate. Set the version number to that of the actual release. Pick a date about a week - from now when you intend to make the release. Use M-x add-release-l= ogs - to add the ChangeLog entries for that date to the tar file (but - not yet to the repository). Name the tar file as + from now when you intend to make the release. Use vc-dwim and + M-x add-release-logs as described above to add the ChangeLog + entries for that date to the tar file. Name the tar file as emacs-XX.Y-rc1.tar. If all goes well in the following week, you can simply rename the file and use it for the actual release. =20 @@ -65,8 +67,7 @@ General steps (for each step, check for possible errors= ): 5. Copy lisp/loaddefs.el to lisp/ldefs-boot.el. =20 Commit etc/AUTHORS, lisp/ldefs-boot.el, and the files changed - by M-x set-version. For a release, also commit the ChangeLog - files in all directories. + by M-x set-version. =20 If someone else made a commit between step 1 and now, you need to repeat from step 4 onwards. (You can commit the files diff --git a/admin/merge-gnulib b/admin/merge-gnulib index 9e2b10d..e63422b 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib @@ -31,7 +31,7 @@ GNULIB_MODULES=3D' crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync - getloadavg getopt-gnu gettime gettimeofday + getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat diff --git a/admin/notes/repo b/admin/notes/repo index 4f9dc59..e549e25 100644 --- a/admin/notes/repo +++ b/admin/notes/repo @@ -10,10 +10,10 @@ instructions. * Install changes only on one branch, let them get merged elsewhere if n= eeded. =20 In particular, install bug-fixes only on the release branch (if there -is one) and let them get synced to the trunk; do not install them by -hand on the trunk as well. E.g. if there is an active "emacs-24" branch= +is one) and let them get synced to the master; do not install them by +hand on the master as well. E.g. if there is an active "emacs-24" branc= h and you have a bug-fix appropriate for the next emacs-24.x release, -install it only on the emacs-24 branch, not on the trunk as well. +install it only on the emacs-24 branch, not on the master as well. =20 Installing things manually into more than one branch makes merges more difficult. @@ -21,10 +21,10 @@ difficult. http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01124.html =20 The exception is, if you know that the change will be difficult to -merge to the trunk (eg because the trunk code has changed a lot). -In that case, it's helpful if you can apply the change to both trunk +merge to the master (eg because the master code has changed a lot). +In that case, it's helpful if you can apply the change to both master and branch yourself (when committing the branch change, indicate -in the commit log that it should not be merged to the trunk, by +in the commit log that it should not be merged to the master, by including the phrase "Not to be merged to master", or any other phrase that matches "merge"). =20 @@ -32,14 +32,14 @@ that matches "merge"). =20 If your branch has only a single commit, or many different real commits, it is fine to do a merge. If your branch has only a very -small number of "real" commits, but several "merge from trunks", it is -preferred that you take your branch's diff, apply it to the trunk, and +small number of "real" commits, but several "merge from masters", it is +preferred that you take your branch's diff, apply it to the master, and commit directly, not merge. This keeps the history cleaner. =20 In general, when working on some feature in a separate branch, it is -preferable not to merge from trunk until you are done with the +preferable not to merge from master until you are done with the feature. Unless you really need some change that was done on the -trunk while you were developing on the branch, you don't really need +master while you were developing on the branch, you don't really need those merges; just merge once, when you are done with the feature, and Bazaar will take care of the rest. Bazaar is much better in this than CVS, so interim merges are unnecessary. @@ -66,22 +66,14 @@ variable in admin/merge-gnulib before running it. If you remove a gnulib module, or if a gnulib module removes a file, then remove the corresponding files by hand. =20 -* How to merge changes from emacs-24 to trunk +* How to merge changes from emacs-24 to master =20 -[The section on git merge procedure has not yet been written] - -Inspect the change log entries (e.g. in case too many entries have been -included or whitespace between entries needs fixing). If someone made -multiple change log entries on different days in the branch, you may -wish to collapse them all to a single entry for that author in the -trunk (because in the trunk they all appear under the same date). -Obviously, if there are multiple changes to the same file by different -authors, don't break the logical ordering in doing this. +[The section on git merge procedure has not yet been written.] =20 You may see conflicts in autoload md5sums in comments. Strictly speaking, the right thing to do is merge everything else, resolve the -conflict by choosing either the trunk or branch version, then run -`make -C lisp autoloads' to update the md5sums to the correct trunk +conflict by choosing either the master or branch version, then run +`make -C lisp autoloads' to update the md5sums to the correct master value before committing. =20 * Re-adding a file that has been removed from the repository @@ -124,3 +116,21 @@ again. =20 This is a semi-automated way to find the revision that introduced a bug.= Browse `git help bisect' for technical instructions. + +* Maintaining ChangeLog history + +Older ChangeLog entries are kept in history files named ChangeLog.1, +ChangeLog.2, etc., and can be edited just as any other source files +can. Newer ChangeLog entries are stored in the repository as commit +messages, which cannot be edited directly. + +'make ChangeLog' copies newer ChangeLog entries into a file +'ChangeLog' that is intended to be put into the distribution tarball. +This ChangeLog file is not put into the repository. + +'make change-history' copies all newer ChangeLog entries into the +start of the history file 'ChangeLog.1'. These ChangeLog entries are +thereafter considered to be old, so later uses of 'make ChangeLog' +and/or 'make change-history' will no longer copy the entries. To +alter ChangeLog history, run 'make change-history', then edit +'ChangeLog.1' manually and commit your changes. diff --git a/build-aux/git-hooks/pre-commit b/build-aux/git-hooks/pre-com= mit index d050c40..8bce1f5 100755 --- a/build-aux/git-hooks/pre-commit +++ b/build-aux/git-hooks/pre-commit @@ -34,13 +34,15 @@ if test "$nbadchars" -ne 0; then exit 1 fi =20 -new_names=3D`$git_diff HEAD` || exit -case " -$new_names" in - */-* | *' -'-*) - echo "File name component begins with '-'." - exit 1;; -esac +for new_name in `$git_diff HEAD`; do + case $new_name in + -* | */-*) + echo "$new_name: File name component begins with '-'." + exit 1;; + ChangeLog | */ChangeLog) + echo "$new_name: Please use git commit messages, not ChangeLog fil= es." + exit 1;; + esac +done =20 exec git diff-index --check --cached HEAD -- diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelo= g new file mode 100755 index 0000000..4fa4f29 --- /dev/null +++ b/build-aux/gitlog-to-changelog @@ -0,0 +1,445 @@ +eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' + & eval 'exec perl -wS "$0" $argv:q' + if 0; +# Convert git log output to ChangeLog format. + +my $VERSION =3D '2015-03-21 01:01'; # UTC +# The definition above must lie within the first 8 lines in order +# for the Emacs time-stamp write hook (at end) to update it. +# If you change this file with Emacs, please let the write hook +# do its job. Otherwise, update this string manually. + +# Copyright (C) 2008-2015 Free Software Foundation, Inc. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Written by Jim Meyering + +use strict; +use warnings; +use Getopt::Long; +use POSIX qw(strftime); + +(my $ME =3D $0) =3D~ s|.*/||; + +# use File::Coda; # http://meyering.net/code/Coda/ +END { + defined fileno STDOUT or return; + close STDOUT and return; + warn "$ME: failed to close standard output: $!\n"; + $? ||=3D 1; +} + +sub usage ($) +{ + my ($exit_code) =3D @_; + my $STREAM =3D ($exit_code =3D=3D 0 ? *STDOUT : *STDERR); + if ($exit_code !=3D 0) + { + print $STREAM "Try '$ME --help' for more information.\n"; + } + else + { + print $STREAM < ChangeLog + $ME -- -n 5 foo > last-5-commits-to-branch-foo + +SPECIAL SYNTAX: + +The following types of strings are interpreted specially when they appea= r +at the beginning of a log message line. They are not copied to the outp= ut. + + Copyright-paperwork-exempt: Yes + Append the "(tiny change)" notation to the usual "date name email" + ChangeLog header to mark a change that does not require a copyright + assignment. + Co-authored-by: Joe User + List the specified name and email address on a second + ChangeLog header, denoting a co-author. + Signed-off-by: Joe User + These lines are simply elided. + +In a FILE specified via --amend, comment lines (starting with "#") are i= gnored. +FILE must consist of pairs where SHA is a 40-byte SHA1 (alon= e on +a line) referring to a commit in the current project, and CODE refers to= one +or more consecutive lines of Perl code. Pairs must be separated by one = or +more blank line. + +Here is sample input for use with --amend=3DFILE, from coreutils: + +3a169f4c5d9159283548178668d2fae6fced3030 +# fix typo in title: +s/all tile types/all file types/ + +1379ed974f1fa39b12e2ffab18b3f7a607082202 +# Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself. +# Change the author to be Paul. Note the escaped "@": +s,Jim .*>,Paul Eggert , + +EOF + } + exit $exit_code; +} + +# If the string $S is a well-behaved file name, simply return it. +# If it contains white space, quotes, etc., quote it, and return the new= string. +sub shell_quote($) +{ + my ($s) =3D @_; + if ($s =3D~ m![^\w+/.,-]!) + { + # Convert each single quote to '\'' + $s =3D~ s/\'/\'\\\'\'/g; + # Then single quote the string. + $s =3D "'$s'"; + } + return $s; +} + +sub quoted_cmd(@) +{ + return join (' ', map {shell_quote $_} @_); +} + +# Parse file F. +# Comment lines (starting with "#") are ignored. +# F must consist of pairs where SHA is a 40-byte SHA1 +# (alone on a line) referring to a commit in the current project, and +# CODE refers to one or more consecutive lines of Perl code. +# Pairs must be separated by one or more blank line. +sub parse_amend_file($) +{ + my ($f) =3D @_; + + open F, '<', $f + or die "$ME: $f: failed to open for reading: $!\n"; + + my $fail; + my $h =3D {}; + my $in_code =3D 0; + my $sha; + while (defined (my $line =3D )) + { + $line =3D~ /^\#/ + and next; + chomp $line; + $line eq '' + and $in_code =3D 0, next; + + if (!$in_code) + { + $line =3D~ /^([0-9a-fA-F]{40})$/ + or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), + $fail =3D 1, next; + $sha =3D lc $1; + $in_code =3D 1; + exists $h->{$sha} + and (warn "$ME: $f:$.: duplicate SHA1\n"), + $fail =3D 1, next; + } + else + { + $h->{$sha} ||=3D ''; + $h->{$sha} .=3D "$line\n"; + } + } + close F; + + $fail + and exit 1; + + return $h; +} + +# git_dir_option $SRCDIR +# +# From $SRCDIR, the --git-dir option to pass to git (none if $SRCDIR +# is undef). Return as a list (0 or 1 element). +sub git_dir_option($) +{ + my ($srcdir) =3D @_; + my @res =3D (); + if (defined $srcdir) + { + my $qdir =3D shell_quote $srcdir; + my $cmd =3D "cd $qdir && git rev-parse --show-toplevel"; + my $qcmd =3D shell_quote $cmd; + my $git_dir =3D qx($cmd); + defined $git_dir + or die "$ME: cannot run $qcmd: $!\n"; + $? =3D=3D 0 + or die "$ME: $qcmd had unexpected exit code or signal ($?)\n"; + chomp $git_dir; + push @res, "--git-dir=3D$git_dir/.git"; + } + @res; +} + +{ + my $since_date; + my $until_date; + my $format_string =3D '%s%n%b%n'; + my $amend_file; + my $append_dot =3D 0; + my $cluster =3D 1; + my $ignore_matching; + my $strip_tab =3D 0; + my $strip_cherry_pick =3D 0; + my $srcdir; + GetOptions + ( + help =3D> sub { usage 0 }, + version =3D> sub { print "$ME version $VERSION\n"; exit }, + 'since=3Ds' =3D> \$since_date, + 'until=3Ds' =3D> \$until_date, + 'format=3Ds' =3D> \$format_string, + 'amend=3Ds' =3D> \$amend_file, + 'append-dot' =3D> \$append_dot, + 'cluster!' =3D> \$cluster, + 'ignore-matching=3Ds' =3D> \$ignore_matching, + 'strip-tab' =3D> \$strip_tab, + 'strip-cherry-pick' =3D> \$strip_cherry_pick, + 'srcdir=3Ds' =3D> \$srcdir, + ) or usage 1; + + defined $since_date + and unshift @ARGV, "--since=3D$since_date"; + defined $until_date + and unshift @ARGV, "--until=3D$until_date"; + + # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/) + # that makes a correction in the log or attribution of that commit. + my $amend_code =3D defined $amend_file ? parse_amend_file $amend_file = : {}; + + my @cmd =3D ('git', + git_dir_option $srcdir, + qw(log --log-size), + '--pretty=3Dformat:%H:%ct %an <%ae>%n%n'.$format_string, = @ARGV); + open PIPE, '-|', @cmd + or die ("$ME: failed to run '". quoted_cmd (@cmd) ."': $!\n" + . "(Is your Git too old? Version 1.5.1 or later is required= =2E)\n"); + + my $prev_multi_paragraph; + my $prev_date_line =3D ''; + my @prev_coauthors =3D (); + while (1) + { + defined (my $in =3D ) + or last; + $in =3D~ /^log size (\d+)$/ + or die "$ME:$.: Invalid line (expected log size):\n$in"; + my $log_nbytes =3D $1; + + my $log; + my $n_read =3D read PIPE, $log, $log_nbytes; + $n_read =3D=3D $log_nbytes + or die "$ME:$.: unexpected EOF\n"; + + # Extract leading hash. + my ($sha, $rest) =3D split ':', $log, 2; + defined $sha + or die "$ME:$.: malformed log entry\n"; + $sha =3D~ /^[0-9a-fA-F]{40}$/ + or die "$ME:$.: invalid SHA1: $sha\n"; + + # If this commit's log requires any transformation, do it now. + my $code =3D $amend_code->{$sha}; + if (defined $code) + { + eval 'use Safe'; + my $s =3D new Safe; + # Put the unpreprocessed entry into "$_". + $_ =3D $rest; + + # Let $code operate on it, safely. + my $r =3D $s->reval("$code") + or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n"; + + # Note that we've used this entry. + delete $amend_code->{$sha}; + + # Update $rest upon success. + $rest =3D $_; + } + + # Remove lines inserted by "git cherry-pick". + if ($strip_cherry_pick) + { + $rest =3D~ s/^\s*Conflicts:\n.*//sm; + $rest =3D~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m; + } + + my @line =3D split /\s*\n/, $rest; + my $author_line =3D shift @line; + defined $author_line + or die "$ME:$.: unexpected EOF\n"; + $author_line =3D~ /^(\d+) (.*>)$/ + or die "$ME:$.: Invalid line " + . "(expected date/author/email):\n$author_line\n"; + + # Format 'Copyright-paperwork-exempt: Yes' as a standard ChangeLog= + # `(tiny change)' annotation. + my $tiny =3D (grep (/^Copyright-paperwork-exempt:\s+[Yy]es$/, @lin= e) + ? ' (tiny change)' : ''); + + my $date_line =3D sprintf "%s %s$tiny\n", + strftime ("%F", localtime ($1)), $2; + + my @coauthors =3D grep /^Co-authored-by:.*$/, @line; + # Omit meta-data lines we've already interpreted. + @line =3D grep !/^(?:Signed-off-by:[ ].*>$ + |Co-authored-by:[ ] + |Copyright-paperwork-exempt:[ ] + )/x, @line; + + # Remove leading and trailing blank lines. + if (@line) + { + while ($line[0] =3D~ /^\s*$/) { shift @line; } + while ($line[$#line] =3D~ /^\s*$/) { pop @line; } + } + + # Ignore commits that match the --ignore-matching pattern, if spec= ified. + if (! (defined $ignore_matching + && @line && $line[0] =3D~ /$ignore_matching/)) + { + # Record whether there are two or more paragraphs. + my $multi_paragraph =3D grep /^\s*$/, @line; + + # Format 'Co-authored-by: A U Thor ' lines = in + # standard multi-author ChangeLog format. + for (@coauthors) + { + s/^Co-authored-by:\s*/\t /; + s/\s*/ + or warn "$ME: warning: missing email address for " + . substr ($_, 5) . "\n"; + } + + # If clustering of commit messages has been disabled, if this = header + # would be different from the previous date/name/etc. header, + # or if this or the previous entry consists of two or more par= agraphs, + # then print the header. + if ( ! $cluster + || $date_line ne $prev_date_line + || "@coauthors" ne "@prev_coauthors" + || $multi_paragraph + || $prev_multi_paragraph) + { + $prev_date_line eq '' + or print "\n"; + print $date_line; + @coauthors + and print join ("\n", @coauthors), "\n"; + } + $prev_date_line =3D $date_line; + @prev_coauthors =3D @coauthors; + $prev_multi_paragraph =3D $multi_paragraph; + + # If there were any lines + if (@line =3D=3D 0) + { + warn "$ME: warning: empty commit message:\n $date_line\n"= ; + } + else + { + if ($append_dot) + { + # If the first line of the message has enough room, th= en + if (length $line[0] < 72) + { + # append a dot if there is no other punctuation or= blank + # at the end. + $line[0] =3D~ /[[:punct:]\s]$/ + or $line[0] .=3D '.'; + } + } + + # Remove one additional leading TAB from each line. + $strip_tab + and map { s/^\t// } @line; + + # Prefix each non-empty line with a TAB. + @line =3D map { length $_ ? "\t$_" : '' } @line; + + print "\n", join ("\n", @line), "\n"; + } + } + + defined ($in =3D ) + or last; + $in ne "\n" + and die "$ME:$.: unexpected line:\n$in"; + } + + close PIPE + or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; + # FIXME-someday: include $PROCESS_STATUS in the diagnostic + + # Complain about any unused entry in the --amend=3DF specified file. + my $fail =3D 0; + foreach my $sha (keys %$amend_code) + { + warn "$ME:$amend_file: unused entry: $sha\n"; + $fail =3D 1; + } + + exit $fail; +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "my $VERSION =3D '" +# time-stamp-format: "%:y-%02m-%02d %02H:%02M" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "'; # UTC" +# End: diff --git a/build-aux/gitlog-to-emacslog b/build-aux/gitlog-to-emacslog new file mode 100755 index 0000000..553607a --- /dev/null +++ b/build-aux/gitlog-to-emacslog @@ -0,0 +1,69 @@ +#!/bin/sh + +# Convert git log output to ChangeLog format for GNU Emacs. + +# Copyright (C) 2014-2015 Free Software Foundation, Inc. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Written by Paul Eggert + +LC_ALL=3DC +export LC_ALL + +gen_origin=3D${1?} + +# If this is not a Git repository, just generate an empty ChangeLog. +test -d ${srcprefix}.git || { + # Remove any old ChangeLog, in case it is a vc-dwim symlink. + rm -f "${distprefix}ChangeLog" || exit + >"${distprefix}ChangeLog" + exit +} + +# Use Gnulib's packaged ChangeLog generator. +${srcprefix}build-aux/gitlog-to-changelog --ignore-matching=3D'^; ' \ + "$gen_origin.." >"${distprefix}ChangeLog.tmp" || exit + +if test -s "${distprefix}ChangeLog.tmp"; then + + # Find the years covered by the generated ChangeLog, so that + # a proper copyright notice can be output. + years=3D` + sed -n 's/^\([0-9][0-9]*\).*/\1/p' "${distprefix}ChangeLog.tmp" | + sort -nu + ` + start_year=3D + end_year=3D + for year in $years; do + : ${start_year:=3D$year} + end_year=3D$year + done + + if test "$start_year" =3D "$end_year"; then + year_range=3D$start_year + else + year_range=3D$start_year-$end_year + fi + + # Append a proper copyright notice. + sed "1d + s/\\(Copyright[ (C)]*\\)[0-9]*-[0-9]*/\\1$year_range/ + s/^# // + /http:/q + " >"${distprefix}ChangeLog.tmp" || exit +fi + +# Install the generated ChangeLog. +mv -f "${distprefix}ChangeLog.tmp" "${distprefix}ChangeLog" diff --git a/lib/gnulib.mk b/lib/gnulib.mk index 7703cbf..273b018 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk @@ -21,7 +21,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=3D. --lib=3Dlibgnu --source-b= ase=3Dlib --m4-base=3Dm4 --doc-base=3Ddoc --tests-base=3Dtests --aux-dir=3D= build-aux --avoid=3Dclose --avoid=3Ddup --avoid=3Dfchdir --avoid=3Dfstat = --avoid=3Dmalloc-posix --avoid=3Dmsvc-inval --avoid=3Dmsvc-nothrow --avoi= d=3Dopen --avoid=3Dopenat-die --avoid=3Dopendir --avoid=3Draise --avoid=3D= save-cwd --avoid=3Dselect --avoid=3Dsigprocmask --avoid=3Dstdarg --avoid=3D= stdbool --avoid=3Dthreadlib --makefile-name=3Dgnulib.mk --conditional-dep= endencies --no-libtool --macro-prefix=3Dgl --no-vc-files alloca-opt binar= y-io byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits = count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 d= toastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasyn= c fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeo= fday intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 = pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen s= tat-time stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlin= k sys_stat sys_time time time_r timer-time timespec-add timespec-sub unse= tenv update-copyright utimens vla warnings +# Reproduce by: gnulib-tool --import --dir=3D. --lib=3Dlibgnu --source-b= ase=3Dlib --m4-base=3Dm4 --doc-base=3Ddoc --tests-base=3Dtests --aux-dir=3D= build-aux --avoid=3Dclose --avoid=3Ddup --avoid=3Dfchdir --avoid=3Dfstat = --avoid=3Dmalloc-posix --avoid=3Dmsvc-inval --avoid=3Dmsvc-nothrow --avoi= d=3Dopen --avoid=3Dopenat-die --avoid=3Dopendir --avoid=3Draise --avoid=3D= save-cwd --avoid=3Dselect --avoid=3Dsigprocmask --avoid=3Dstdarg --avoid=3D= stdbool --avoid=3Dthreadlib --makefile-name=3Dgnulib.mk --conditional-dep= endencies --no-libtool --macro-prefix=3Dgl --no-vc-files alloca-opt binar= y-io byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits = count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 d= toastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasyn= c fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeo= fday gitlog-to-changelog intprops largefile lstat manywarnings memrchr mk= ostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlink= at sig2str socklen stat-time stdalign stddef stdio stpcpy strftime strtoi= max strtoumax symlink sys_stat sys_time time time_r timer-time timespec-a= dd timespec-sub unsetenv update-copyright utimens vla warnings =20 =20 MOSTLYCLEANFILES +=3D core *.stackdump @@ -539,6 +539,13 @@ EXTRA_libgnu_a_SOURCES +=3D gettimeofday.c =20 ## end gnulib module gettimeofday =20 +## begin gnulib module gitlog-to-changelog + + +EXTRA_DIST +=3D $(top_srcdir)/build-aux/gitlog-to-changelog + +## end gnulib module gitlog-to-changelog + ## begin gnulib module group-member =20 if gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1 diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index 452a672..da5d85e 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -39,7 +39,7 @@ =20 ;;; History: =20 -;; 0.07 onwards: see lisp/ChangeLog +;; 0.07 onwards: see commit logs and ../ChangeLog*. =20 ;; 0.06: (2004-10-06) ;; - Bugfixes regarding icalendar-import-format-*. diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el index 00d1ee9..331b99b 100644 --- a/lisp/gnus/deuglify.el +++ b/lisp/gnus/deuglify.el @@ -188,7 +188,7 @@ ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;; -;; See ChangeLog for other changes. +;; See commit log for other changes. ;; ;; Revision 1.5 2002/01/27 14:39:17 rscholz ;; * New variable `gnus-outlook-deuglify-no-wrap-chars' to inhibit diff --git a/lisp/obsolete/gulp.el b/lisp/obsolete/gulp.el index 5ff99f2..f0223fa 100644 --- a/lisp/obsolete/gulp.el +++ b/lisp/obsolete/gulp.el @@ -70,7 +70,7 @@ please send them to me ASAP. Please don't send the whole file. Instead, please send a patch made wit= h `diff -c' that shows precisely the changes you would like me to install.= Also please include itemized change log entries for your changes; -please use lisp/ChangeLog as a guide for the style and for what kinds +please use lisp/ChangeLog* as a guide for the style and for what kinds of information to include. =20 Thanks.") diff --git a/lwlib/README b/lwlib/README index 25c72eb..ed7583d 100644 --- a/lwlib/README +++ b/lwlib/README @@ -4,4 +4,4 @@ library was written by Lucid, Inc and released under the = terms of the GPL version 1 (or later). It is not considered part of GNU Emacs. =20 This version of the library differs from the original as described in -the ChangeLog file. +the ChangeLog.1 file. diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index 949dd0e..f32a4dd 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -85,6 +85,7 @@ AC_DEFUN([gl_EARLY], # Code from module gettext-h: # Code from module gettime: # Code from module gettimeofday: + # Code from module gitlog-to-changelog: # Code from module group-member: # Code from module include_next: # Code from module intprops: @@ -810,6 +811,7 @@ AC_DEFUN([gltests_LIBSOURCES], [ # This macro records the list of files which have been installed by # gnulib-tool and may be removed by future gnulib-tool invocations. AC_DEFUN([gl_FILE_LIST], [ + build-aux/gitlog-to-changelog build-aux/snippet/_Noreturn.h build-aux/snippet/arg-nonnull.h build-aux/snippet/c++defs.h diff --git a/make-dist b/make-dist index 4e05594..1c7ce59 100755 --- a/make-dist +++ b/make-dist @@ -277,13 +277,20 @@ fi echo "Creating top directory: \`${tempdir}'" mkdir ${tempdir} =20 +if test -d .git; then + echo "Making top-level ChangeLog" + make distprefix=3D${tempdir}/ ChangeLog +else + echo "No repository, so omitting top-level ChangeLog" +fi + ### We copy in the top-level files before creating the subdirectories in= ### hopes that this will make the top-level files appear first in the ### tar file; this means that people can start reading the INSTALL and ### README while the rest of the tar file is still unpacking. Whoopee. echo "Making links to top-level files" ln INSTALL README BUGS ${tempdir} -ln ChangeLog Makefile.in autogen.sh configure configure.ac ${tempdir} +ln ChangeLog.*[0-9] Makefile.in autogen.sh configure configure.ac ${temp= dir} ln config.bat make-dist .dir-locals.el ${tempdir} ln aclocal.m4 ${tempdir} =20 @@ -333,7 +340,7 @@ done echo "Making links to \`leim' and its subdirectories" (cd leim ln makefile.w32-in ../${tempdir}/leim - ln ChangeLog README ../${tempdir}/leim + ln ChangeLog.*[0-9] README ../${tempdir}/leim ln CXTERM-DIC/README CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC ln SKK-DIC/README SKK-DIC/SKK-JISYO.L ../${tempdir}/leim/SKK-DIC ln MISC-DIC/README MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC @@ -344,6 +351,7 @@ echo "Making links to \`leim' and its subdirectories"= echo "Making links to \`build-aux'" (cd build-aux ln compile config.guess config.sub depcomp msys-to-w32 ../${tempdir}/bu= ild-aux + ln gitlog-to-changelog gitlog-to-emacslog ../${tempdir}/build-aux ln install-sh missing move-if-change ../${tempdir}/build-aux ln update-copyright update-subdirs ../${tempdir}/build-aux ln dir_top make-info-dir ../${tempdir}/build-aux) @@ -360,7 +368,7 @@ echo "Making links to \`src'" ln [a-zA-Z]*.[chm] ../${tempdir}/src ln [a-zA-Z]*.in ../${tempdir}/src ln [a-zA-Z]*.mk ../${tempdir}/src - ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src + ln README ChangeLog.*[0-9] ../${tempdir}/src ln makefile.w32-in ../${tempdir}/src ln .gdbinit .dbxinit ../${tempdir}/src cd ../${tempdir}/src @@ -382,7 +390,7 @@ echo "Making links to \`lib'" echo "Making links to \`lib-src'" (cd lib-src ln [a-zA-Z]*.[ch] ../${tempdir}/lib-src - ln ChangeLog Makefile.in README ../${tempdir}/lib-src + ln ChangeLog.*[0-9] Makefile.in README ../${tempdir}/lib-src ln rcs2log ../${tempdir}/lib-src ln makefile.w32-in ../${tempdir}/lib-src ln update-game-score.exe.manifest ../${tempdir}/lib-src) @@ -398,7 +406,7 @@ echo "Making links to \`nt'" ln nmake.defs gmake.defs subdirs.el [a-z]*.bat [a-z]*.[ch] ../${tempdir= }/nt ln *.in gnulib.mk ../${tempdir}/nt ln mingw-cfg.site epaths.nt INSTALL.OLD ../${tempdir}/nt - ln ChangeLog INSTALL README README.W32 makefile.w32-in ../${tempdir}/nt= ) + ln ChangeLog.*[0-9] INSTALL README README.W32 makefile.w32-in ../${temp= dir}/nt) =20 echo "Making links to \`nt/inc' and its subdirectories" for f in `find nt/inc -type f -name '[a-z]*.h'`; do @@ -412,13 +420,13 @@ echo "Making links to \`nt/icons'" =20 echo "Making links to \`msdos'" (cd msdos - ln ChangeLog INSTALL README emacs.ico emacs.pif ../${tempdir}/msdos + ln ChangeLog.*[0-9] INSTALL README emacs.ico emacs.pif ../${tempdir}/ms= dos ln depfiles.bat inttypes.h ../${tempdir}/msdos ln mainmake.v2 sed*.inp ../${tempdir}/msdos) =20 echo "Making links to \`nextstep'" (cd nextstep - ln ChangeLog README INSTALL Makefile.in ../${tempdir}/nextstep) + ln ChangeLog.*[0-9] README INSTALL Makefile.in ../${tempdir}/nextstep) =20 echo "Making links to \`nextstep/templates'" (cd nextstep/templates @@ -439,12 +447,12 @@ echo "Making links to \`nextstep/GNUstep/Emacs.base= /Resources'" echo "Making links to \`oldXMenu'" (cd oldXMenu ln *.[ch] *.in *.mk ../${tempdir}/oldXMenu - ln README ChangeLog ../${tempdir}/oldXMenu) + ln README ChangeLog.*[0-9] ../${tempdir}/oldXMenu) =20 echo "Making links to \`lwlib'" (cd lwlib ln *.[ch] *.in *.mk ../${tempdir}/lwlib - ln README ChangeLog ../${tempdir}/lwlib) + ln README ChangeLog.*[0-9] ../${tempdir}/lwlib) =20 ## It is important to distribute admin/ because it contains sources ## for generated lisp/international/uni-*.el files. @@ -484,27 +492,29 @@ ln `find info -type f -print` ${tempdir}/info =20 echo "Making links to \`doc/emacs'" (cd doc/emacs - ln *.texi *.in makefile.w32-in ChangeLog* ../../${tempdir}/doc/emacs) + ln *.texi *.in makefile.w32-in ChangeLog.*[0-9] ../../${tempdir}/doc/em= acs) =20 echo "Making links to \`doc/misc'" (cd doc/misc - ln *.texi *.tex *.in makefile.w32-in gnus-news.el ChangeLog* ../../${te= mpdir}/doc/misc) + ln *.texi *.tex *.in makefile.w32-in gnus-news.el ChangeLog.*[0-9] \ + ../../${tempdir}/doc/misc) =20 echo "Making links to \`doc/lispref'" (cd doc/lispref - ln *.texi *.in makefile.w32-in README ChangeLog* ../../${tempdir}/doc/l= ispref + ln *.texi *.in makefile.w32-in README ChangeLog.*[0-9] \ + ../../${tempdir}/doc/lispref ln spellfile ../../${tempdir}/doc/lispref ln two-volume.make two-volume-cross-refs.txt ../../${tempdir}/doc/lispr= ef) =20 echo "Making links to \`doc/lispintro'" (cd doc/lispintro ln *.texi *.in makefile.w32-in *.eps *.pdf ../../${tempdir}/doc/lispint= ro - ln README ChangeLog* ../../${tempdir}/doc/lispintro + ln README ChangeLog.*[0-9] ../../${tempdir}/doc/lispintro cd ../../${tempdir}/doc/lispintro) =20 echo "Making links to \`doc/man'" (cd doc/man - ln ChangeLog* *.1 *.in ../../${tempdir}/doc/man + ln *.*[0-9] *.in ../../${tempdir}/doc/man cd ../../${tempdir}/doc/man rm -f emacs.1) =20 --=20 2.1.0 --------------070702080408040003070108--