* bug#19113: Generate a ChangeLog file from commit logs @ 2014-11-19 23:57 Paul Eggert 2014-11-20 15:51 ` Eli Zaretskii ` (3 more replies) 0 siblings, 4 replies; 85+ messages in thread From: Paul Eggert @ 2014-11-19 23:57 UTC (permalink / raw) To: 19113 [-- Attachment #1: Type: text/plain, Size: 1202 bytes --] Tags: patch Attached are two patches to change the Emacs repository so that the distributed ChangeLog file is generated automatically from commit logs, instead of being maintained manually. The first patch renames every ChangeLog file to ChangeLog.1 (or whatever) to get it out of the way -- that is, all existing ChangeLog files are retained in the repository as before. The second patch arranges for the new ChangeLog file to be generated automatically from future commit messages. The idea is that developers should continue to write commit messages in ChangeLog style, so the automatic generation is straightforward, but they needn't record their commit messages in ChangeLog files. This approach was developed by Jim Meyering is used by several other GNU packages. This is a first cut, and no doubt could be improved for Emacs, but I thought I'd start the ball rolling by publishing something that works for me. These patches are relative to emacs-24 commit cd2e816 <2014-11-19T19:29:40Z!eggert@cs.ucla.edu>. PS. The first patch would be about 12 MB, so I'm attaching an abbreviated summary of it instead of the actual patch; it can be reproduced using the summary's recipe. [-- Attachment #2: 0001-Rename-old-ChangeLog-files-to-prepare-for-gitlog-to-.patch --] [-- Type: text/x-diff, Size: 4876 bytes --] From 5548379456ab22278511262e96f7938e24878e1f Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> Date: Tue, 18 Nov 2014 20:27:43 -0800 Subject: [PATCH 1/2] Rename old ChangeLog files to prepare for gitlog-to-changelog. --- ChangeLog | 13646 ------------------ ChangeLog.1 | 13646 ++++++++++++++++++ admin/ChangeLog | 2267 --- admin/ChangeLog.1 | 2267 +++ doc/emacs/ChangeLog | 10750 --------------- doc/emacs/ChangeLog.1 | 10750 +++++++++++++++ doc/lispintro/ChangeLog | 763 -- doc/lispintro/ChangeLog.1 | 763 ++ doc/lispref/ChangeLog | 13400 ------------------ doc/lispref/ChangeLog.1 | 13400 ++++++++++++++++++ doc/man/ChangeLog | 183 - doc/man/ChangeLog.1 | 183 + doc/misc/ChangeLog | 11781 ---------------- doc/misc/ChangeLog.1 | 11781 ++++++++++++++++ etc/ChangeLog | 6547 --------- etc/ChangeLog.1 | 6547 +++++++++ leim/ChangeLog | 2557 ---- leim/ChangeLog.1 | 2557 ++++ lib-src/ChangeLog | 8258 ----------- lib-src/ChangeLog.1 | 8258 +++++++++++ lisp/ChangeLog | 16532 ---------------------- lisp/ChangeLog.17 | 16532 ++++++++++++++++++++++ lisp/cedet/ChangeLog | 3088 ----- lisp/cedet/ChangeLog.1 | 3088 +++++ lisp/erc/ChangeLog | 721 - lisp/erc/ChangeLog.09 | 721 + lisp/gnus/ChangeLog | 25527 ---------------------------------- lisp/gnus/ChangeLog.3 | 25527 ++++++++++++++++++++++++++++++++++ lisp/mh-e/ChangeLog | 3692 ----- lisp/mh-e/ChangeLog.2 | 3692 +++++ lisp/org/ChangeLog | 32802 -------------------------------------------- lisp/org/ChangeLog.1 | 32802 ++++++++++++++++++++++++++++++++++++++++++++ lisp/url/ChangeLog | 2970 ---- lisp/url/ChangeLog.1 | 2970 ++++ lwlib/ChangeLog | 1878 --- lwlib/ChangeLog.1 | 1878 +++ msdos/ChangeLog | 1553 --- msdos/ChangeLog.1 | 1553 +++ nextstep/ChangeLog | 299 - nextstep/ChangeLog.1 | 299 + nt/ChangeLog | 3443 ----- nt/ChangeLog.1 | 3443 +++++ oldXMenu/ChangeLog | 684 - oldXMenu/ChangeLog.1 | 684 + src/ChangeLog | 11230 --------------- src/ChangeLog.13 | 11230 +++++++++++++++ test/ChangeLog | 1972 --- test/ChangeLog.1 | 1972 +++ 48 files changed, 176543 insertions(+), 176543 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 actual patch is about 12 MB and is elided here. The following shell commands implement the patch: 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'Rename old ChangeLog files to prepare for gitlog-to-changelog.' ] [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #3: 0002-Generate-a-ChangeLog-file-from-commit-logs.patch --] [-- Type: text/x-diff; name="0002-Generate-a-ChangeLog-file-from-commit-logs.patch", Size: 29830 bytes --] From 1afc98cadae8b14e1b123765463403df4947811a Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> Date: Wed, 19 Nov 2014 14:41:42 -0800 Subject: [PATCH 2/2] Generate a ChangeLog file from commit logs. Instead of having a ChangeLog file or files in the repository, generate the ChangeLog file automatically from the git commit logs, as part of the process of making a distribution. The new procedure has been tested with vc-dwim, and this commit was generated by vc-dwim. Also, 'make dist woriks'. However, I haven't tested other ways to create change log entries nor have I tested the entire release process, and no doubt further work is needed. * .gitignore: Add ChangeLog. * Makefile.in (gen_start_date): New macro. (gen-ChangeLog): New rule. * admin/admin.el (make-manuals-dist--1): Don't treat ChangeLog specially. * admin/merge-gnulib (GNULIB_MODULES): Add gitlog-to-changelog. * admin/notes/repo: Add note about vc-dwim. * admin/admin.el (add-release-logs, make-manuals-dist--1): * admin/make-tarball.txt, admin/notes/bugtracker: * lisp/emacs-lisp/authors.el: Add a FIXME comment. * build-aux/gitlog-to-changelog: New file, from Gnulib. * lisp/calendar/icalendar.el, lisp/gnus/deuglify.el: * lisp/emacs-lisp/gulp.el, lwlib/README, make-dist: Adjust to renamed old ChangeLog files. * make-dist: Use 'make gen-ChangeLog' to build top-level ChangeLog in the distribution. --- .gitignore | 1 + Makefile.in | 15 ++ admin/admin.el | 9 +- admin/make-tarball.txt | 4 + admin/merge-gnulib | 2 +- admin/notes/bugtracker | 3 +- admin/notes/repo | 13 +- build-aux/gitlog-to-changelog | 432 ++++++++++++++++++++++++++++++++++++++++++ lisp/calendar/icalendar.el | 4 +- lisp/emacs-lisp/authors.el | 5 +- lisp/emacs-lisp/gulp.el | 2 +- lisp/gnus/deuglify.el | 2 +- lwlib/README | 2 +- make-dist | 26 ++- 14 files changed, 497 insertions(+), 23 deletions(-) create mode 100755 build-aux/gitlog-to-changelog diff --git a/.gitignore b/.gitignore index a35ab93..53e3427 100644 --- a/.gitignore +++ b/.gitignore @@ -177,6 +177,7 @@ info/dir .#* # Git output. +ChangeLog [0-9]*.patch # Distribution directories. diff --git a/Makefile.in b/Makefile.in index 4391c2c..b122d80 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1100,6 +1100,21 @@ bootstrap: bootstrap-clean FRC $(MAKE) $(MFLAGS) MAKEFILE_NAME=force-Makefile force-Makefile $(MAKE) $(MFLAGS) info all +# Convert git commit log to ChangeLog file. make-dist uses this. +gen_start_date = 2014-11-18 +.PHONY: gen-ChangeLog +gen-ChangeLog: + $(AM_V_GEN)if test -d .git; then \ + log_fix="$(srcdir)/build-aux/git-log-fix"; \ + test -e "$$log_fix" \ + && amend_git_log="--amend=$$log_fix" \ + || amend_git_log=; \ + $(srcdir)/build-aux/gitlog-to-changelog \ + $$amend_git_log --since=$(gen_start_date) > $(distdir)/cl-t && \ + { rm -f $(distdir)/ChangeLog && \ + mv $(distdir)/cl-t $(distdir)/ChangeLog; } \ + fi + .PHONY: check-declare check-declare: diff --git a/admin/admin.el b/admin/admin.el index 48e083d..d3aa583 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -28,10 +28,9 @@ (defvar add-log-time-format) ; in add-log -;; 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 +;; FIXME: Update this in the light of the fact that there's only +;; one ChangeLog file now, at the top level, and it's generated from +;; commit logs by 'make-dist'. (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. @@ -650,7 +649,7 @@ style=\"text-align:left\">") (copy-file "../doc/misc/texinfo.tex" stem) (or (equal type "emacs") (copy-file "../doc/emacs/emacsver.texi" stem)) (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/make-tarball.txt b/admin/make-tarball.txt index 9603c61..c080014 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -2,6 +2,10 @@ Instructions to create pretest or release tarballs. -*- coding: utf-8 -*- -- originally written by Gerd Moellmann, amended by Francesco Potortì with the initial help of Eli Zaretskii +FIXME: There is now just one ChangeLog file, at the top level, +generated automatically from commit logs by 'make-dist'. The +procedure below needs to be updated accordingly. + Steps to take before starting on the first pretest in any release sequence: diff --git a/admin/merge-gnulib b/admin/merge-gnulib index 6c0dffb..dc33349 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib @@ -31,7 +31,7 @@ GNULIB_MODULES=' 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/bugtracker b/admin/notes/bugtracker index fd7bd08..9d03798 100644 --- a/admin/notes/bugtracker +++ b/admin/notes/bugtracker @@ -481,7 +481,8 @@ can see exactly what the fix was. *** bug-reference-mode Activate `bug-reference-mode' in ChangeLogs to get clickable links to -the bug web-pages. +the bug web-pages. FIXME: This may need to be updated in the light of +the new policy of just one ChangeLog, at the top level. *** Debian stuff diff --git a/admin/notes/repo b/admin/notes/repo index 46a9e08..d077896 100644 --- a/admin/notes/repo +++ b/admin/notes/repo @@ -37,6 +37,16 @@ NEWS, MAINTAINERS, and FOR-RELEASE, or to indicate regeneration of files such as 'configure'. "There is no need" means you don't have to, but you can if you want to. +** Using vc-dwim to maintain commit messages + +You can use vc-dwim to maintain commit messages in ChangeLog format. +When you create a source directory FOO, run the shell command 'cd FOO; +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 add-change-log-entry-other-window, and commit the change +using the shell command 'cd FOO; vc-dwim'. Type 'vc-dwim --help' for +more info. + * Commit to the right branch Development normally takes places on the trunk. @@ -132,7 +142,8 @@ http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00262.html * How to merge changes from emacs-24 to trunk -[The section on git merge procedure has not yet been written] +[The section on git merge procedure has not yet been written. +Among other things, the ChangeLog file is now automatically generated.] Inspect the change log entries (e.g. in case too many entries have been included or whitespace between entries needs fixing). If someone made diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog new file mode 100755 index 0000000..78afff4 --- /dev/null +++ b/build-aux/gitlog-to-changelog @@ -0,0 +1,432 @@ +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 = '2012-07-29 06:11'; # 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-2014 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 <http://www.gnu.org/licenses/>. + +# Written by Jim Meyering + +use strict; +use warnings; +use Getopt::Long; +use POSIX qw(strftime); + +(my $ME = $0) =~ 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"; + $? ||= 1; +} + +sub usage ($) +{ + my ($exit_code) = @_; + my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); + if ($exit_code != 0) + { + print $STREAM "Try '$ME --help' for more information.\n"; + } + else + { + print $STREAM <<EOF; +Usage: $ME [OPTIONS] [ARGS] + +Convert git log output to ChangeLog format. If present, any ARGS +are passed to "git log". To avoid ARGS being parsed as options to +$ME, they may be preceded by '--'. + +OPTIONS: + + --amend=FILE FILE maps from an SHA1 to perl code (i.e., s/old/new/) that + makes a change to SHA1's commit log text or metadata. + --append-dot append a dot to the first line of each commit message if + there is no other punctuation or blank at the end. + --no-cluster never cluster commit messages under the same date/author + header; the default is to cluster adjacent commit messages + if their headers are the same and neither commit message + contains multiple paragraphs. + --srcdir=DIR the root of the source tree, from which the .git/ + directory can be derived. + --since=DATE convert only the logs since DATE; + the default is to convert all log entries. + --format=FMT set format string for commit subject and body; + see 'man git-log' for the list of format metacharacters; + the default is '%s%n%b%n' + --strip-tab remove one additional leading TAB from commit message lines. + --strip-cherry-pick remove data inserted by "git cherry-pick"; + this includes the "cherry picked from commit ..." line, + and the possible final "Conflicts:" paragraph. + --help display this help and exit + --version output version information and exit + +EXAMPLE: + + $ME --since=2008-01-01 > ChangeLog + $ME -- -n 5 foo > last-5-commits-to-branch-foo + +SPECIAL SYNTAX: + +The following types of strings are interpreted specially when they appear +at the beginning of a log message line. They are not copied to the output. + + 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 <user\@example.com> + List the specified name and email address on a second + ChangeLog header, denoting a co-author. + Signed-off-by: Joe User <user\@example.com> + These lines are simply elided. + +In a FILE specified via --amend, comment lines (starting with "#") are ignored. +FILE must consist of <SHA,CODE+> 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. + +Here is sample input for use with --amend=FILE, 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 <eggert\\\@cs.ucla.edu>, + +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) = @_; + if ($s =~ m![^\w+/.,-]!) + { + # Convert each single quote to '\'' + $s =~ s/\'/\'\\\'\'/g; + # Then single quote the string. + $s = "'$s'"; + } + return $s; +} + +sub quoted_cmd(@) +{ + return join (' ', map {shell_quote $_} @_); +} + +# Parse file F. +# Comment lines (starting with "#") are ignored. +# F must consist of <SHA,CODE+> 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) = @_; + + open F, '<', $f + or die "$ME: $f: failed to open for reading: $!\n"; + + my $fail; + my $h = {}; + my $in_code = 0; + my $sha; + while (defined (my $line = <F>)) + { + $line =~ /^\#/ + and next; + chomp $line; + $line eq '' + and $in_code = 0, next; + + if (!$in_code) + { + $line =~ /^([0-9a-fA-F]{40})$/ + or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), + $fail = 1, next; + $sha = lc $1; + $in_code = 1; + exists $h->{$sha} + and (warn "$ME: $f:$.: duplicate SHA1\n"), + $fail = 1, next; + } + else + { + $h->{$sha} ||= ''; + $h->{$sha} .= "$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) = @_; + my @res = (); + if (defined $srcdir) + { + my $qdir = shell_quote $srcdir; + my $cmd = "cd $qdir && git rev-parse --show-toplevel"; + my $qcmd = shell_quote $cmd; + my $git_dir = qx($cmd); + defined $git_dir + or die "$ME: cannot run $qcmd: $!\n"; + $? == 0 + or die "$ME: $qcmd had unexpected exit code or signal ($?)\n"; + chomp $git_dir; + push @res, "--git-dir=$git_dir/.git"; + } + @res; +} + +{ + my $since_date; + my $format_string = '%s%n%b%n'; + my $amend_file; + my $append_dot = 0; + my $cluster = 1; + my $strip_tab = 0; + my $strip_cherry_pick = 0; + my $srcdir; + GetOptions + ( + help => sub { usage 0 }, + version => sub { print "$ME version $VERSION\n"; exit }, + 'since=s' => \$since_date, + 'format=s' => \$format_string, + 'amend=s' => \$amend_file, + 'append-dot' => \$append_dot, + 'cluster!' => \$cluster, + 'strip-tab' => \$strip_tab, + 'strip-cherry-pick' => \$strip_cherry_pick, + 'srcdir=s' => \$srcdir, + ) or usage 1; + + defined $since_date + and unshift @ARGV, "--since=$since_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 = defined $amend_file ? parse_amend_file $amend_file : {}; + + my @cmd = ('git', + git_dir_option $srcdir, + qw(log --log-size), + '--pretty=format:%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.)\n"); + + my $prev_multi_paragraph; + my $prev_date_line = ''; + my @prev_coauthors = (); + while (1) + { + defined (my $in = <PIPE>) + or last; + $in =~ /^log size (\d+)$/ + or die "$ME:$.: Invalid line (expected log size):\n$in"; + my $log_nbytes = $1; + + my $log; + my $n_read = read PIPE, $log, $log_nbytes; + $n_read == $log_nbytes + or die "$ME:$.: unexpected EOF\n"; + + # Extract leading hash. + my ($sha, $rest) = split ':', $log, 2; + defined $sha + or die "$ME:$.: malformed log entry\n"; + $sha =~ /^[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 = $amend_code->{$sha}; + if (defined $code) + { + eval 'use Safe'; + my $s = new Safe; + # Put the unpreprocessed entry into "$_". + $_ = $rest; + + # Let $code operate on it, safely. + my $r = $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 = $_; + } + + # Remove lines inserted by "git cherry-pick". + if ($strip_cherry_pick) + { + $rest =~ s/^\s*Conflicts:\n.*//sm; + $rest =~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m; + } + + my @line = split "\n", $rest; + my $author_line = shift @line; + defined $author_line + or die "$ME:$.: unexpected EOF\n"; + $author_line =~ /^(\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 = (grep (/^Copyright-paperwork-exempt:\s+[Yy]es$/, @line) + ? ' (tiny change)' : ''); + + my $date_line = sprintf "%s %s$tiny\n", + strftime ("%F", localtime ($1)), $2; + + my @coauthors = grep /^Co-authored-by:.*$/, @line; + # Omit meta-data lines we've already interpreted. + @line = grep !/^(?:Signed-off-by:[ ].*>$ + |Co-authored-by:[ ] + |Copyright-paperwork-exempt:[ ] + )/x, @line; + + # Remove leading and trailing blank lines. + if (@line) + { + while ($line[0] =~ /^\s*$/) { shift @line; } + while ($line[$#line] =~ /^\s*$/) { pop @line; } + } + + # Record whether there are two or more paragraphs. + my $multi_paragraph = grep /^\s*$/, @line; + + # Format 'Co-authored-by: A U Thor <email@example.com>' 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/email/coauthors header, + # or if this or the previous entry consists of two or more paragraphs, + # 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 = $date_line; + @prev_coauthors = @coauthors; + $prev_multi_paragraph = $multi_paragraph; + + # If there were any lines + if (@line == 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, then + if (length $line[0] < 72) + { + # append a dot if there is no other punctuation or blank + # at the end. + $line[0] =~ /[[:punct:]\s]$/ + or $line[0] .= '.'; + } + } + + # Remove one additional leading TAB from each line. + $strip_tab + and map { s/^\t// } @line; + + # Prefix each non-empty line with a TAB. + @line = map { length $_ ? "\t$_" : '' } @line; + + print "\n", join ("\n", @line), "\n"; + } + + defined ($in = <PIPE>) + 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=F specified file. + my $fail = 0; + foreach my $sha (keys %$amend_code) + { + warn "$ME:$amend_file: unused entry: $sha\n"; + $fail = 1; + } + + exit $fail; +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "my $VERSION = '" +# time-stamp-format: "%:y-%02m-%02d %02H:%02M" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "'; # UTC" +# End: diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index 4ba4869..18aeb61 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -39,7 +39,7 @@ ;;; History: -;; 0.07 onwards: see lisp/ChangeLog +;; 0.07 onwards: see commit logs and ../ChangeLog*. ;; 0.06: (2004-10-06) ;; - Bugfixes regarding icalendar-import-format-*. @@ -1047,7 +1047,7 @@ FExport diary data into iCalendar file: ") (setq header (concat "\nBEGIN:VEVENT\nUID:" (or uid - (icalendar--create-uid entry-full + (icalendar--create-uid entry-full contents))))) (setq result (concat result header contents "\nEND:VEVENT"))) ;; handle errors diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el index 51bd415..c53feee 100644 --- a/lisp/emacs-lisp/authors.el +++ b/lisp/emacs-lisp/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. +;; FIXME: This needs to modernized in the light of current practice, +;; which generates a single top-level ChangeLog file from commit logs. + ;;; Code: (defvar authors-coding-system 'utf-8 @@ -75,7 +78,7 @@ files.") ("Gerd Möllmann" "Gerd Moellmann") ("Hallvard B. Furuseth" "Hallvard B Furuseth" "Hallvard Furuseth") ("Hrvoje Nikšić" "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/lisp/emacs-lisp/gulp.el b/lisp/emacs-lisp/gulp.el index d0a89b3..2d0314b 100644 --- a/lisp/emacs-lisp/gulp.el +++ b/lisp/emacs-lisp/gulp.el @@ -69,7 +69,7 @@ please send them to me ASAP. Please don't send the whole file. Instead, please send a patch made with `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. Thanks.") diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el index 7a0f613..a28a255 100644 --- a/lisp/gnus/deuglify.el +++ b/lisp/gnus/deuglify.el @@ -188,7 +188,7 @@ ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; -;; See ChangeLog for other changes. +;; See commit log or ChangeLog* 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/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. This version of the library differs from the original as described in -the ChangeLog file. +the ChangeLog.1 file. diff --git a/make-dist b/make-dist index aed5b17..ab3b6e4 100755 --- a/make-dist +++ b/make-dist @@ -278,13 +278,20 @@ fi echo "Creating top directory: \`${tempdir}'" mkdir ${tempdir} +if test -d .git; then + echo "Making top-level ChangeLog" + make distdir=${tempdir} gen-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 ${tempdir} ln config.bat make-dist .dir-locals.el ${tempdir} ln aclocal.m4 ${tempdir} @@ -334,7 +341,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 @@ -345,6 +352,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}/build-aux + ln gitlog-to-changelog ../${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) @@ -361,7 +369,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 @@ -383,7 +391,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 testfile ../${tempdir}/lib-src + ln ChangeLog.*[0-9] Makefile.in README testfile ../${tempdir}/lib-src ln grep-changelog rcs2log ../${tempdir}/lib-src ln makefile.w32-in ../${tempdir}/lib-src ln update-game-score.exe.manifest ../${tempdir}/lib-src) @@ -399,7 +407,7 @@ echo "Making links to \`nt'" ln nmake.defs gmake.defs subdirs.el [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt ln Makefile.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 ../${tempdir}/nt) echo "Making links to \`nt/inc' and its subdirectories" for f in `find nt/inc -type f -name '[a-z]*.h'`; do @@ -413,13 +421,13 @@ echo "Making links to \`nt/icons'" 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}/msdos ln depfiles.bat inttypes.h ../${tempdir}/msdos ln is_exec.c sigaction.c mainmake.v2 sed*.inp ../${tempdir}/msdos) 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) echo "Making links to \`nextstep/templates'" (cd nextstep/templates @@ -440,12 +448,12 @@ echo "Making links to \`nextstep/GNUstep/Emacs.base/Resources'" echo "Making links to \`oldXMenu'" (cd oldXMenu ln *.[ch] *.in ../${tempdir}/oldXMenu - ln README ChangeLog ../${tempdir}/oldXMenu) + ln README ChangeLog.*[0-9] ../${tempdir}/oldXMenu) echo "Making links to \`lwlib'" (cd lwlib ln *.[ch] *.in ../${tempdir}/lwlib - ln README ChangeLog ../${tempdir}/lwlib) + ln README ChangeLog.*[0-9] ../${tempdir}/lwlib) ## It is important to distribute admin/ because it contains sources ## for generated lisp/international/uni-*.el files. -- 1.9.3 ^ permalink raw reply related [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-11-19 23:57 bug#19113: Generate a ChangeLog file from commit logs Paul Eggert @ 2014-11-20 15:51 ` Eli Zaretskii 2014-11-20 17:43 ` Paul Eggert ` (2 more replies) 2014-11-20 17:25 ` Pádraig Brady ` (2 subsequent siblings) 3 siblings, 3 replies; 85+ messages in thread From: Eli Zaretskii @ 2014-11-20 15:51 UTC (permalink / raw) To: Paul Eggert; +Cc: 19113 > Date: Wed, 19 Nov 2014 15:57:41 -0800 > From: Paul Eggert <eggert@cs.ucla.edu> > > Attached are two patches to change the Emacs repository so that the distributed > ChangeLog file is generated automatically from commit logs, instead of being > maintained manually. The first patch renames every ChangeLog file to > ChangeLog.1 (or whatever) to get it out of the way -- that is, all existing > ChangeLog files are retained in the repository as before. The second patch > arranges for the new ChangeLog file to be generated automatically from future > commit messages. The idea is that developers should continue to write commit > messages in ChangeLog style, so the automatic generation is straightforward, but > they needn't record their commit messages in ChangeLog files. This approach was > developed by Jim Meyering is used by several other GNU packages. > > This is a first cut, and no doubt could be improved for Emacs, but I thought I'd > start the ball rolling by publishing something that works for me. What's the plan for preventing the generated ChangeLog file from becoming too large? Currently, we roll them over to keep the file below 1MB. I looked at Coreutils. They started using a generated file in 2008. Now, after 6 years, the ChangeLog is over 1MB in size. Emacs's commit rate is about 12 times higher than that of Coreutils, so we will hit that mark in about 6 months. What then? gitlog-to-changelog doesn't have provisions for rolling over, and cannot be told to stop at a given date. ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-11-20 15:51 ` Eli Zaretskii @ 2014-11-20 17:43 ` Paul Eggert 2014-11-20 17:44 ` Paul Eggert 2014-11-20 18:00 ` Achim Gratz 2 siblings, 0 replies; 85+ messages in thread From: Paul Eggert @ 2014-11-20 17:43 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 19113 [-- Attachment #1: Type: text/plain, Size: 415 bytes --] On 11/20/2014 07:51 AM, Eli Zaretskii wrote: > What's the plan for preventing the generated ChangeLog file from > becoming too large? I added an --until option to gitlog-to-changelog so that we can generate a set of ChangeLogs rather than a single ChangeLog. We can uses this once we want to generate multiple ChangeLogs. I'll CC: this email to bug-gnulib since the source belongs to gnulib. Patch attached. [-- Attachment #2: 0001-gitlog-to-changelog-add-until.patch --] [-- Type: text/x-patch, Size: 2707 bytes --] From 44545ded16ccb5985107c02ab0c9effedc9b0b0c Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> Date: Thu, 20 Nov 2014 09:29:35 -0800 Subject: [PATCH] gitlog-to-changelog: add --until * build-aux/gitlog-to-changelog: Support new --until option. Need described by Eli Zaretskii in: http://bugs.gnu.org/19113 --- ChangeLog | 6 ++++++ build-aux/gitlog-to-changelog | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 16dc620..8473384 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-11-20 Paul Eggert <eggert@cs.ucla.edu> + + gitlog-to-changelog: add --until + * build-aux/gitlog-to-changelog: Support new --until option. + Need described by Eli Zaretskii in: http://bugs.gnu.org/19113 + 2014-11-14 Paul Eggert <eggert@cs.ucla.edu> extern-inline: update commentary about GCC bugs diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog index 78afff4..190f7b5 100755 --- a/build-aux/gitlog-to-changelog +++ b/build-aux/gitlog-to-changelog @@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' if 0; # Convert git log output to ChangeLog format. -my $VERSION = '2012-07-29 06:11'; # UTC +my $VERSION = '2014-11-20 17:25'; # 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 @@ -72,6 +72,7 @@ OPTIONS: directory can be derived. --since=DATE convert only the logs since DATE; the default is to convert all log entries. + --until=DATE convert only the logs older than DATE. --format=FMT set format string for commit subject and body; see 'man git-log' for the list of format metacharacters; the default is '%s%n%b%n' @@ -220,6 +221,7 @@ sub git_dir_option($) { my $since_date; + my $until_date; my $format_string = '%s%n%b%n'; my $amend_file; my $append_dot = 0; @@ -232,6 +234,7 @@ sub git_dir_option($) help => sub { usage 0 }, version => sub { print "$ME version $VERSION\n"; exit }, 'since=s' => \$since_date, + 'until=s' => \$until_date, 'format=s' => \$format_string, 'amend=s' => \$amend_file, 'append-dot' => \$append_dot, @@ -243,6 +246,8 @@ sub git_dir_option($) defined $since_date and unshift @ARGV, "--since=$since_date"; + defined $until_date + and unshift @ARGV, "--until=$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. -- 1.9.3 ^ permalink raw reply related [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-11-20 15:51 ` Eli Zaretskii 2014-11-20 17:43 ` Paul Eggert @ 2014-11-20 17:44 ` Paul Eggert 2014-11-26 5:38 ` Paul Eggert 2014-11-20 18:00 ` Achim Gratz 2 siblings, 1 reply; 85+ messages in thread From: Paul Eggert @ 2014-11-20 17:44 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 19113 On 11/20/2014 07:51 AM, Eli Zaretskii wrote: > Currently, we roll them over to keep the file below 1MB. A 1 MB limit is too low nowadays. Other GNU Emacs source files are as large as 6.8 MB and it's not a problem. I suggest raising the size limit to 32 MB. The issue of size is independent of the mechanism used to enforce it, of course. Here's a more-radical suggestion: combine the existing ChangeLogs (there is about 24 MB worth) into a single ChangeLog.1 file at the top level. That would be under the 32 MB limit. Or, if we prefer a smaller limit, 16 MB say, we can create ChangeLog.1 and ChangeLog.2. This suggestion is independent of the other suggestions. ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-11-20 17:44 ` Paul Eggert @ 2014-11-26 5:38 ` Paul Eggert 2014-11-26 6:21 ` Jan D. 2014-11-26 15:12 ` Stefan Monnier 0 siblings, 2 replies; 85+ messages in thread From: Paul Eggert @ 2014-11-26 5:38 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 19113 [-- Attachment #1: Type: text/plain, Size: 633 bytes --] Paul Eggert wrote: > combine the existing ChangeLogs (there is > about 24 MB worth) into a single ChangeLog.1 file at the top level. I implemented this, along with some other fixes (notably, getting a proper copyright notice into the generated ChangeLog file), and am attaching the corresponding patches. I would like to install this into the emacs-24 branch and then merge that into the master. There are three patches. Patches 1 and 3 are so large that I'm just attaching summaries here. (Patch 1 is essentially the same as before.) You can get the full patches temporarily from here: http://cs.ucla.edu/~eggert/emacs/ [-- Attachment #2: 0001-Rename-old-ChangeLog-files-to-prepare-for-gitlog-to-.patch --] [-- Type: text/x-diff, Size: 4876 bytes --] From 000e1d91eebfae0049fc621cdea82650d9eb041e Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> Date: Tue, 18 Nov 2014 20:27:43 -0800 Subject: [PATCH 1/3] Rename old ChangeLog files to prepare for gitlog-to-changelog. --- ChangeLog | 13680 ------------------ ChangeLog.1 | 13680 ++++++++++++++++++ admin/ChangeLog | 2267 --- admin/ChangeLog.1 | 2267 +++ doc/emacs/ChangeLog | 10750 --------------- doc/emacs/ChangeLog.1 | 10750 +++++++++++++++ doc/lispintro/ChangeLog | 763 -- doc/lispintro/ChangeLog.1 | 763 ++ doc/lispref/ChangeLog | 13400 ------------------ doc/lispref/ChangeLog.1 | 13400 ++++++++++++++++++ doc/man/ChangeLog | 183 - doc/man/ChangeLog.1 | 183 + doc/misc/ChangeLog | 11781 ---------------- doc/misc/ChangeLog.1 | 11781 ++++++++++++++++ etc/ChangeLog | 6547 --------- etc/ChangeLog.1 | 6547 +++++++++ leim/ChangeLog | 2557 ---- leim/ChangeLog.1 | 2557 ++++ lib-src/ChangeLog | 8258 ----------- lib-src/ChangeLog.1 | 8258 +++++++++++ lisp/ChangeLog | 16597 ---------------------- lisp/ChangeLog.17 | 16597 ++++++++++++++++++++++ lisp/cedet/ChangeLog | 3088 ----- lisp/cedet/ChangeLog.1 | 3088 +++++ lisp/erc/ChangeLog | 720 - lisp/erc/ChangeLog.09 | 720 + lisp/gnus/ChangeLog | 25527 ---------------------------------- lisp/gnus/ChangeLog.3 | 25527 ++++++++++++++++++++++++++++++++++ lisp/mh-e/ChangeLog | 3692 ----- lisp/mh-e/ChangeLog.2 | 3692 +++++ lisp/org/ChangeLog | 32802 -------------------------------------------- lisp/org/ChangeLog.1 | 32802 ++++++++++++++++++++++++++++++++++++++++++++ lisp/url/ChangeLog | 2970 ---- lisp/url/ChangeLog.1 | 2970 ++++ lwlib/ChangeLog | 1878 --- lwlib/ChangeLog.1 | 1878 +++ msdos/ChangeLog | 1553 --- msdos/ChangeLog.1 | 1553 +++ nextstep/ChangeLog | 299 - nextstep/ChangeLog.1 | 299 + nt/ChangeLog | 3443 ----- nt/ChangeLog.1 | 3443 +++++ oldXMenu/ChangeLog | 684 - oldXMenu/ChangeLog.1 | 684 + src/ChangeLog | 11241 --------------- src/ChangeLog.13 | 11241 +++++++++++++++ test/ChangeLog | 1983 --- test/ChangeLog.1 | 1983 +++ 48 files changed, 176663 insertions(+), 176663 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 actual patch is about 12 MB and is elided here. The following shell commands implement the patch: 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'Rename old ChangeLog files to prepare for gitlog-to-changelog.' ] [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #3: 0002-Generate-a-ChangeLog-file-from-commit-logs.patch --] [-- Type: text/x-diff; name="0002-Generate-a-ChangeLog-file-from-commit-logs.patch", Size: 30747 bytes --] From 26c6884d2ea40d4c04ceaeb4cf3462e73bb96f5c Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> Date: Wed, 19 Nov 2014 14:41:42 -0800 Subject: [PATCH 2/3] Generate a ChangeLog file from commit logs. Instead of having a ChangeLog file or files in the repository, generate the ChangeLog file automatically from the git commit logs, as part of the process of making a distribution. The new procedure has been tested with vc-dwim, and this commit was generated by vc-dwim. Also, 'make dist woriks'. However, I haven't tested other ways to create change log entries nor have I tested the entire release process, and no doubt further work is needed. * .gitignore: Add ChangeLog. * Makefile.in (gen_origin): New macro. (gen-ChangeLog): New rule. * admin/admin.el (make-manuals-dist--1): Don't treat ChangeLog specially. * admin/merge-gnulib (GNULIB_MODULES): Add gitlog-to-changelog. * admin/notes/repo: Add note about vc-dwim. * admin/admin.el (add-release-logs, make-manuals-dist--1): * admin/make-tarball.txt, admin/notes/bugtracker: * lisp/emacs-lisp/authors.el: Add a FIXME comment. * build-aux/gitlog-to-changelog: New file, from Gnulib. * build-aux/gitlog-to-emacslog: New file. * lisp/calendar/icalendar.el, lisp/gnus/deuglify.el: * lisp/emacs-lisp/gulp.el, lwlib/README, make-dist: Adjust to renamed old ChangeLog files. * make-dist: Use 'make gen-ChangeLog' to build top-level ChangeLog in the distribution. --- .gitignore | 1 + Makefile.in | 8 + admin/admin.el | 9 +- admin/make-tarball.txt | 4 + admin/merge-gnulib | 2 +- admin/notes/bugtracker | 3 +- admin/notes/repo | 13 +- build-aux/gitlog-to-changelog | 432 ++++++++++++++++++++++++++++++++++++++++++ build-aux/gitlog-to-emacslog | 48 +++++ lisp/calendar/icalendar.el | 4 +- lisp/emacs-lisp/authors.el | 5 +- lisp/emacs-lisp/gulp.el | 2 +- lisp/gnus/deuglify.el | 2 +- lwlib/README | 2 +- make-dist | 26 ++- 15 files changed, 538 insertions(+), 23 deletions(-) create mode 100755 build-aux/gitlog-to-changelog create mode 100755 build-aux/gitlog-to-emacslog diff --git a/.gitignore b/.gitignore index 989bbb0..27f3e03 100644 --- a/.gitignore +++ b/.gitignore @@ -230,6 +230,7 @@ info/dir *.rej *~ .#* +ChangeLog [0-9]*.patch # Built by 'make install'. diff --git a/Makefile.in b/Makefile.in index 4391c2c..50477c8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1100,6 +1100,14 @@ bootstrap: bootstrap-clean FRC $(MAKE) $(MFLAGS) MAKEFILE_NAME=force-Makefile force-Makefile $(MAKE) $(MFLAGS) info all +# The first revision to appear in the generated ChangeLog. +gen_origin = 000e1d91eebfae0049fc621cdea82650d9eb041e +# Convert git commit log to ChangeLog file. make-dist uses this. +.PHONY: gen-ChangeLog +gen-ChangeLog: + $(AM_V_GEN)distprefix=$(distprefix) srcprefix=$(srcdir)/ \ + $(srcdir)/build-aux/gitlog-to-emacslog $(gen_origin) + .PHONY: check-declare check-declare: diff --git a/admin/admin.el b/admin/admin.el index 48e083d..d3aa583 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -28,10 +28,9 @@ (defvar add-log-time-format) ; in add-log -;; 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 +;; FIXME: Update this in the light of the fact that there's only +;; one ChangeLog file now, at the top level, and it's generated from +;; commit logs by 'make-dist'. (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. @@ -650,7 +649,7 @@ style=\"text-align:left\">") (copy-file "../doc/misc/texinfo.tex" stem) (or (equal type "emacs") (copy-file "../doc/emacs/emacsver.texi" stem)) (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/make-tarball.txt b/admin/make-tarball.txt index 9603c61..c080014 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -2,6 +2,10 @@ Instructions to create pretest or release tarballs. -*- coding: utf-8 -*- -- originally written by Gerd Moellmann, amended by Francesco Potortì with the initial help of Eli Zaretskii +FIXME: There is now just one ChangeLog file, at the top level, +generated automatically from commit logs by 'make-dist'. The +procedure below needs to be updated accordingly. + Steps to take before starting on the first pretest in any release sequence: diff --git a/admin/merge-gnulib b/admin/merge-gnulib index 6c0dffb..dc33349 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib @@ -31,7 +31,7 @@ GNULIB_MODULES=' 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/bugtracker b/admin/notes/bugtracker index fd7bd08..9d03798 100644 --- a/admin/notes/bugtracker +++ b/admin/notes/bugtracker @@ -481,7 +481,8 @@ can see exactly what the fix was. *** bug-reference-mode Activate `bug-reference-mode' in ChangeLogs to get clickable links to -the bug web-pages. +the bug web-pages. FIXME: This may need to be updated in the light of +the new policy of just one ChangeLog, at the top level. *** Debian stuff diff --git a/admin/notes/repo b/admin/notes/repo index 46a9e08..d077896 100644 --- a/admin/notes/repo +++ b/admin/notes/repo @@ -37,6 +37,16 @@ NEWS, MAINTAINERS, and FOR-RELEASE, or to indicate regeneration of files such as 'configure'. "There is no need" means you don't have to, but you can if you want to. +** Using vc-dwim to maintain commit messages + +You can use vc-dwim to maintain commit messages in ChangeLog format. +When you create a source directory FOO, run the shell command 'cd FOO; +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 add-change-log-entry-other-window, and commit the change +using the shell command 'cd FOO; vc-dwim'. Type 'vc-dwim --help' for +more info. + * Commit to the right branch Development normally takes places on the trunk. @@ -132,7 +142,8 @@ http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00262.html * How to merge changes from emacs-24 to trunk -[The section on git merge procedure has not yet been written] +[The section on git merge procedure has not yet been written. +Among other things, the ChangeLog file is now automatically generated.] Inspect the change log entries (e.g. in case too many entries have been included or whitespace between entries needs fixing). If someone made diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog new file mode 100755 index 0000000..78afff4 --- /dev/null +++ b/build-aux/gitlog-to-changelog @@ -0,0 +1,432 @@ +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 = '2012-07-29 06:11'; # 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-2014 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 <http://www.gnu.org/licenses/>. + +# Written by Jim Meyering + +use strict; +use warnings; +use Getopt::Long; +use POSIX qw(strftime); + +(my $ME = $0) =~ 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"; + $? ||= 1; +} + +sub usage ($) +{ + my ($exit_code) = @_; + my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); + if ($exit_code != 0) + { + print $STREAM "Try '$ME --help' for more information.\n"; + } + else + { + print $STREAM <<EOF; +Usage: $ME [OPTIONS] [ARGS] + +Convert git log output to ChangeLog format. If present, any ARGS +are passed to "git log". To avoid ARGS being parsed as options to +$ME, they may be preceded by '--'. + +OPTIONS: + + --amend=FILE FILE maps from an SHA1 to perl code (i.e., s/old/new/) that + makes a change to SHA1's commit log text or metadata. + --append-dot append a dot to the first line of each commit message if + there is no other punctuation or blank at the end. + --no-cluster never cluster commit messages under the same date/author + header; the default is to cluster adjacent commit messages + if their headers are the same and neither commit message + contains multiple paragraphs. + --srcdir=DIR the root of the source tree, from which the .git/ + directory can be derived. + --since=DATE convert only the logs since DATE; + the default is to convert all log entries. + --format=FMT set format string for commit subject and body; + see 'man git-log' for the list of format metacharacters; + the default is '%s%n%b%n' + --strip-tab remove one additional leading TAB from commit message lines. + --strip-cherry-pick remove data inserted by "git cherry-pick"; + this includes the "cherry picked from commit ..." line, + and the possible final "Conflicts:" paragraph. + --help display this help and exit + --version output version information and exit + +EXAMPLE: + + $ME --since=2008-01-01 > ChangeLog + $ME -- -n 5 foo > last-5-commits-to-branch-foo + +SPECIAL SYNTAX: + +The following types of strings are interpreted specially when they appear +at the beginning of a log message line. They are not copied to the output. + + 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 <user\@example.com> + List the specified name and email address on a second + ChangeLog header, denoting a co-author. + Signed-off-by: Joe User <user\@example.com> + These lines are simply elided. + +In a FILE specified via --amend, comment lines (starting with "#") are ignored. +FILE must consist of <SHA,CODE+> 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. + +Here is sample input for use with --amend=FILE, 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 <eggert\\\@cs.ucla.edu>, + +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) = @_; + if ($s =~ m![^\w+/.,-]!) + { + # Convert each single quote to '\'' + $s =~ s/\'/\'\\\'\'/g; + # Then single quote the string. + $s = "'$s'"; + } + return $s; +} + +sub quoted_cmd(@) +{ + return join (' ', map {shell_quote $_} @_); +} + +# Parse file F. +# Comment lines (starting with "#") are ignored. +# F must consist of <SHA,CODE+> 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) = @_; + + open F, '<', $f + or die "$ME: $f: failed to open for reading: $!\n"; + + my $fail; + my $h = {}; + my $in_code = 0; + my $sha; + while (defined (my $line = <F>)) + { + $line =~ /^\#/ + and next; + chomp $line; + $line eq '' + and $in_code = 0, next; + + if (!$in_code) + { + $line =~ /^([0-9a-fA-F]{40})$/ + or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), + $fail = 1, next; + $sha = lc $1; + $in_code = 1; + exists $h->{$sha} + and (warn "$ME: $f:$.: duplicate SHA1\n"), + $fail = 1, next; + } + else + { + $h->{$sha} ||= ''; + $h->{$sha} .= "$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) = @_; + my @res = (); + if (defined $srcdir) + { + my $qdir = shell_quote $srcdir; + my $cmd = "cd $qdir && git rev-parse --show-toplevel"; + my $qcmd = shell_quote $cmd; + my $git_dir = qx($cmd); + defined $git_dir + or die "$ME: cannot run $qcmd: $!\n"; + $? == 0 + or die "$ME: $qcmd had unexpected exit code or signal ($?)\n"; + chomp $git_dir; + push @res, "--git-dir=$git_dir/.git"; + } + @res; +} + +{ + my $since_date; + my $format_string = '%s%n%b%n'; + my $amend_file; + my $append_dot = 0; + my $cluster = 1; + my $strip_tab = 0; + my $strip_cherry_pick = 0; + my $srcdir; + GetOptions + ( + help => sub { usage 0 }, + version => sub { print "$ME version $VERSION\n"; exit }, + 'since=s' => \$since_date, + 'format=s' => \$format_string, + 'amend=s' => \$amend_file, + 'append-dot' => \$append_dot, + 'cluster!' => \$cluster, + 'strip-tab' => \$strip_tab, + 'strip-cherry-pick' => \$strip_cherry_pick, + 'srcdir=s' => \$srcdir, + ) or usage 1; + + defined $since_date + and unshift @ARGV, "--since=$since_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 = defined $amend_file ? parse_amend_file $amend_file : {}; + + my @cmd = ('git', + git_dir_option $srcdir, + qw(log --log-size), + '--pretty=format:%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.)\n"); + + my $prev_multi_paragraph; + my $prev_date_line = ''; + my @prev_coauthors = (); + while (1) + { + defined (my $in = <PIPE>) + or last; + $in =~ /^log size (\d+)$/ + or die "$ME:$.: Invalid line (expected log size):\n$in"; + my $log_nbytes = $1; + + my $log; + my $n_read = read PIPE, $log, $log_nbytes; + $n_read == $log_nbytes + or die "$ME:$.: unexpected EOF\n"; + + # Extract leading hash. + my ($sha, $rest) = split ':', $log, 2; + defined $sha + or die "$ME:$.: malformed log entry\n"; + $sha =~ /^[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 = $amend_code->{$sha}; + if (defined $code) + { + eval 'use Safe'; + my $s = new Safe; + # Put the unpreprocessed entry into "$_". + $_ = $rest; + + # Let $code operate on it, safely. + my $r = $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 = $_; + } + + # Remove lines inserted by "git cherry-pick". + if ($strip_cherry_pick) + { + $rest =~ s/^\s*Conflicts:\n.*//sm; + $rest =~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m; + } + + my @line = split "\n", $rest; + my $author_line = shift @line; + defined $author_line + or die "$ME:$.: unexpected EOF\n"; + $author_line =~ /^(\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 = (grep (/^Copyright-paperwork-exempt:\s+[Yy]es$/, @line) + ? ' (tiny change)' : ''); + + my $date_line = sprintf "%s %s$tiny\n", + strftime ("%F", localtime ($1)), $2; + + my @coauthors = grep /^Co-authored-by:.*$/, @line; + # Omit meta-data lines we've already interpreted. + @line = grep !/^(?:Signed-off-by:[ ].*>$ + |Co-authored-by:[ ] + |Copyright-paperwork-exempt:[ ] + )/x, @line; + + # Remove leading and trailing blank lines. + if (@line) + { + while ($line[0] =~ /^\s*$/) { shift @line; } + while ($line[$#line] =~ /^\s*$/) { pop @line; } + } + + # Record whether there are two or more paragraphs. + my $multi_paragraph = grep /^\s*$/, @line; + + # Format 'Co-authored-by: A U Thor <email@example.com>' 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/email/coauthors header, + # or if this or the previous entry consists of two or more paragraphs, + # 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 = $date_line; + @prev_coauthors = @coauthors; + $prev_multi_paragraph = $multi_paragraph; + + # If there were any lines + if (@line == 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, then + if (length $line[0] < 72) + { + # append a dot if there is no other punctuation or blank + # at the end. + $line[0] =~ /[[:punct:]\s]$/ + or $line[0] .= '.'; + } + } + + # Remove one additional leading TAB from each line. + $strip_tab + and map { s/^\t// } @line; + + # Prefix each non-empty line with a TAB. + @line = map { length $_ ? "\t$_" : '' } @line; + + print "\n", join ("\n", @line), "\n"; + } + + defined ($in = <PIPE>) + 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=F specified file. + my $fail = 0; + foreach my $sha (keys %$amend_code) + { + warn "$ME:$amend_file: unused entry: $sha\n"; + $fail = 1; + } + + exit $fail; +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "my $VERSION = '" +# 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..cc0f409 --- /dev/null +++ b/build-aux/gitlog-to-emacslog @@ -0,0 +1,48 @@ +#!/bin/sh + +# Convert git log output to ChangeLog format for GNU Emacs. + +# Copyright (C) 2014 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 <http://www.gnu.org/licenses/>. + +LC_ALL=C +export LC_ALL + +gen_origin=${1?} + +if test -d ${srcprefix}.git; then + gen_origin_date=`git log --pretty=format:%ci "$gen_origin"^! ` || exit + gen_start_year=`expr "$gen_origin_date" : '\([^-]*\)'` || exit + log_fix="${srcprefix}build-aux/git-log-fix" + test -e "$log_fix" && set -- "$@" --amend="$log_fix" + + ${srcprefix}build-aux/gitlog-to-changelog $gen_origin^.. \ + > ${distprefix}cl-t || exit + + gen_end_year=`sed 's/-.*//; q' ${distprefix}cl-t` + if test "$gen_start_year" = "$gen_end_year"; then + year_range=$gen_start_year + else + year_range=$gen_start_year-$gen_end_year + fi + + sed "1d + s/Copyright (C) [0-9]*-[0-9]*/Copyright (C) $year_range/ + s/^# // + /http:/q + " Makefile.in >>${distprefix}cl-t && + rm -f ${distprefix}ChangeLog && + mv ${distprefix}cl-t ${distprefix}ChangeLog +fi diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index 4ba4869..18aeb61 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -39,7 +39,7 @@ ;;; History: -;; 0.07 onwards: see lisp/ChangeLog +;; 0.07 onwards: see commit logs and ../ChangeLog*. ;; 0.06: (2004-10-06) ;; - Bugfixes regarding icalendar-import-format-*. @@ -1047,7 +1047,7 @@ FExport diary data into iCalendar file: ") (setq header (concat "\nBEGIN:VEVENT\nUID:" (or uid - (icalendar--create-uid entry-full + (icalendar--create-uid entry-full contents))))) (setq result (concat result header contents "\nEND:VEVENT"))) ;; handle errors diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el index 51bd415..c53feee 100644 --- a/lisp/emacs-lisp/authors.el +++ b/lisp/emacs-lisp/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. +;; FIXME: This needs to modernized in the light of current practice, +;; which generates a single top-level ChangeLog file from commit logs. + ;;; Code: (defvar authors-coding-system 'utf-8 @@ -75,7 +78,7 @@ files.") ("Gerd Möllmann" "Gerd Moellmann") ("Hallvard B. Furuseth" "Hallvard B Furuseth" "Hallvard Furuseth") ("Hrvoje Nikšić" "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/lisp/emacs-lisp/gulp.el b/lisp/emacs-lisp/gulp.el index d0a89b3..2d0314b 100644 --- a/lisp/emacs-lisp/gulp.el +++ b/lisp/emacs-lisp/gulp.el @@ -69,7 +69,7 @@ please send them to me ASAP. Please don't send the whole file. Instead, please send a patch made with `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. Thanks.") diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el index 7a0f613..a28a255 100644 --- a/lisp/gnus/deuglify.el +++ b/lisp/gnus/deuglify.el @@ -188,7 +188,7 @@ ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; -;; See ChangeLog for other changes. +;; See commit log or ChangeLog* 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/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. This version of the library differs from the original as described in -the ChangeLog file. +the ChangeLog.1 file. diff --git a/make-dist b/make-dist index aed5b17..30dacda 100755 --- a/make-dist +++ b/make-dist @@ -278,13 +278,20 @@ fi echo "Creating top directory: \`${tempdir}'" mkdir ${tempdir} +if test -d .git; then + echo "Making top-level ChangeLog" + make distprefix=${tempdir}/ gen-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 ${tempdir} ln config.bat make-dist .dir-locals.el ${tempdir} ln aclocal.m4 ${tempdir} @@ -334,7 +341,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 @@ -345,6 +352,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}/build-aux + ln gitlog-to-changelog ../${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) @@ -361,7 +369,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 @@ -383,7 +391,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 testfile ../${tempdir}/lib-src + ln ChangeLog.*[0-9] Makefile.in README testfile ../${tempdir}/lib-src ln grep-changelog rcs2log ../${tempdir}/lib-src ln makefile.w32-in ../${tempdir}/lib-src ln update-game-score.exe.manifest ../${tempdir}/lib-src) @@ -399,7 +407,7 @@ echo "Making links to \`nt'" ln nmake.defs gmake.defs subdirs.el [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt ln Makefile.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 ../${tempdir}/nt) echo "Making links to \`nt/inc' and its subdirectories" for f in `find nt/inc -type f -name '[a-z]*.h'`; do @@ -413,13 +421,13 @@ echo "Making links to \`nt/icons'" 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}/msdos ln depfiles.bat inttypes.h ../${tempdir}/msdos ln is_exec.c sigaction.c mainmake.v2 sed*.inp ../${tempdir}/msdos) 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) echo "Making links to \`nextstep/templates'" (cd nextstep/templates @@ -440,12 +448,12 @@ echo "Making links to \`nextstep/GNUstep/Emacs.base/Resources'" echo "Making links to \`oldXMenu'" (cd oldXMenu ln *.[ch] *.in ../${tempdir}/oldXMenu - ln README ChangeLog ../${tempdir}/oldXMenu) + ln README ChangeLog.*[0-9] ../${tempdir}/oldXMenu) echo "Making links to \`lwlib'" (cd lwlib ln *.[ch] *.in ../${tempdir}/lwlib - ln README ChangeLog ../${tempdir}/lwlib) + ln README ChangeLog.*[0-9] ../${tempdir}/lwlib) ## It is important to distribute admin/ because it contains sources ## for generated lisp/international/uni-*.el files. -- 1.9.3 [-- Attachment #4: 0003-Combine-all-historical-ChangeLogs-into-ChangeLog.1.patch --] [-- Type: text/x-diff, Size: 7205 bytes --] From 51bae646c79a78d4fb0cfa8e4851ecd32e543012 Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> Date: Tue, 25 Nov 2014 12:47:44 -0800 Subject: [PATCH 3/3] Combine all historical ChangeLogs into ChangeLog.1. --- ChangeLog.1 | 645849 ++++++++++++++++++++++++++++++++++++++++++- admin/ChangeLog.1 | 2267 - doc/emacs/ChangeLog.1 | 10750 - doc/lispintro/ChangeLog.1 | 763 - doc/lispref/ChangeLog.1 | 13400 - doc/man/ChangeLog.1 | 183 - doc/misc/ChangeLog.1 | 11781 - etc/ChangeLog.1 | 6547 - leim/ChangeLog.1 | 2557 - lib-src/ChangeLog.1 | 8258 - lisp/ChangeLog.1 | 3262 - lisp/ChangeLog.10 | 23559 -- lisp/ChangeLog.11 | 14339 - lisp/ChangeLog.12 | 33352 --- lisp/ChangeLog.13 | 16715 -- lisp/ChangeLog.14 | 20565 -- lisp/ChangeLog.15 | 22820 -- lisp/ChangeLog.16 | 25242 -- lisp/ChangeLog.17 | 16597 -- lisp/ChangeLog.2 | 4010 - lisp/ChangeLog.3 | 12451 - lisp/ChangeLog.4 | 8952 - lisp/ChangeLog.5 | 9286 - lisp/ChangeLog.6 | 8039 - lisp/ChangeLog.7 | 23128 -- lisp/ChangeLog.8 | 10010 - lisp/ChangeLog.9 | 20703 -- lisp/cedet/ChangeLog.1 | 3088 - lisp/erc/ChangeLog.01 | 1056 - lisp/erc/ChangeLog.02 | 2620 - lisp/erc/ChangeLog.03 | 2163 - lisp/erc/ChangeLog.04 | 2094 - lisp/erc/ChangeLog.05 | 1240 - lisp/erc/ChangeLog.06 | 1454 - lisp/erc/ChangeLog.07 | 836 - lisp/erc/ChangeLog.08 | 429 - lisp/erc/ChangeLog.09 | 720 - lisp/gnus/ChangeLog.1 | 3724 - lisp/gnus/ChangeLog.2 | 18569 -- lisp/gnus/ChangeLog.3 | 25527 -- lisp/mh-e/ChangeLog.1 | 11441 - lisp/mh-e/ChangeLog.2 | 3692 - lisp/org/ChangeLog.1 | 32802 --- lisp/url/ChangeLog.1 | 2970 - lwlib/ChangeLog.1 | 1878 - msdos/ChangeLog.1 | 1553 - nextstep/ChangeLog.1 | 299 - nt/ChangeLog.1 | 3443 - oldXMenu/ChangeLog.1 | 684 - src/ChangeLog.1 | 3539 - src/ChangeLog.10 | 27930 -- src/ChangeLog.11 | 31403 --- src/ChangeLog.12 | 22954 -- src/ChangeLog.13 | 11241 - src/ChangeLog.2 | 4789 - src/ChangeLog.3 | 16521 -- src/ChangeLog.4 | 6924 - src/ChangeLog.5 | 7166 - src/ChangeLog.6 | 5376 - src/ChangeLog.7 | 11109 - src/ChangeLog.8 | 13997 - src/ChangeLog.9 | 13312 - test/ChangeLog.1 | 1983 - 63 files changed, 637286 insertions(+), 638625 deletions(-) delete mode 100644 admin/ChangeLog.1 delete mode 100644 doc/emacs/ChangeLog.1 delete mode 100644 doc/lispintro/ChangeLog.1 delete mode 100644 doc/lispref/ChangeLog.1 delete mode 100644 doc/man/ChangeLog.1 delete mode 100644 doc/misc/ChangeLog.1 delete mode 100644 etc/ChangeLog.1 delete mode 100644 leim/ChangeLog.1 delete mode 100644 lib-src/ChangeLog.1 delete mode 100644 lisp/ChangeLog.1 delete mode 100644 lisp/ChangeLog.10 delete mode 100644 lisp/ChangeLog.11 delete mode 100644 lisp/ChangeLog.12 delete mode 100644 lisp/ChangeLog.13 delete mode 100644 lisp/ChangeLog.14 delete mode 100644 lisp/ChangeLog.15 delete mode 100644 lisp/ChangeLog.16 delete mode 100644 lisp/ChangeLog.17 delete mode 100644 lisp/ChangeLog.2 delete mode 100644 lisp/ChangeLog.3 delete mode 100644 lisp/ChangeLog.4 delete mode 100644 lisp/ChangeLog.5 delete mode 100644 lisp/ChangeLog.6 delete mode 100644 lisp/ChangeLog.7 delete mode 100644 lisp/ChangeLog.8 delete mode 100644 lisp/ChangeLog.9 delete mode 100644 lisp/cedet/ChangeLog.1 delete mode 100644 lisp/erc/ChangeLog.01 delete mode 100644 lisp/erc/ChangeLog.02 delete mode 100644 lisp/erc/ChangeLog.03 delete mode 100644 lisp/erc/ChangeLog.04 delete mode 100644 lisp/erc/ChangeLog.05 delete mode 100644 lisp/erc/ChangeLog.06 delete mode 100644 lisp/erc/ChangeLog.07 delete mode 100644 lisp/erc/ChangeLog.08 delete mode 100644 lisp/erc/ChangeLog.09 delete mode 100644 lisp/gnus/ChangeLog.1 delete mode 100644 lisp/gnus/ChangeLog.2 delete mode 100644 lisp/gnus/ChangeLog.3 delete mode 100644 lisp/mh-e/ChangeLog.1 delete mode 100644 lisp/mh-e/ChangeLog.2 delete mode 100644 lisp/org/ChangeLog.1 delete mode 100644 lisp/url/ChangeLog.1 delete mode 100644 lwlib/ChangeLog.1 delete mode 100644 msdos/ChangeLog.1 delete mode 100644 nextstep/ChangeLog.1 delete mode 100644 nt/ChangeLog.1 delete mode 100644 oldXMenu/ChangeLog.1 delete mode 100644 src/ChangeLog.1 delete mode 100644 src/ChangeLog.10 delete mode 100644 src/ChangeLog.11 delete mode 100644 src/ChangeLog.12 delete mode 100644 src/ChangeLog.13 delete mode 100644 src/ChangeLog.2 delete mode 100644 src/ChangeLog.3 delete mode 100644 src/ChangeLog.4 delete mode 100644 src/ChangeLog.5 delete mode 100644 src/ChangeLog.6 delete mode 100644 src/ChangeLog.7 delete mode 100644 src/ChangeLog.8 delete mode 100644 src/ChangeLog.9 delete mode 100644 test/ChangeLog.1 [The actual patch is about 48 MB and is elided here. The following shell script implements the patch:] #!/bin/sh export LC_ALL=C logs=$(find * -name 'ChangeLog.*' | sort -t. -k1,1 -k2n) gawk ' BEGINFILE { prefix = FILENAME sub(/[^/]*$/, "", prefix) } !/^[^\t0-9]/ { if (/^\tCopyright [(]/) { next } if (/^\tInc\./) { next } line = $0 if (/^\t\* / && $0 !~ ("^\\t\\* " prefix)) { line_end = substr(line, 1, 3) prefix substr(line, 4) line = "" while (match(line_end, /^[^(:,]*, /)) { pos = RLENGTH line = line substr(line_end, 1, pos) prefix line_end = substr(line_end, pos + 1) } line = line line_end } if (/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][[:space:]]/) { if (accum) print accum accum = FILENAME " " line } else if (line || prevline) { accum = accum "\1" line } prevline = $0 } END { print accum } ' $logs | sort -s -k2,2r -k1 | sed 's/^[^ ]* //' | tr '\1' '\n' | sed 's/[[:space:]]*$//' >ChangeLog.new cat >>ChangeLog.new <<'EOF' ;; Local Variables: ;; coding: utf-8 ;; End: Copyright (C) 1985-2014 Free Software Foundation, Inc. This file is part of GNU Emacs. GNU Emacs 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. GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>. EOF for log in $logs; do test "$log" = ChangeLog.1 && continue git rm $log done cp ChangeLog.new ChangeLog.1 git add ChangeLog.1 git commit -m'Combine all historical ChangeLogs into ChangeLog.1.' ^ permalink raw reply related [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-11-26 5:38 ` Paul Eggert @ 2014-11-26 6:21 ` Jan D. 2014-11-26 7:50 ` Paul Eggert 2014-11-26 15:12 ` Stefan Monnier 1 sibling, 1 reply; 85+ messages in thread From: Jan D. @ 2014-11-26 6:21 UTC (permalink / raw) To: Paul Eggert; +Cc: 19113 Hi. Can this generation of ChangeLog handle multiple or different authors in the ChangeLog, i.e. generate something like these: 2013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> Jan Djärv <jan.h.d@swipnet.se> * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS) (XINERAMA_CFLAGS): New macros. (ALL_CFLAGS, LIBES): Use them. How would a commit message look like to get this in the ChangeLog? Also, how would a commit message look like if you wanted another author in the ChangeLog that is different from the one checking in? Is it enough to set Author:? Thanks, Jan D. > 26 nov 2014 kl. 06:38 skrev Paul Eggert <eggert@cs.ucla.edu>: > > Paul Eggert wrote: >> combine the existing ChangeLogs (there is >> about 24 MB worth) into a single ChangeLog.1 file at the top level. > > I implemented this, along with some other fixes (notably, getting a proper copyright notice into the generated ChangeLog file), and am attaching the corresponding patches. I would like to install this into the emacs-24 branch and then merge that into the master. > > There are three patches. Patches 1 and 3 are so large that I'm just attaching summaries here. (Patch 1 is essentially the same as before.) You can get the full patches temporarily from here: > > http://cs.ucla.edu/~eggert/emacs/ > <0001-Rename-old-ChangeLog-files-to-prepare-for-gitlog-to-.patch><0002-Generate-a-ChangeLog-file-from-commit-logs.patch><0003-Combine-all-historical-ChangeLogs-into-ChangeLog.1.patch> ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-11-26 6:21 ` Jan D. @ 2014-11-26 7:50 ` Paul Eggert 0 siblings, 0 replies; 85+ messages in thread From: Paul Eggert @ 2014-11-26 7:50 UTC (permalink / raw) To: Jan D.; +Cc: 19113 Jan D. wrote: > Can this generation of ChangeLog handle multiple or different authors in the ChangeLog, i.e. generate something like these: > > 2013-05-07 YAMAMOTO Mitsuharu<mituharu@math.s.chiba-u.ac.jp> > Jan Djärv<jan.h.d@swipnet.se> > > * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS) > (XINERAMA_CFLAGS): New macros. > (ALL_CFLAGS, LIBES): Use them. > > How would a commit message look like to get this in the ChangeLog? You put a Co-authored-by: line somewhere in the git commit message. E.g.: Co-authored-by: Jan Djärv <jan.h.d@swipnet.se> * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS) (XINERAMA_CFLAGS): New macros. (ALL_CFLAGS, LIBES): Use them. > Also, how would a commit message look like if you wanted another author in the ChangeLog that is different from the one checking in? Is it enough to set Author:? Yes. ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-11-26 5:38 ` Paul Eggert 2014-11-26 6:21 ` Jan D. @ 2014-11-26 15:12 ` Stefan Monnier 2014-11-26 19:16 ` Paul Eggert 1 sibling, 1 reply; 85+ messages in thread From: Stefan Monnier @ 2014-11-26 15:12 UTC (permalink / raw) To: Paul Eggert; +Cc: 19113 > I implemented this, along with some other fixes (notably, getting a proper > copyright notice into the generated ChangeLog file), and am attaching the > corresponding patches. I would like to install this into the emacs-24 > branch and then merge that into the master. Why emacs-24? > There are three patches. Patches 1 and 3 are so large that I'm just > attaching summaries here. (Patch 1 is essentially the same as > before.) You can get the full patches temporarily from here: Patch 3 sounds like a bad idea. As for whether or not to go ahead: I can personally live with either decision, tho I prefer dropping ChangeLog files from the VCS. But the benefits are likely not high enough to justify alienating other core maintainers, so we should only go ahead if we can get their explicit agreement first. Stefan ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-11-26 15:12 ` Stefan Monnier @ 2014-11-26 19:16 ` Paul Eggert 2014-11-26 22:15 ` Stefan Monnier 2014-12-05 8:07 ` Glenn Morris 0 siblings, 2 replies; 85+ messages in thread From: Paul Eggert @ 2014-11-26 19:16 UTC (permalink / raw) To: Stefan Monnier; +Cc: 19113 On 11/26/2014 07:12 AM, Stefan Monnier wrote: > Why emacs-24? Because it'd be a pain to deal with the development and master branches using different policies for ChangeLogs. If emacs-24 stuck to the old policy and master used the new one, not only would developers have to remember which policy to use with which branch, the merging procedure would be complicated by the need to merge ChangeLogs developed in the old policy with the automatically-generated ChangeLogs of the new. There would inevitably be hassles with dropped logs and duplicates and so forth. We have enough problems already with the merge procedure (as far as I can tell, it's never been done since the switch to git). So it'd be much better to change both branches at once, assuming emacs-24 is still active. As a side benefit, I'm volunteering to do the first merge from emacs-24 to master, which would be useful experience for us all. > Patch 3 sounds like a bad idea. OK, let's leave it out. > I prefer dropping ChangeLog files from the VCS. But the benefits are > likely not high enough to justify alienating other core maintainers, > so we should only go ahead if we can get their explicit agreement first. Please feel free to ask them. In the long run it'd less work for everybody if we did the switch, and I'm volunteering to do the legwork. A request from you would carry more weight than one from me. ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-11-26 19:16 ` Paul Eggert @ 2014-11-26 22:15 ` Stefan Monnier 2014-12-05 8:07 ` Glenn Morris 1 sibling, 0 replies; 85+ messages in thread From: Stefan Monnier @ 2014-11-26 22:15 UTC (permalink / raw) To: Paul Eggert; +Cc: 19113 >> Why emacs-24? > Because it'd be a pain to deal with the development and master branches > using different policies for ChangeLogs. I guess you're right. > We have enough problems already with the merge procedure (as far as I can > tell, it's never been done since the switch to git). So it'd be much better > to change both branches at once, assuming emacs-24 is still active. I did such a merge already. There's nothing magical about it, and whether it's done in Git or in Bzr makes no real difference (except that we don't yet have the equivalent of bzrmerge.el which helped streamline the process, of course). Stefan ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-11-26 19:16 ` Paul Eggert 2014-11-26 22:15 ` Stefan Monnier @ 2014-12-05 8:07 ` Glenn Morris 2014-12-05 8:38 ` Eli Zaretskii ` (3 more replies) 1 sibling, 4 replies; 85+ messages in thread From: Glenn Morris @ 2014-12-05 8:07 UTC (permalink / raw) To: Paul Eggert; +Cc: 19113 I think this change will lower the quality of Emacs ChangeLogs, which are important forms of documentation; and frankly I don't even see that it will save much work. But I'm obviously in a minority, so don't let me stop you. I do have a list though; do whatever you like in response to it. 1) There are still things to deal with from the last big change, so I'd appreciate it if you not do this before January at the earliest. 2) Announce the change well in advance, and make it very clear what people need to do (ie, take much more care with their logs than before). Put a clear set of instructions in admin/notes. Eg how will I replace `C-x 4 a', `C-c C-a' now? (Frankly I expect to keep doing that, just not commit the ChangeLog, so as I said, I can't see that this will save any effort). I hope the answer isn't "install vc-dwim", since Emacs is supposed to contain all the necessary VC tools itself. 3) How will I mark a change so that it does not generate a ChangeLog? (Examples include: NEWS edits, comment fixes, fixing a paren typo in something I committed one second earlier.) Perhaps a "#" or somesuch in the first char of the log? How will I do this after committing if I forgot to so mark it at the time? 4) What if I commit something, realize it was wrong, and remove it right away? Normally I'd delete the ChangeLog entry too. 5) Will I be able to mark a portion of a log to be excluded from the generated ChangeLog? 6) How does the correction method work (I'm being lazy and not reading the patch). (Since notes are editable comments associated with commits, I like the idea of using notes to correct faulty logs.) Frankly, I expect there to be lots of mistakes, but whatever; I'm not going to bother to correct them anymore. 7) What dates will entries get? The commit date? This may not match the push date. What will happen with the dates of entries merged from other branches. ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-12-05 8:07 ` Glenn Morris @ 2014-12-05 8:38 ` Eli Zaretskii 2014-12-05 14:33 ` Ted Zlatanov ` (2 subsequent siblings) 3 siblings, 0 replies; 85+ messages in thread From: Eli Zaretskii @ 2014-12-05 8:38 UTC (permalink / raw) To: Glenn Morris; +Cc: 19113, eggert > From: Glenn Morris <rgm@gnu.org> > Date: Fri, 05 Dec 2014 03:07:07 -0500 > Cc: 19113@debbugs.gnu.org > > 4) What if I commit something, realize it was wrong, and remove it right > away? Normally I'd delete the ChangeLog entry too. With Git, it's useful to distinguish between "commit" and "push". The former can be easily fixed, since it's still only in your local clone; use "git amend" or even "git reset". The latter cannot be fixed, except by running Git commands on Savannah that work directly on the public repository, which is generally frowned upon, because others could have pulled in-between. > 6) How does the correction method work (I'm being lazy and not reading > the patch). From "gitlog-to-changelog --help: --amend=FILE FILE maps from an SHA1 to perl code (i.e., s/old/new/) that makes a change to SHA1's commit log text or metadata. [...] In a FILE specified via --amend, comment lines (starting with "#") are ignored. FILE must consist of <SHA,CODE+> 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. Here is sample input for use with --amend=FILE, 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 <eggert\\\@cs.ucla.edu>, ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-12-05 8:07 ` Glenn Morris 2014-12-05 8:38 ` Eli Zaretskii @ 2014-12-05 14:33 ` Ted Zlatanov 2014-12-05 18:49 ` Stefan Monnier 2014-12-05 15:38 ` bug#19113: Generate a ChangeLog file from commit logs Stefan Monnier 2015-01-03 1:37 ` Glenn Morris 3 siblings, 1 reply; 85+ messages in thread From: Ted Zlatanov @ 2014-12-05 14:33 UTC (permalink / raw) To: Glenn Morris; +Cc: 19113, Paul Eggert On Fri, 05 Dec 2014 03:07:07 -0500 Glenn Morris <rgm@gnu.org> wrote: GM> I think this change will lower the quality of Emacs ChangeLogs, which GM> are important forms of documentation For this reason and many others, I suggest blocking commits directly to master. Instead, people should commit to a private branch they can rewrite (git push -f after amending a commit, for instance) and then a build system can merge that into master when it passes ChangeLog checks (and possibly a basic build check, and possibly maintainer approval). This is, of course, the PR system you find on Github and such sites. It works for thousands of projects. I see no reason why Emacs is special. Ted ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-12-05 14:33 ` Ted Zlatanov @ 2014-12-05 18:49 ` Stefan Monnier 2014-12-05 20:08 ` Ted Zlatanov 2014-12-06 2:27 ` Dmitry Gutov 0 siblings, 2 replies; 85+ messages in thread From: Stefan Monnier @ 2014-12-05 18:49 UTC (permalink / raw) To: Glenn Morris; +Cc: 19113, Paul Eggert > This is, of course, the PR system you find on Github and such sites. That's also the "patch queue management" I mentioned earlier. > It works for thousands of projects. I see no reason why Emacs > is special. Because nobody has set such a thing up (and AFAICT Savannah doesn't have such a thing built-in, oddly enough). Stefan ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-12-05 18:49 ` Stefan Monnier @ 2014-12-05 20:08 ` Ted Zlatanov 2014-12-06 4:59 ` Stefan Monnier 2014-12-06 2:27 ` Dmitry Gutov 1 sibling, 1 reply; 85+ messages in thread From: Ted Zlatanov @ 2014-12-05 20:08 UTC (permalink / raw) To: Stefan Monnier; +Cc: 19113, Paul Eggert On Fri, 05 Dec 2014 13:49:02 -0500 Stefan Monnier <monnier@iro.umontreal.ca> wrote: >> This is, of course, the PR system you find on Github and such sites. SM> That's also the "patch queue management" I mentioned earlier. Right. I think if you call it a PR system most people will know what you mean nowadays. >> It works for thousands of projects. I see no reason why Emacs >> is special. SM> Because nobody has set such a thing up (and AFAICT Savannah doesn't SM> have such a thing built-in, oddly enough). Hmm, it would require some technical work: * targeted hydra builds for a specific branch * a click-and-done way to merge a specific branch into master or emacs-24 * maybe a comment system * maybe debbugs integration * ability to review the potential ChangeLog entries that will be generated from the commit Is this remotely realistic? Ted ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-12-05 20:08 ` Ted Zlatanov @ 2014-12-06 4:59 ` Stefan Monnier 2014-12-06 13:17 ` Ted Zlatanov 0 siblings, 1 reply; 85+ messages in thread From: Stefan Monnier @ 2014-12-06 4:59 UTC (permalink / raw) To: Glenn Morris; +Cc: 19113, Paul Eggert >>> This is, of course, the PR system you find on Github and such sites. SM> That's also the "patch queue management" I mentioned earlier. > Right. I think if you call it a PR system most people will know what > you mean nowadays. Problem is: I'm not part of "most" because for me "PR" means "Public Relations" (aka "BS"). Stefan ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-12-06 4:59 ` Stefan Monnier @ 2014-12-06 13:17 ` Ted Zlatanov 0 siblings, 0 replies; 85+ messages in thread From: Ted Zlatanov @ 2014-12-06 13:17 UTC (permalink / raw) To: Stefan Monnier; +Cc: 19113, Paul Eggert On Fri, 05 Dec 2014 23:59:34 -0500 Stefan Monnier <monnier@iro.umontreal.ca> wrote: >>>> This is, of course, the PR system you find on Github and such sites. SM> That's also the "patch queue management" I mentioned earlier. >> Right. I think if you call it a PR system most people will know what >> you mean nowadays. SM> Problem is: I'm not part of "most" because for me "PR" means "Public SM> Relations" (aka "BS"). You're right it's confusing, so let's call it a "pull request" system. Again, my point is that nowadays this is a well-known term, not that it's technically more correct or appropriate. Anyhow, I've followed up in emacs-devel. Ted ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-12-05 18:49 ` Stefan Monnier 2014-12-05 20:08 ` Ted Zlatanov @ 2014-12-06 2:27 ` Dmitry Gutov 2014-12-06 5:06 ` Stefan Monnier 2014-12-06 10:08 ` Patch queue management systems Eli Zaretskii 1 sibling, 2 replies; 85+ messages in thread From: Dmitry Gutov @ 2014-12-06 2:27 UTC (permalink / raw) To: Stefan Monnier; +Cc: 19113, Paul Eggert Stefan Monnier <monnier@iro.umontreal.ca> writes: >> This is, of course, the PR system you find on Github and such sites. > > That's also the "patch queue management" I mentioned earlier. Right. On GitHub, it's often also a decent platform for discussions. > Because nobody has set such a thing up (and AFAICT Savannah doesn't > have such a thing built-in, oddly enough). It shouldn't be too hard, actually, to set up some code review tool, such as Gerrit [0], Review Board [1] or Differential [2]. I think all of them support automatic merging of approved patches, or at least make it reasonably easy. The last one seems to offer a lot of options, at the cost of learning the whole Phabricator ecosystem. What do you see as requirements for such a tool? Integration with Savannah user database? Do you like at least one of them? I'd also welcome opinions from people who have experience working with them, because honestly, I've only done in-browser code reviews inside issue tracking tools, such as GitHub and GitLab. [0] https://code.google.com/p/gerrit/ [1] https://www.reviewboard.org/ [2] http://phabricator.org/applications/differential/ ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-12-06 2:27 ` Dmitry Gutov @ 2014-12-06 5:06 ` Stefan Monnier 2014-12-06 7:26 ` Eli Zaretskii 2014-12-09 13:46 ` Dmitry Gutov 2014-12-06 10:08 ` Patch queue management systems Eli Zaretskii 1 sibling, 2 replies; 85+ messages in thread From: Stefan Monnier @ 2014-12-06 5:06 UTC (permalink / raw) To: Dmitry Gutov; +Cc: 19113, Paul Eggert > What do you see as requirements for such a tool? Integration with > Savannah user database? I think given the current state of affair, the requirements are very low: pretty much anything would be better than what we have now. The only issues I can think of are that they should be installed on machines we can control ourselves, and either they're very light on browser resource usage or they provide some lighterweight (in terms of resource usage) interface (such as control via email). Being able to work with it offline is a plus. > Do you like at least one of them? I don't have any a-priori preference. Stefan ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-12-06 5:06 ` Stefan Monnier @ 2014-12-06 7:26 ` Eli Zaretskii 2014-12-09 13:46 ` Dmitry Gutov 1 sibling, 0 replies; 85+ messages in thread From: Eli Zaretskii @ 2014-12-06 7:26 UTC (permalink / raw) To: Stefan Monnier; +Cc: 19113, eggert, dgutov > From: Stefan Monnier <monnier@iro.umontreal.ca> > Date: Sat, 06 Dec 2014 00:06:29 -0500 > Cc: 19113@debbugs.gnu.org, Paul Eggert <eggert@cs.ucla.edu> > > > Do you like at least one of them? > > I don't have any a-priori preference. I suggest that Someone(TM) summarizes (on emacs-devel, I suppose) the main features and pros/cons of using each of the alternatives, and then we can have enough information for a decision. ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-12-06 5:06 ` Stefan Monnier 2014-12-06 7:26 ` Eli Zaretskii @ 2014-12-09 13:46 ` Dmitry Gutov 1 sibling, 0 replies; 85+ messages in thread From: Dmitry Gutov @ 2014-12-09 13:46 UTC (permalink / raw) To: Stefan Monnier; +Cc: 19113, Paul Eggert On 12/06/2014 07:06 AM, Stefan Monnier wrote: >> What do you see as requirements for such a tool? Integration with >> Savannah user database? > > I think given the current state of affair, the requirements are very > low: pretty much anything would be better than what we have now. Okay then. Savannah integration would be a complication for me personally. > The only issues I can think of are that they should be installed on > machines we can control ourselves, and either they're very light on > browser resource usage or they provide some lighterweight (in terms of > resource usage) interface (such as control via email). I don't know if any of them can be considered heavy on the browser. Phabricator seems to be the most "slick" (and probably resource-intensive), but it also includes a powerful command-line tool, or so they say. Here they are live: https://git.eclipse.org/r/ http://demo.reviewboard.org/r/ https://secure.phabricator.com/ > Being able to work with it offline is a plus. Basically, something like a layer on top of Git? That might be nice, but probably not in the cards. ^ permalink raw reply [flat|nested] 85+ messages in thread
* Patch queue management systems 2014-12-06 2:27 ` Dmitry Gutov 2014-12-06 5:06 ` Stefan Monnier @ 2014-12-06 10:08 ` Eli Zaretskii 2014-12-06 13:12 ` Ted Zlatanov ` (2 more replies) 1 sibling, 3 replies; 85+ messages in thread From: Eli Zaretskii @ 2014-12-06 10:08 UTC (permalink / raw) To: Dmitry Gutov; +Cc: eggert, monnier, emacs-devel [Moved the discussion to emacs-devel.] > From: Dmitry Gutov <dgutov@yandex.ru> > Date: Sat, 06 Dec 2014 04:27:22 +0200 > > Stefan Monnier <monnier@iro.umontreal.ca> writes: > > > Because nobody has set such a thing up (and AFAICT Savannah doesn't > > have such a thing built-in, oddly enough). > > It shouldn't be too hard, actually, to set up some code review tool, > such as Gerrit [0], Review Board [1] or Differential [2]. I took a quick look at these. I think by far the 2 main issues we will have with these tools are: . The tools don't have Emacs integration built into them, nor offer Emacs VC sub-modes. (Gerrit has a magit plugin.) I'm guessing we would like to arrange for such an integration in VC, because people who review patches are accustomed to using Emacs and have elaborate customizations for this that they would lose if the review is only done via a Web browser (even if that browser is eww). . The tools require non-trivial changes in the workflow advertised on the Wiki. E.g., Gerrit requires to work with magic local branches and detached heads. We should carefully evaluate this and decide how to make sure this won't trip those of us who are less proficient in Git (which, judging by the current traffic on emacs-devel, seems like a rule rather than exception) and cause corruption of the upstream repository. There are also other minor issues we need to figure out: licenses, the underlying infrastructure (e.g., AFIU, Phabricator requires PHP), etc. Personally, I think arranging the development around this kind of process will not work without some critical mass of patch reviewers who are able to endure the current constant high volume of changes, let alone if we want to increase that volume. Being an efficient patch reviewer requires good knowledge of at least a few areas of the Emacs core, and we currently have only a handful of people who can qualify. (The obvious exception from this rule is a maintainer of a single package who can review patches for his/her package.) From experience of other projects, 5 reviewers is not enough for this task. So we are again back to the hardest problem in Emacs development: the extremely small number of core maintainers. > I'd also welcome opinions from people who have experience working with > them Seconded. ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-06 10:08 ` Patch queue management systems Eli Zaretskii @ 2014-12-06 13:12 ` Ted Zlatanov 2014-12-08 21:49 ` Thomas Koch 2014-12-08 23:10 ` Lars Magne Ingebrigtsen 2014-12-08 22:24 ` Lars Magne Ingebrigtsen 2014-12-09 13:03 ` Dmitry Gutov 2 siblings, 2 replies; 85+ messages in thread From: Ted Zlatanov @ 2014-12-06 13:12 UTC (permalink / raw) To: emacs-devel EZ> Personally, I think arranging the development around this kind of EZ> process will not work without some critical mass of patch reviewers EZ> who are able to endure the current constant high volume of changes, EZ> let alone if we want to increase that volume. Being an efficient EZ> patch reviewer requires good knowledge of at least a few areas of the EZ> Emacs core, and we currently have only a handful of people who can EZ> qualify. (The obvious exception from this rule is a maintainer of a EZ> single package who can review patches for his/her package.) From EZ> experience of other projects, 5 reviewers is not enough for this task. I wouldn't mind reviewing things in the queue when I'm able. My wishlist for a patch queue management system (PR/pull request system for those familiar with the Github model): * targeted hydra builds for a specific branch * a click-and-done way to merge a specific branch into master or emacs-24 * maybe a comment system * maybe debbugs integration (but I do hate debbugs... really hate it...) * ability to review the potential ChangeLog entries that will be generated from the commit All of these, put together, would make it a pleasure to use. As a significant side benefit, Emacs wouldn't be the only project to benefit from these improvements if they were made in Savannah. Ted ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-06 13:12 ` Ted Zlatanov @ 2014-12-08 21:49 ` Thomas Koch 2014-12-08 23:10 ` Lars Magne Ingebrigtsen 1 sibling, 0 replies; 85+ messages in thread From: Thomas Koch @ 2014-12-08 21:49 UTC (permalink / raw) To: emacs-devel; +Cc: Ted Zlatanov We use gerrit at work so I can comment for it. On Saturday, December 06, 2014 08:12:31 AM Ted Zlatanov wrote: > My wishlist for a patch queue management system (PR/pull request system > for those familiar with the Github model): > > * targeted hydra builds for a specific branch I don't know hydra. We use jenkins which has a very good plugin to integrate with gerrit. Every commit that lands in gerrit triggers a jenkins build and jenkins leaves a vote afterwards in gerrit. Thus a human doesn't need to do a review as long as the jenkins build isn't good. > * a click-and-done way to merge a specific branch into master or emacs-24 This is called 'submit' in gerrit and it's click-and-done. > * maybe a comment system In gerrit you can comment and reply on every line of the commit, the commit message or comment on the whole change. > * maybe debbugs integration (but I do hate debbugs... really hate it...) - easy: link from gerrit changes to debbugs if a bug is referenced in the commit message - a bit more involved: trigger debbugs actions for actions in gerrit (new change, change merged...) > * ability to review the potential ChangeLog entries that will be > generated from the commit The commit message is part of the review. We generate changelogs from commit messages and add an 'ignore:' trailer if a commit should not be included in the changelog. A massive advantage of gerrit over reviewboard as used by the Apache Foundation is the frictionless integration with git. On the other hand gerrit is extremely powerful and customizable which might be a problem for somebody setting it up for the first time. Regards, Thomas Koch ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-06 13:12 ` Ted Zlatanov 2014-12-08 21:49 ` Thomas Koch @ 2014-12-08 23:10 ` Lars Magne Ingebrigtsen 2014-12-09 0:00 ` Lars Magne Ingebrigtsen ` (2 more replies) 1 sibling, 3 replies; 85+ messages in thread From: Lars Magne Ingebrigtsen @ 2014-12-08 23:10 UTC (permalink / raw) To: emacs-devel Ted Zlatanov <tzz@lifelogs.com> writes: > My wishlist for a patch queue management system (PR/pull request system > for those familiar with the Github model): > > * targeted hydra builds for a specific branch > > * a click-and-done way to merge a specific branch into master or emacs-24 > > * maybe a comment system > > * maybe debbugs integration (but I do hate debbugs... really hate it...) I like debbugs better than any other bug tracking system I've used. Because it's in Emacs. :-) `/ tls' and there all the TLS-related bugs are. But it does need more features to make it possible to type less when applying patches. A one-keystroke command to apply the patch, put the bug number into the ChangeLog, and do a "make" in a buffer to see whether any compilation warnings are generated, as well as a one-touch "make the commit message and check this stuff in" command. So, a one-key solution to apply and test a patch, and a one-key solution to checking it in. It's doable if somebody feels like doing it. As for tracking appliable patches, debbugs already offers that with the "patch" and "pending" tags. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-08 23:10 ` Lars Magne Ingebrigtsen @ 2014-12-09 0:00 ` Lars Magne Ingebrigtsen 2014-12-09 0:32 ` Lars Magne Ingebrigtsen 2014-12-09 2:57 ` Stefan Monnier 2014-12-09 12:37 ` Dmitry Gutov 2 siblings, 1 reply; 85+ messages in thread From: Lars Magne Ingebrigtsen @ 2014-12-09 0:00 UTC (permalink / raw) To: emacs-devel Lars Magne Ingebrigtsen <larsi@gnus.org> writes: > It's doable if somebody feels like doing it. Yeah, yeah. One of the most annoying things about applying patches is looking around for whether the person has assigned copyright to the FSF? Is there a reason why this list isn't available as a... web service? Or something? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-09 0:00 ` Lars Magne Ingebrigtsen @ 2014-12-09 0:32 ` Lars Magne Ingebrigtsen 0 siblings, 0 replies; 85+ messages in thread From: Lars Magne Ingebrigtsen @ 2014-12-09 0:32 UTC (permalink / raw) To: emacs-devel Lars Magne Ingebrigtsen <larsi@gnus.org> writes: > One of the most annoying things about applying patches is looking around > for whether the person has assigned copyright to the FSF? Is there a > reason why this list isn't available as a... web service? Or something? I just wrote a function to grep changelogs for names. Works almost as well. :-) Perhaps debbugs should have an automatic "nag the maintainer" functionality. I mean, at least once. There's a lot of bug reports in there that I think are very difficult for a third party to evaluate whether make sense or not. Of course, large swathes of Emacs are unmaintained... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-08 23:10 ` Lars Magne Ingebrigtsen 2014-12-09 0:00 ` Lars Magne Ingebrigtsen @ 2014-12-09 2:57 ` Stefan Monnier 2014-12-09 3:16 ` Lars Magne Ingebrigtsen 2014-12-09 12:37 ` Dmitry Gutov 2 siblings, 1 reply; 85+ messages in thread From: Stefan Monnier @ 2014-12-09 2:57 UTC (permalink / raw) To: Lars Magne Ingebrigtsen; +Cc: emacs-devel > It's doable if somebody feels like doing it. I'd love it, Stefan ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-09 2:57 ` Stefan Monnier @ 2014-12-09 3:16 ` Lars Magne Ingebrigtsen 0 siblings, 0 replies; 85+ messages in thread From: Lars Magne Ingebrigtsen @ 2014-12-09 3:16 UTC (permalink / raw) To: Stefan Monnier; +Cc: emacs-devel Stefan Monnier <monnier@iro.umontreal.ca> writes: >> It's doable if somebody feels like doing it. > > I'd love it, Great, because I've started implementing it. :-) But I'm not promising this in a timely fashion... Lots of fiddly systems interacting with each other. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-08 23:10 ` Lars Magne Ingebrigtsen 2014-12-09 0:00 ` Lars Magne Ingebrigtsen 2014-12-09 2:57 ` Stefan Monnier @ 2014-12-09 12:37 ` Dmitry Gutov 2014-12-09 17:20 ` Lars Magne Ingebrigtsen 2 siblings, 1 reply; 85+ messages in thread From: Dmitry Gutov @ 2014-12-09 12:37 UTC (permalink / raw) To: Lars Magne Ingebrigtsen; +Cc: emacs-devel Lars Magne Ingebrigtsen <larsi@gnus.org> writes: > I like debbugs better than any other bug tracking system I've used. > Because it's in Emacs. :-) `/ tls' and there all the TLS-related bugs > are. A lot of people dislike it, myself included. There was a yet-another thread about a replacement recently, but apparently it fizzled out. Too bad. > But it does need more features to make it possible to type less when > applying patches. A one-keystroke command to apply the patch, put the > bug number into the ChangeLog, and do a "make" in a buffer to see > whether any compilation warnings are generated, as well as a one-touch > "make the commit message and check this stuff in" command. This still won't compare with a decent code review system: - Externally visible queue of contributions, so that people from outside can get a better look at Emacs development, and maybe learn something. And speaking of debbugs, I can even get a list of "all bugs with patches" from inside of Emacs. - A working integration server that gives an overview of whether each patch (or better: Git branch) compiles, passes tests, etc, which will be a good reminder for a contributor if they broke something, even before a reviewer is involved. - Inline comments: hide the old ones as the discussion progresses, only show the ones still pertinent to the current changeset (though this part may be hard to integrate into Emacs either way). I was kinda hoping it might would serve as an alternative for debbugs comments. - If Git branches are involved, and ChangeLogs are phased out, an automatic "merge this branch" action would be natural to use, instead of doing the things you've enumerated above. If course, that's two whole ifs. ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-09 12:37 ` Dmitry Gutov @ 2014-12-09 17:20 ` Lars Magne Ingebrigtsen 2014-12-09 20:40 ` Dmitry Gutov 0 siblings, 1 reply; 85+ messages in thread From: Lars Magne Ingebrigtsen @ 2014-12-09 17:20 UTC (permalink / raw) To: Dmitry Gutov; +Cc: emacs-devel Dmitry Gutov <dgutov@yandex.ru> writes: > This still won't compare with a decent code review system: > > - Externally visible queue of contributions, so that people from outside > can get a better look at Emacs development, and maybe learn something. > And speaking of debbugs, I can even get a list of "all bugs with > patches" from inside of Emacs. Sure you can. `C-u / patch' in debbugs-gnu. > - A working integration server that gives an overview of whether each > patch (or better: Git branch) compiles, passes tests, etc, which will > be a good reminder for a contributor if they broke something, even > before a reviewer is involved. This can all be done by adding tags to bug reports in debbugs. > - Inline comments: hide the old ones as the discussion progresses, only > show the ones still pertinent to the current changeset (though this > part may be hard to integrate into Emacs either way). I was kinda > hoping it might would serve as an alternative for debbugs comments. That sounds nice, but 99% of patches in the bug tracker are small and need only a couple passes or less before they can be applied. So this would give us no extra patch handling power in reality. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-09 17:20 ` Lars Magne Ingebrigtsen @ 2014-12-09 20:40 ` Dmitry Gutov 2014-12-09 20:44 ` Lars Magne Ingebrigtsen 0 siblings, 1 reply; 85+ messages in thread From: Dmitry Gutov @ 2014-12-09 20:40 UTC (permalink / raw) To: Lars Magne Ingebrigtsen; +Cc: emacs-devel On 12/09/2014 07:20 PM, Lars Magne Ingebrigtsen wrote: >> I can['t] even get a list of "all bugs with patches" from inside of Emacs. > > Sure you can. `C-u / patch' in debbugs-gnu. Okay, thanks. Any reason why it includes closed bugs in the list? And could Debbugs be made to work snappier? 20000 is not much, on a database scale. >> - A working integration server that gives an overview of whether each >> patch (or better: Git branch) compiles, passes tests, etc, which will >> be a good reminder for a contributor if they broke something, even >> before a reviewer is involved. > > This can all be done by adding tags to bug reports in debbugs. ...I suppose. Note that integration server build status usually includes a status value (passed, failed, or errored before it had a chance to fail) and a url to the build info (where we can look at the log). Do you intend to keep the patch submission workflow the same? I.e. free-form (inline or in an attachment with arbitrary name), instead of a Git branch somewhere. How would integration server pick up and apply such patches? >> - Inline comments: hide the old ones as the discussion progresses, only >> show the ones still pertinent to the current changeset (though this >> part may be hard to integrate into Emacs either way). I was kinda >> hoping it might would serve as an alternative for debbugs comments. > > That sounds nice, but 99% of patches in the bug tracker are small and > need only a couple passes or less before they can be applied. So this > would give us no extra patch handling power in reality. It increases visibility into the discussion. Even if we're only talking two passes, being able to see just the comments that apply to the latest proposed version is pretty nice. Though of course, the smaller patches that don't need discussion would benefit more from being able to see that the build passes and instantly merge the contribution. ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-09 20:40 ` Dmitry Gutov @ 2014-12-09 20:44 ` Lars Magne Ingebrigtsen 2014-12-09 21:32 ` Dmitry Gutov 2014-12-09 21:57 ` Lars Magne Ingebrigtsen 0 siblings, 2 replies; 85+ messages in thread From: Lars Magne Ingebrigtsen @ 2014-12-09 20:44 UTC (permalink / raw) To: Dmitry Gutov; +Cc: emacs-devel Dmitry Gutov <dgutov@yandex.ru> writes: > Okay, thanks. Any reason why it includes closed bugs in the list? They're included for a few weeks. `x' to make them go away. > And could Debbugs be made to work snappier? 20000 is not much, on a > database scale. Indeed. > ...I suppose. Note that integration server build status usually > includes a status value (passed, failed, or errored before it had a > chance to fail) and a url to the build info (where we can look at the > log). Well, that's also nice, but for virtually all patches we get (which are to the Lisp bits), running a "make" in the current tree is sufficient to see whether the patch is whack or not. No need to wait for a result from an integration server. ("make test" if you want to be all modern and hang with the cool kids.) > Do you intend to keep the patch submission workflow the same? > I.e. free-form (inline or in an attachment with arbitrary name), > instead of a Git branch somewhere. Sending patches is really easy, even for kids these days. > It increases visibility into the discussion. Even if we're only > talking two passes, being able to see just the comments that apply to > the latest proposed version is pretty nice. Yes, it would be, but we're displaying the discussion threaded, so that kinda happens naturally. It would be nice to have a way to mark exactly what message contains the most current version of the patch, though. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-09 20:44 ` Lars Magne Ingebrigtsen @ 2014-12-09 21:32 ` Dmitry Gutov 2014-12-09 21:58 ` Lars Magne Ingebrigtsen 2014-12-09 21:57 ` Lars Magne Ingebrigtsen 1 sibling, 1 reply; 85+ messages in thread From: Dmitry Gutov @ 2014-12-09 21:32 UTC (permalink / raw) To: Lars Magne Ingebrigtsen; +Cc: emacs-devel On 12/09/2014 10:44 PM, Lars Magne Ingebrigtsen wrote: > They're included for a few weeks. `x' to make them go away. Thanks. > Well, that's also nice, but for virtually all patches we get (which are > to the Lisp bits), running a "make" in the current tree is sufficient to > see whether the patch is whack or not. No need to wait for a result > from an integration server. Quite the opposite, many bugs with Lisp code can only be found at runtime. One has to try hard to break the compilation. Anyway, you previous message gave me an impression that you do want an integration server. You don't? Okay... > ("make test" if you want to be all modern and hang with the cool kids.) Right. >> Do you intend to keep the patch submission workflow the same? >> I.e. free-form (inline or in an attachment with arbitrary name), >> instead of a Git branch somewhere. > > Sending patches is really easy, even for kids these days. This ignores the point I was making. To make it easier for automated tools, you'd have to make sending patches *harder*, at least a bit, for the uninitiated. >> It increases visibility into the discussion. Even if we're only >> talking two passes, being able to see just the comments that apply to >> the latest proposed version is pretty nice. > > Yes, it would be, but we're displaying the discussion threaded, so that > kinda happens naturally. That's not ideal: only one message's contents is displayed at the time, and when reading, one has to go up and down the thread, until they find the message that submits the patch, and then switch between the messages in the subthread which appear to respond to it. There's no other way to follow the discussions on each specific part of the patch, except to look at the quotes in each message and try to keep it together in your head. With inline comments, you can have granular comment threads that only apply to specific part of the patch. > It would be nice to have a way to mark exactly > what message contains the most current version of the patch, though. Even that would be an improvement, yes. ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-09 21:32 ` Dmitry Gutov @ 2014-12-09 21:58 ` Lars Magne Ingebrigtsen 0 siblings, 0 replies; 85+ messages in thread From: Lars Magne Ingebrigtsen @ 2014-12-09 21:58 UTC (permalink / raw) To: Dmitry Gutov; +Cc: emacs-devel Dmitry Gutov <dgutov@yandex.ru> writes: > Anyway, you previous message gave me an impression that you do want an > integration server. You don't? Okay... I do, but it doesn't have to be involved in the patch application process. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-09 20:44 ` Lars Magne Ingebrigtsen 2014-12-09 21:32 ` Dmitry Gutov @ 2014-12-09 21:57 ` Lars Magne Ingebrigtsen 2014-12-10 14:35 ` Ted Zlatanov 1 sibling, 1 reply; 85+ messages in thread From: Lars Magne Ingebrigtsen @ 2014-12-09 21:57 UTC (permalink / raw) To: emacs-devel I pushed a DWIM thing to debbugs-gnu that cuts down on patch handling a bit. It's easier to explain with pictures: http://lars.ingebrigtsen.no/2014/12/09/one-touch-maintainin/ It's not quite finished -- there are probably lots of cases where it doesn't work right. So fix anything you like. :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-09 21:57 ` Lars Magne Ingebrigtsen @ 2014-12-10 14:35 ` Ted Zlatanov 0 siblings, 0 replies; 85+ messages in thread From: Ted Zlatanov @ 2014-12-10 14:35 UTC (permalink / raw) To: emacs-devel On Tue, 09 Dec 2014 22:57:23 +0100 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: LMI> I pushed a DWIM thing to debbugs-gnu that cuts down on patch handling a LMI> bit. It's easier to explain with pictures: LMI> http://lars.ingebrigtsen.no/2014/12/09/one-touch-maintainin/ LMI> It's not quite finished -- there are probably lots of cases where it LMI> doesn't work right. So fix anything you like. :-) I like the idea. Very similar to your gmane admin flow :) I'll try it out. Ted ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-06 10:08 ` Patch queue management systems Eli Zaretskii 2014-12-06 13:12 ` Ted Zlatanov @ 2014-12-08 22:24 ` Lars Magne Ingebrigtsen 2014-12-08 22:54 ` joakim ` (3 more replies) 2014-12-09 13:03 ` Dmitry Gutov 2 siblings, 4 replies; 85+ messages in thread From: Lars Magne Ingebrigtsen @ 2014-12-08 22:24 UTC (permalink / raw) To: emacs-devel Eli Zaretskii <eliz@gnu.org> writes: > Personally, I think arranging the development around this kind of > process will not work without some critical mass of patch reviewers > who are able to endure the current constant high volume of changes, > let alone if we want to increase that volume. Perhaps we could attract more people by gamifying the Emacs development, a la Github. That is, score people on bug closures and stuff. The winner each month could get a free copy of the Emacs sources. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-08 22:24 ` Lars Magne Ingebrigtsen @ 2014-12-08 22:54 ` joakim 2014-12-09 5:31 ` Ivan Andrus 2014-12-09 0:06 ` Thien-Thi Nguyen ` (2 subsequent siblings) 3 siblings, 1 reply; 85+ messages in thread From: joakim @ 2014-12-08 22:54 UTC (permalink / raw) To: Lars Magne Ingebrigtsen; +Cc: emacs-devel Lars Magne Ingebrigtsen <larsi@gnus.org> writes: > Eli Zaretskii <eliz@gnu.org> writes: > >> Personally, I think arranging the development around this kind of >> process will not work without some critical mass of patch reviewers >> who are able to endure the current constant high volume of changes, >> let alone if we want to increase that volume. > > Perhaps we could attract more people by gamifying the Emacs development, > a la Github. That is, score people on bug closures and stuff. > > The winner each month could get a free copy of the Emacs sources. I actually have a emacs gamification mode ive been meaning to upload somewhere. It is very simple yet effective. (define-minor-mode zen-reward-mode "type a lot and get a reward!." :global t :init-value nil :lighter nil :keymap nil :group 'zen (if zen-reward-mode (progn (add-hook 'pre-command-hook 'zen-reward-pre-command-hook) (add-hook 'org-after-todo-state-change-hook 'zen-reward-todo-state-change-hook)) (progn (remove-hook 'pre-command-hook 'zen-reward-pre-command-hook) (remove-hook 'org-after-todo-state-change-hook 'zen-reward-todo-state-change-hook)))) (defvar zen-reward-accumulator 0) (defun zen-reward-todo-state-change-hook () (message "todo hook %s %s" org-state (org-show-priority)) ;;if you toggle a task back and forth you get super rich. ;;you get rewarded for CANCELLED also, but that is good! (if (equal org-state "DONE") (progn (let ((reward (string-to-number (substring (org-show-priority) (length "Priority is ") )))) ;;priority A is 4001, B 3001 and so on. probably can be negative as well. so reward needs to be modified a bit (message "todo reward %d!" reward) (setq zen-reward-accumulator (+ reward zen-reward-accumulator) )) )) ) ;testing. only get reward for typing, not for cursor movement and other things (defun zen-reward-pre-command-hook () "accumulate typing reward." (if (or (eq real-last-command 'self-insert-command) (eq real-last-command 'org-self-insert-command)) (setq zen-reward-accumulator (1+ zen-reward-accumulator) )) ;; (message "reward:%d %s %d" zen-reward-accumulator real-last-command (random)) ) (defun zen-claim-reward () "cash in your bountiful reward, spend it on fun and games!" (interactive ) (message "reward:%d" zen-reward-accumulator) (setq zen-reward-accumulator 0)) (defun zen-inspect-reward () "how soon can i afford fun and games?" (interactive ) (message "zen reward:%d" zen-reward-accumulator) ) ;; (zen-reward-mode) -- Joakim Verona ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-08 22:54 ` joakim @ 2014-12-09 5:31 ` Ivan Andrus 0 siblings, 0 replies; 85+ messages in thread From: Ivan Andrus @ 2014-12-09 5:31 UTC (permalink / raw) To: joakim; +Cc: Lars Magne Ingebrigtsen, emacs-devel On Dec 8, 2014, at 3:54 PM, joakim@verona.se wrote: > > Lars Magne Ingebrigtsen <larsi@gnus.org> writes: > >> Eli Zaretskii <eliz@gnu.org> writes: >> >>> Personally, I think arranging the development around this kind of >>> process will not work without some critical mass of patch reviewers >>> who are able to endure the current constant high volume of changes, >>> let alone if we want to increase that volume. >> >> Perhaps we could attract more people by gamifying the Emacs development, >> a la Github. That is, score people on bug closures and stuff. >> >> The winner each month could get a free copy of the Emacs sources. > > I actually have a emacs gamification mode ive been meaning to upload > somewhere. It is very simple yet effective. My gamification package (achievements) is available on MELPA, or at https://bitbucket.org/gvol/emacs-achievements Though I have to admit that I don’t have any achievements for reviewing patches. Patches welcome. :-) -Ivan ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-08 22:24 ` Lars Magne Ingebrigtsen 2014-12-08 22:54 ` joakim @ 2014-12-09 0:06 ` Thien-Thi Nguyen 2014-12-09 2:54 ` Stefan Monnier 2014-12-09 8:13 ` Stephen Leake 3 siblings, 0 replies; 85+ messages in thread From: Thien-Thi Nguyen @ 2014-12-09 0:06 UTC (permalink / raw) To: emacs-devel [-- Attachment #1: Type: text/plain, Size: 1048 bytes --] () Lars Magne Ingebrigtsen <larsi@gnus.org> () Mon, 08 Dec 2014 23:24:44 +0100 > Personally, I think arranging the development around this > kind of process will not work without some critical mass of > patch reviewers who are able to endure the current constant > high volume of changes, let alone if we want to increase that > volume. Perhaps we could attract more people by gamifying the Emacs development, a la Github. That is, score people on bug closures and stuff. A (psychologically) related maneuver is specialization (a la Brooks' MMM "team" concept). For example, for LibreDWG, i limit the damage i do by relegating myself to a fussy-bureaucrat role: http://lists.gnu.org/archive/html/libredwg/2014-12/msg00012.html Pignolo, io?! Ma va... è un dono! :-D -- Thien-Thi Nguyen GPG key: 4C807502 (if you're human and you know it) read my lisp: (responsep (questions 'technical) (not (via 'mailing-list))) => nil [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-08 22:24 ` Lars Magne Ingebrigtsen 2014-12-08 22:54 ` joakim 2014-12-09 0:06 ` Thien-Thi Nguyen @ 2014-12-09 2:54 ` Stefan Monnier 2014-12-09 3:15 ` Lars Magne Ingebrigtsen 2014-12-09 8:13 ` Stephen Leake 3 siblings, 1 reply; 85+ messages in thread From: Stefan Monnier @ 2014-12-09 2:54 UTC (permalink / raw) To: Lars Magne Ingebrigtsen; +Cc: emacs-devel > The winner each month could get a free copy of the Emacs sources. More seriously, I'd be happy to send the winner a quart of my home made ice-cream. Stefan ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-09 2:54 ` Stefan Monnier @ 2014-12-09 3:15 ` Lars Magne Ingebrigtsen 0 siblings, 0 replies; 85+ messages in thread From: Lars Magne Ingebrigtsen @ 2014-12-09 3:15 UTC (permalink / raw) To: Stefan Monnier; +Cc: emacs-devel Stefan Monnier <monnier@iro.umontreal.ca> writes: >> The winner each month could get a free copy of the Emacs sources. > > More seriously, I'd be happy to send the winner a quart of my home made > ice-cream. Even more seriously, I could design and make some t-shirts and mail them to the winners. :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-08 22:24 ` Lars Magne Ingebrigtsen ` (2 preceding siblings ...) 2014-12-09 2:54 ` Stefan Monnier @ 2014-12-09 8:13 ` Stephen Leake 3 siblings, 0 replies; 85+ messages in thread From: Stephen Leake @ 2014-12-09 8:13 UTC (permalink / raw) To: emacs-devel Lars Magne Ingebrigtsen <larsi@gnus.org> writes: > Eli Zaretskii <eliz@gnu.org> writes: > >> Personally, I think arranging the development around this kind of >> process will not work without some critical mass of patch reviewers >> who are able to endure the current constant high volume of changes, >> let alone if we want to increase that volume. > > Perhaps we could attract more people by gamifying the Emacs development, > a la Github. That is, score people on bug closures and stuff. On monotone, we had occasional "bugathons". Somebody would put up $20 or so for the prize of monotone swag (hats, mugs etc with the monotone logo). It worked pretty well. -- -- Stephe ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-06 10:08 ` Patch queue management systems Eli Zaretskii 2014-12-06 13:12 ` Ted Zlatanov 2014-12-08 22:24 ` Lars Magne Ingebrigtsen @ 2014-12-09 13:03 ` Dmitry Gutov 2014-12-09 17:09 ` Eli Zaretskii 2 siblings, 1 reply; 85+ messages in thread From: Dmitry Gutov @ 2014-12-09 13:03 UTC (permalink / raw) To: Eli Zaretskii; +Cc: eggert, monnier, emacs-devel On 12/06/2014 12:08 PM, Eli Zaretskii wrote: > I think by far the 2 main issues we will have with these tools are: > > . The tools don't have Emacs integration built into them, nor offer > Emacs VC sub-modes. (Gerrit has a magit plugin.) I'm guessing we > would like to arrange for such an integration in VC, because people > who review patches are accustomed to using Emacs and have elaborate > customizations for this that they would lose if the review is only > done via a Web browser (even if that browser is eww). Looking at magit-gerrit, it's not that big. If you're okay with that level of integration, it shouldn't take too much work, as long as the review system comes with a command-line tool or an API (which, of course, will be a requirement). > . The tools require non-trivial changes in the workflow advertised on > the Wiki. E.g., Gerrit requires to work with magic local branches > and detached heads. We should carefully evaluate this and decide > how to make sure this won't trip those of us who are less > proficient in Git (which, judging by the current traffic on > emacs-devel, seems like a rule rather than exception) and cause > corruption of the upstream repository. > > There are also other minor issues we need to figure out: licenses, the > underlying infrastructure (e.g., AFIU, Phabricator requires PHP), etc. Right, I'll have to investigate that. Licenses shouldn't be a problem (I only looked for Free Software packages), and as for infrastructure, someone should point out any particular problems that can turn out to be insurmountable. I can't think of any. > Personally, I think arranging the development around this kind of > process will not work without some critical mass of patch reviewers > who are able to endure the current constant high volume of changes, > let alone if we want to increase that volume. Right, but that's only if/when we decide to push all contributions though this system. We could start light, and continue allowing committing directly to the repository, but move the patches-to-be-discussed (which will take up reviewers' time anyway) to the new system. On the other hand, if we want to use this to guarantee quality of commit messages, a review process in some form will be required anyway, but since a lot of focus would be on the form rather than substance, not every reviewer would have to be intimately familiar with the area of the code they're reviewing. ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-09 13:03 ` Dmitry Gutov @ 2014-12-09 17:09 ` Eli Zaretskii 2014-12-09 17:17 ` Dmitry Gutov 0 siblings, 1 reply; 85+ messages in thread From: Eli Zaretskii @ 2014-12-09 17:09 UTC (permalink / raw) To: Dmitry Gutov; +Cc: eggert, monnier, emacs-devel > Date: Tue, 09 Dec 2014 15:03:00 +0200 > From: Dmitry Gutov <dgutov@yandex.ru> > CC: monnier@iro.umontreal.ca, emacs-devel@gnu.org, eggert@cs.ucla.edu > > On 12/06/2014 12:08 PM, Eli Zaretskii wrote: > > > I think by far the 2 main issues we will have with these tools are: > > > > . The tools don't have Emacs integration built into them, nor offer > > Emacs VC sub-modes. (Gerrit has a magit plugin.) I'm guessing we > > would like to arrange for such an integration in VC, because people > > who review patches are accustomed to using Emacs and have elaborate > > customizations for this that they would lose if the review is only > > done via a Web browser (even if that browser is eww). > > Looking at magit-gerrit, it's not that big. If you're okay with that > level of integration, it shouldn't take too much work, as long as the > review system comes with a command-line tool or an API (which, of > course, will be a requirement). Magit is not part of Emacs. I think we would like this to be integrated into VC. > > Personally, I think arranging the development around this kind of > > process will not work without some critical mass of patch reviewers > > who are able to endure the current constant high volume of changes, > > let alone if we want to increase that volume. > > Right, but that's only if/when we decide to push all contributions > though this system. We could start light, and continue allowing > committing directly to the repository, but move the > patches-to-be-discussed (which will take up reviewers' time anyway) to > the new system. I'm not sure such a split process makes sense. It will complicate procedures and most probably cause some patches fall through the cracks. > On the other hand, if we want to use this to guarantee quality of commit > messages, a review process in some form will be required anyway, but > since a lot of focus would be on the form rather than substance, not > every reviewer would have to be intimately familiar with the area of the > code they're reviewing. I think comments about the form are usually the easiest part of the review, and some of that can be automated. Also, some form-related issues are actually derived from familiarity with Emacs design and implementation. So yes, we could have "junior reviewers" who'd only deal with form issues, but that would off-load only a minor portion of the work required to do this. ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-09 17:09 ` Eli Zaretskii @ 2014-12-09 17:17 ` Dmitry Gutov 2014-12-09 17:36 ` Eli Zaretskii 0 siblings, 1 reply; 85+ messages in thread From: Dmitry Gutov @ 2014-12-09 17:17 UTC (permalink / raw) To: Eli Zaretskii; +Cc: eggert, monnier, emacs-devel On 12/09/2014 07:09 PM, Eli Zaretskii wrote: > Magit is not part of Emacs. I think we would like this to be > integrated into VC. Right. I meant reimplementing magit-gerrit won't take too much work. >> Right, but that's only if/when we decide to push all contributions >> though this system. We could start light, and continue allowing >> committing directly to the repository, but move the >> patches-to-be-discussed (which will take up reviewers' time anyway) to >> the new system. > > I'm not sure such a split process makes sense. It will complicate > procedures and most probably cause some patches fall through the > cracks. Why? It's not much different from what happens now. Consider this: if a patch is posted to the bug tracker or emacs-devel now, it would go though the new system when it's set up. Patches that are written by users with commit access and installed directly will continue to proceed this way. > I think comments about the form are usually the easiest part of the > review, and some of that can be automated. Also, some form-related > issues are actually derived from familiarity with Emacs design and > implementation. So yes, we could have "junior reviewers" who'd only > deal with form issues, but that would off-load only a minor portion of > the work required to do this. I don't know about that. If the code is written by a senior developer in the area where they're competent, most of the time only superficial review is required (unless the author explicitly indicates otherwise). Then a junior could be enough, too. ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-09 17:17 ` Dmitry Gutov @ 2014-12-09 17:36 ` Eli Zaretskii 2014-12-09 19:31 ` Dmitry Gutov 2014-12-10 14:39 ` Ted Zlatanov 0 siblings, 2 replies; 85+ messages in thread From: Eli Zaretskii @ 2014-12-09 17:36 UTC (permalink / raw) To: Dmitry Gutov; +Cc: eggert, monnier, emacs-devel > Date: Tue, 09 Dec 2014 19:17:26 +0200 > From: Dmitry Gutov <dgutov@yandex.ru> > CC: monnier@iro.umontreal.ca, emacs-devel@gnu.org, eggert@cs.ucla.edu > > Patches that are written by users with commit access and installed > directly will continue to proceed this way. I thought we wanted to make the review process mandatory for everybody. If we don't, we will have to come up with strict criteria for granting commit access, because commit access is global and nowadays given to people who only work on a small number of specific areas. ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-09 17:36 ` Eli Zaretskii @ 2014-12-09 19:31 ` Dmitry Gutov 2014-12-10 14:39 ` Ted Zlatanov 1 sibling, 0 replies; 85+ messages in thread From: Dmitry Gutov @ 2014-12-09 19:31 UTC (permalink / raw) To: Eli Zaretskii; +Cc: eggert, monnier, emacs-devel On 12/09/2014 07:36 PM, Eli Zaretskii wrote: > I thought we wanted to make the review process mandatory for > everybody. A code review system can facilitate that workflow, but it doesn't require it. > If we don't, we will have to come up with strict criteria for granting > commit access, because commit access is global and nowadays given to > people who only work on a small number of specific areas. Yes, probably. Either way, I'm ambivalent on the question of removing ChangeLogs, but doing that would allow to simplify automatic merging of patches. ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-09 17:36 ` Eli Zaretskii 2014-12-09 19:31 ` Dmitry Gutov @ 2014-12-10 14:39 ` Ted Zlatanov 2014-12-11 8:59 ` Steinar Bang 1 sibling, 1 reply; 85+ messages in thread From: Ted Zlatanov @ 2014-12-10 14:39 UTC (permalink / raw) To: emacs-devel On Tue, 09 Dec 2014 19:36:45 +0200 Eli Zaretskii <eliz@gnu.org> wrote: EZ> If we don't, we will have to come up with strict criteria for granting EZ> commit access, because commit access is global and nowadays given to EZ> people who only work on a small number of specific areas. It could be more fine-grained, only protecting certain branches (master, emacs-*, etc.). Then people can push to "username/feature" branches and maintainers can merge into a protected branch. Ted ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-10 14:39 ` Ted Zlatanov @ 2014-12-11 8:59 ` Steinar Bang 2014-12-11 11:52 ` Ted Zlatanov 2014-12-11 18:43 ` Achim Gratz 0 siblings, 2 replies; 85+ messages in thread From: Steinar Bang @ 2014-12-11 8:59 UTC (permalink / raw) To: emacs-devel >>>>> Ted Zlatanov <tzz@lifelogs.com>: > It could be more fine-grained, only protecting certain branches > (master, emacs-*, etc.). Then people can push to "username/feature" > branches and maintainers can merge into a protected branch. "username/feature" sounds like a good naming scheme and one that could cut down on the inevitable clutter (implicit blame). (and I still think having a separate feature branch git repository is a good idea. If that repository resides on the same server and is created with hardlinks to the real repo, it should also be cheap disk-usage-wise, at least initially....) ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-11 8:59 ` Steinar Bang @ 2014-12-11 11:52 ` Ted Zlatanov 2014-12-11 12:38 ` Steinar Bang 2014-12-11 18:43 ` Achim Gratz 1 sibling, 1 reply; 85+ messages in thread From: Ted Zlatanov @ 2014-12-11 11:52 UTC (permalink / raw) To: emacs-devel On Thu, 11 Dec 2014 09:59:28 +0100 Steinar Bang <sb@dod.no> wrote: >>>>>> Ted Zlatanov <tzz@lifelogs.com>: >> It could be more fine-grained, only protecting certain branches >> (master, emacs-*, etc.). Then people can push to "username/feature" >> branches and maintainers can merge into a protected branch. SB> "username/feature" sounds like a good naming scheme and one that could SB> cut down on the inevitable clutter (implicit blame). SB> (and I still think having a separate feature branch git repository is a SB> good idea. Yeah, it would make allowing non-fast-forward pushes easier. SB> If that repository resides on the same server and is created with SB> hardlinks to the real repo, it should also be cheap disk-usage-wise, SB> at least initially....) Eh. Ted ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-11 11:52 ` Ted Zlatanov @ 2014-12-11 12:38 ` Steinar Bang 2014-12-11 14:31 ` Ted Zlatanov 0 siblings, 1 reply; 85+ messages in thread From: Steinar Bang @ 2014-12-11 12:38 UTC (permalink / raw) To: emacs-devel >>>>> Ted Zlatanov <tzz@lifelogs.com>: SB> If that repository resides on the same server and is created with SB> hardlinks to the real repo, it should also be cheap disk-usage-wise, SB> at least initially....) > Eh. cd /wherever/the/emacs/repo/lives git clone --mirror ./emacs.git ./emacs-feature-branches.git If the git used is reasonably new, then all of the known-by-hash objects in the new repository will be hardlinks to the original repo (which is safe since these will never change). So the new repository will initially use very little space on disk (all history from the time of cloning will use the same inodes as the original repository). But as times goes and the emacs-feature-branches repo is filled by clutter, the space usage of the feature branches repository will increase. Of course an easy way of doing housecleaning here, would be: cd /wherever/the/emacs/repo/lives rm -rf emacs-feature-branches.git git clone --mirror ./emacs.git ./emacs-feature-branches.git and then let people repush their feature branches. ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-11 12:38 ` Steinar Bang @ 2014-12-11 14:31 ` Ted Zlatanov 2014-12-11 14:39 ` David Kastrup 0 siblings, 1 reply; 85+ messages in thread From: Ted Zlatanov @ 2014-12-11 14:31 UTC (permalink / raw) To: emacs-devel On Thu, 11 Dec 2014 13:38:15 +0100 Steinar Bang <sb@dod.no> wrote: >>>>>> Ted Zlatanov <tzz@lifelogs.com>: SB> If that repository resides on the same server and is created with SB> hardlinks to the real repo, it should also be cheap disk-usage-wise, SB> at least initially....) >> Eh. SB> cd /wherever/the/emacs/repo/lives SB> git clone --mirror ./emacs.git ./emacs-feature-branches.git SB> If the git used is reasonably new, then all of the known-by-hash objects SB> in the new repository will be hardlinks to the original repo (which is SB> safe since these will never change). I know all that (and the ways to override it) :) I was saying that saving disk space is really low on the list of benefits. Allowing non-fast-forward pushes for certain branches is much more valuable to the Emacs project. Stefan, Glenn: any chance we can get a contributor repo set up that's just like the Emacs repo but allows non-fast-forward pushes, and whose commits go to emacs-diffs? Even better would be if user X could only push to branches "X/.*" Thanks Ted ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-11 14:31 ` Ted Zlatanov @ 2014-12-11 14:39 ` David Kastrup 2014-12-11 14:50 ` Ted Zlatanov 2014-12-11 14:55 ` Andreas Schwab 0 siblings, 2 replies; 85+ messages in thread From: David Kastrup @ 2014-12-11 14:39 UTC (permalink / raw) To: emacs-devel Ted Zlatanov <tzz@lifelogs.com> writes: > On Thu, 11 Dec 2014 13:38:15 +0100 Steinar Bang <sb@dod.no> wrote: > >>>>>>> Ted Zlatanov <tzz@lifelogs.com>: > SB> If that repository resides on the same server and is created with > SB> hardlinks to the real repo, it should also be cheap disk-usage-wise, > SB> at least initially....) > >>> Eh. > > SB> cd /wherever/the/emacs/repo/lives > SB> git clone --mirror ./emacs.git ./emacs-feature-branches.git > > SB> If the git used is reasonably new, then all of the known-by-hash objects > SB> in the new repository will be hardlinks to the original repo (which is > SB> safe since these will never change). > > I know all that (and the ways to override it) :) > > I was saying that saving disk space is really low on the list of > benefits. Allowing non-fast-forward pushes for certain branches is much > more valuable to the Emacs project. > > Stefan, Glenn: any chance we can get a contributor repo set up that's > just like the Emacs repo but allows non-fast-forward pushes, and whose > commits go to emacs-diffs? Even better would be if user X could only > push to branches "X/.*" Doesn't need a separate repo: a server side commit hook refusing non-fast-forward pushes (more exactly: updating the reference after the commit object is already there) on any path not starting, say, with dev/, should be easily possible. -- David Kastrup ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-11 14:39 ` David Kastrup @ 2014-12-11 14:50 ` Ted Zlatanov 2014-12-11 14:55 ` Andreas Schwab 1 sibling, 0 replies; 85+ messages in thread From: Ted Zlatanov @ 2014-12-11 14:50 UTC (permalink / raw) To: emacs-devel On Thu, 11 Dec 2014 15:39:51 +0100 David Kastrup <dak@gnu.org> wrote: DK> Ted Zlatanov <tzz@lifelogs.com> writes: >> Stefan, Glenn: any chance we can get a contributor repo set up that's >> just like the Emacs repo but allows non-fast-forward pushes, and whose >> commits go to emacs-diffs? Even better would be if user X could only >> push to branches "X/.*" DK> Doesn't need a separate repo: a server side commit hook refusing DK> non-fast-forward pushes (more exactly: updating the reference after the DK> commit object is already there) on any path not starting, say, with DK> dev/, should be easily possible. Works for me (I've only set it up globally, so I didn't know it was selectively possible). Can you or one of the other admins set it up? It would be very helpful. A "dev/" prefix is fine by me, and makes it easy to automatically fetch the relevant upstreams, something like: [remote "origin"] fetch = +refs/dev/*/head:refs/remotes/origin/dev/* Thanks Ted ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-11 14:39 ` David Kastrup 2014-12-11 14:50 ` Ted Zlatanov @ 2014-12-11 14:55 ` Andreas Schwab 2014-12-11 15:00 ` Ted Zlatanov 2014-12-11 15:19 ` David Kastrup 1 sibling, 2 replies; 85+ messages in thread From: Andreas Schwab @ 2014-12-11 14:55 UTC (permalink / raw) To: David Kastrup; +Cc: emacs-devel David Kastrup <dak@gnu.org> writes: > Doesn't need a separate repo: a server side commit hook refusing > non-fast-forward pushes (more exactly: updating the reference after the > commit object is already there) on any path not starting, say, with > dev/, should be easily possible. Doesn't even need that as long as you can delete branches. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-11 14:55 ` Andreas Schwab @ 2014-12-11 15:00 ` Ted Zlatanov 2014-12-11 15:26 ` David Kastrup 2014-12-11 15:19 ` David Kastrup 1 sibling, 1 reply; 85+ messages in thread From: Ted Zlatanov @ 2014-12-11 15:00 UTC (permalink / raw) To: emacs-devel On Thu, 11 Dec 2014 15:55:35 +0100 Andreas Schwab <schwab@suse.de> wrote: AS> David Kastrup <dak@gnu.org> writes: >> Doesn't need a separate repo: a server side commit hook refusing >> non-fast-forward pushes (more exactly: updating the reference after the >> commit object is already there) on any path not starting, say, with >> dev/, should be easily possible. AS> Doesn't even need that as long as you can delete branches. Doesn't even need that as long as we have Github. Ted ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-11 15:00 ` Ted Zlatanov @ 2014-12-11 15:26 ` David Kastrup 2014-12-11 15:33 ` Ted Zlatanov 0 siblings, 1 reply; 85+ messages in thread From: David Kastrup @ 2014-12-11 15:26 UTC (permalink / raw) To: emacs-devel Ted Zlatanov <tzz@lifelogs.com> writes: > On Thu, 11 Dec 2014 15:55:35 +0100 Andreas Schwab <schwab@suse.de> wrote: > > AS> David Kastrup <dak@gnu.org> writes: >>> Doesn't need a separate repo: a server side commit hook refusing >>> non-fast-forward pushes (more exactly: updating the reference after the >>> commit object is already there) on any path not starting, say, with >>> dev/, should be easily possible. > > AS> Doesn't even need that as long as you can delete branches. > > Doesn't even need that as long as we have Github. We don't "have" GitHub. It's owned by a company and is running proprietary software to which we don't have access. -- David Kastrup ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-11 15:26 ` David Kastrup @ 2014-12-11 15:33 ` Ted Zlatanov 2014-12-11 15:49 ` David Kastrup 0 siblings, 1 reply; 85+ messages in thread From: Ted Zlatanov @ 2014-12-11 15:33 UTC (permalink / raw) To: emacs-devel On Thu, 11 Dec 2014 16:26:21 +0100 David Kastrup <dak@gnu.org> wrote: DK> Ted Zlatanov <tzz@lifelogs.com> writes: >> On Thu, 11 Dec 2014 15:55:35 +0100 Andreas Schwab <schwab@suse.de> wrote: >> AS> David Kastrup <dak@gnu.org> writes: >>>> Doesn't need a separate repo: a server side commit hook refusing >>>> non-fast-forward pushes (more exactly: updating the reference after the >>>> commit object is already there) on any path not starting, say, with >>>> dev/, should be easily possible. >> AS> Doesn't even need that as long as you can delete branches. >> >> Doesn't even need that as long as we have Github. DK> We don't "have" GitHub. It's owned by a company and is running DK> proprietary software to which we don't have access. Sorry, I forgot to add sarcasm tags. Ted ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-11 15:33 ` Ted Zlatanov @ 2014-12-11 15:49 ` David Kastrup 0 siblings, 0 replies; 85+ messages in thread From: David Kastrup @ 2014-12-11 15:49 UTC (permalink / raw) To: emacs-devel Ted Zlatanov <tzz@lifelogs.com> writes: > On Thu, 11 Dec 2014 16:26:21 +0100 David Kastrup <dak@gnu.org> wrote: > > DK> Ted Zlatanov <tzz@lifelogs.com> writes: >>> On Thu, 11 Dec 2014 15:55:35 +0100 Andreas Schwab <schwab@suse.de> wrote: >>> > AS> David Kastrup <dak@gnu.org> writes: >>>>> Doesn't need a separate repo: a server side commit hook refusing >>>>> non-fast-forward pushes (more exactly: updating the reference after the >>>>> commit object is already there) on any path not starting, say, with >>>>> dev/, should be easily possible. >>> > AS> Doesn't even need that as long as you can delete branches. >>> >>> Doesn't even need that as long as we have Github. > > DK> We don't "have" GitHub. It's owned by a company and is running > DK> proprietary software to which we don't have access. > > Sorry, I forgot to add sarcasm tags. It isn't sarcasm if an overwhelming majority of readers would not know the difference. This happens to be a publicly archived mailing list. -- David Kastrup ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-11 14:55 ` Andreas Schwab 2014-12-11 15:00 ` Ted Zlatanov @ 2014-12-11 15:19 ` David Kastrup 1 sibling, 0 replies; 85+ messages in thread From: David Kastrup @ 2014-12-11 15:19 UTC (permalink / raw) To: Andreas Schwab; +Cc: emacs-devel Andreas Schwab <schwab@suse.de> writes: > David Kastrup <dak@gnu.org> writes: > >> Doesn't need a separate repo: a server side commit hook refusing >> non-fast-forward pushes (more exactly: updating the reference after the >> commit object is already there) on any path not starting, say, with >> dev/, should be easily possible. > > Doesn't even need that as long as you can delete branches. Yes and no. Deleting and recreating a branch removes its reflog. If something goes wrong at the server side, it might be nice to have around. For basically ephemeral branches, this might be fine. For branches like master, one might want to disable branch deletion altogether except for possibly some privileged users. For, say, /dev/username/* one might want to restrict branch deletion/non-fastforward to the given username. A commit hook can do such things IIRC. -- David Kastrup ^ permalink raw reply [flat|nested] 85+ messages in thread
* Re: Patch queue management systems 2014-12-11 8:59 ` Steinar Bang 2014-12-11 11:52 ` Ted Zlatanov @ 2014-12-11 18:43 ` Achim Gratz 1 sibling, 0 replies; 85+ messages in thread From: Achim Gratz @ 2014-12-11 18:43 UTC (permalink / raw) To: emacs-devel Steinar Bang writes: > "username/feature" sounds like a good naming scheme and one that could > cut down on the inevitable clutter (implicit blame). I'd rather suggest features/<...>. Anyone not wanting to look at feature branches would simply not get those refs and everyone else can either import single feature branches or all of them with an additional line in the config file. > (and I still think having a separate feature branch git repository is a > good idea. If that repository resides on the same server and is created > with hardlinks to the real repo, it should also be cheap > disk-usage-wise, at least initially....) By using a branch prefix you can keep it in the same repository. There's a multitude of ways to have a feature repository share the objects with the main repository if you'd rather want that. Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Terratec KOMPLEXER: http://Synth.Stromeko.net/Downloads.html#KomplexerWaves ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-12-05 8:07 ` Glenn Morris 2014-12-05 8:38 ` Eli Zaretskii 2014-12-05 14:33 ` Ted Zlatanov @ 2014-12-05 15:38 ` Stefan Monnier 2014-12-06 4:42 ` Paul Eggert 2015-01-03 1:37 ` Glenn Morris 3 siblings, 1 reply; 85+ messages in thread From: Stefan Monnier @ 2014-12-05 15:38 UTC (permalink / raw) To: Glenn Morris; +Cc: 19113, Paul Eggert > are important forms of documentation; and frankly I don't even see that > it will save much work. But I'm obviously in a minority, so don't let me > stop you. I do have a list though; do whatever you like in response to it. Good, so let's do it. > 1) There are still things to deal with from the last big change, so I'd > appreciate it if you not do this before January at the earliest. Fine. > 2) Announce the change well in advance, and make it very clear what > people need to do (ie, take much more care with their logs than before). Right. the ./CONTRIBUTE file should pay special attention to it. > Put a clear set of instructions in admin/notes. Eg how will I replace `C-x > 4 a', `C-c C-a' now? (Frankly I expect to keep doing that, just not Indeed, I think for now this will be the recommendation. > 3) How will I mark a change so that it does not generate a ChangeLog? Why bother? > 4) What if I commit something, realize it was wrong, and remove it right > away? Normally I'd delete the ChangeLog entry too. I don't think it's a serious problem. We already use "reverted last change to <foo>" regularly. > 5) Will I be able to mark a portion of a log to be excluded from the > generated ChangeLog? I don't think so, but I don't see why that would be a problem. > 6) How does the correction method work (I'm being lazy and not reading > the patch). I think by and large it doesn't: it's too complicated to be of regular use. And since it only fixes the ChangeLog but not the "git log" output, its usefulness is rather limited. > I'm not going to bother to correct them anymore. That's one of the work it will save us. > 7) What dates will entries get? The commit date? This may not match the > push date. What will happen with the dates of entries merged from other > branches. They'll probably gt the commit date. If you want more a more precise explanation of what happened, you'll need to use the "git log" output instead. Stefan ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-12-05 15:38 ` bug#19113: Generate a ChangeLog file from commit logs Stefan Monnier @ 2014-12-06 4:42 ` Paul Eggert 2014-12-06 7:40 ` Eli Zaretskii 2014-12-09 5:14 ` Glenn Morris 0 siblings, 2 replies; 85+ messages in thread From: Paul Eggert @ 2014-12-06 4:42 UTC (permalink / raw) To: Stefan Monnier, Glenn Morris; +Cc: 19113 I see that Stefan covered most of Glenn's points. A quick followup: >> 5) Will I be able to mark a portion of a log to be excluded from the >> generated ChangeLog? > > I don't think so, but I don't see why that would be a problem. We could add that capability to gitlog-to-changelog, if needed. It shouldn't be hard. I'm hoping it's not needed that much. > I think by and large it doesn't: it's too complicated to be of regular use. > And since it only fixes the ChangeLog but not the "git log" output, its > usefulness is rather limited. That's correct. It's mainly intended to correct serious errors, e.g., misattribution. To help give a feel for it, of the 3329 commits to GNU coreutils master since it began generating ChangeLogs automatically, only 7 have been corrected in coreutils' build-aux/git-log-fix file. ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-12-06 4:42 ` Paul Eggert @ 2014-12-06 7:40 ` Eli Zaretskii 2014-12-09 5:14 ` Glenn Morris 1 sibling, 0 replies; 85+ messages in thread From: Eli Zaretskii @ 2014-12-06 7:40 UTC (permalink / raw) To: Paul Eggert; +Cc: 19113 > Date: Fri, 05 Dec 2014 20:42:14 -0800 > From: Paul Eggert <eggert@cs.ucla.edu> > Cc: 19113@debbugs.gnu.org > > >> 5) Will I be able to mark a portion of a log to be excluded from the > >> generated ChangeLog? > > > > I don't think so, but I don't see why that would be a problem. > > We could add that capability to gitlog-to-changelog, if needed. It shouldn't be > hard. I'm hoping it's not needed that much. Glenn is right saying that we generally don't make ChangeLog entries for some files in etc/, notably NEWS. It's not a catastrophe, but it would be a pity to see each change in NEWS to generate a trivial ChangeLog entry. So if this isn't hard to add to gitlog-to-changelog, I suggest doing that. > > I think by and large it doesn't: it's too complicated to be of regular use. > > And since it only fixes the ChangeLog but not the "git log" output, its > > usefulness is rather limited. > > That's correct. It's mainly intended to correct serious errors, e.g., > misattribution. To help give a feel for it, of the 3329 commits to GNU > coreutils master since it began generating ChangeLogs automatically, only 7 have > been corrected in coreutils' build-aux/git-log-fix file. I don't see a problem here: the feature already exists, and its usefulness will have to be determined by our willingness to fix the errors. ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-12-06 4:42 ` Paul Eggert 2014-12-06 7:40 ` Eli Zaretskii @ 2014-12-09 5:14 ` Glenn Morris 2014-12-09 6:42 ` Paul Eggert 1 sibling, 1 reply; 85+ messages in thread From: Glenn Morris @ 2014-12-09 5:14 UTC (permalink / raw) To: Paul Eggert; +Cc: 19113 Paul Eggert wrote: > That's correct. It's mainly intended to correct serious errors, e.g., > misattribution. To help give a feel for it, of the 3329 commits to > GNU coreutils master since it began generating ChangeLogs > automatically, only 7 have been corrected in coreutils' > build-aux/git-log-fix file. coreutils has a total of 6 people with write access, all of whom are experienced, long-time contributors. Emacs has nearly 200 and rising, of widely varying experience, some of whom seem to take very little care with their commit messages. So I don't think how things work for coreutils is likely to be representative of how they will work for Emacs. ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-12-09 5:14 ` Glenn Morris @ 2014-12-09 6:42 ` Paul Eggert 0 siblings, 0 replies; 85+ messages in thread From: Paul Eggert @ 2014-12-09 6:42 UTC (permalink / raw) To: Glenn Morris; +Cc: 19113 Glenn Morris wrote: > Emacs has nearly 200 and rising, of widely varying experience, some of > whom seem to take very little care with their commit messages. Yes, that's a problem. Perhaps we could have those committers work in a separate branch, meant for more experimental changes. ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-12-05 8:07 ` Glenn Morris ` (2 preceding siblings ...) 2014-12-05 15:38 ` bug#19113: Generate a ChangeLog file from commit logs Stefan Monnier @ 2015-01-03 1:37 ` Glenn Morris 3 siblings, 0 replies; 85+ messages in thread From: Glenn Morris @ 2015-01-03 1:37 UTC (permalink / raw) To: 19113 Glenn Morris wrote: > 3) How will I mark a change so that it does not generate a ChangeLog? I'm going to unilaterally adopt "start the commit message with '# '" for this. > 5) Will I be able to mark a portion of a log to be excluded from the > generated ChangeLog? I'm going to unilaterally adopt "start those lines of the commit message with '# '" for this. Only 3 lines of the entire existing Emacs commit log start with '# ', and all 3 of those lines could happily be omitted from a generated ChangeLog. Maybe someone will add that functionality to the generate script, and maybe they won't. I'm going to use that markup anyway. ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-11-20 15:51 ` Eli Zaretskii 2014-11-20 17:43 ` Paul Eggert 2014-11-20 17:44 ` Paul Eggert @ 2014-11-20 18:00 ` Achim Gratz 2 siblings, 0 replies; 85+ messages in thread From: Achim Gratz @ 2014-11-20 18:00 UTC (permalink / raw) To: 19113 Eli Zaretskii writes: > What's the plan for preventing the generated ChangeLog file from > becoming too large? Currently, we roll them over to keep the file > below 1MB. I haven't yet looked at what Emacs has implemented now… but you may want to take a look at Org. The ChangeLog there is generated for only the segment of commits between releases to Emacs. If we come up with a reliable method to (auto-)mark the latest commit that has been picked up for the ChangeLog, then it becomes trivial to a) do the rollover, either manually or automatically; and b) edit entries in the ChangeLog for style or substance that have fallen behind that barrier since the auto-generation from commit messages will not touch them. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-11-19 23:57 bug#19113: Generate a ChangeLog file from commit logs Paul Eggert 2014-11-20 15:51 ` Eli Zaretskii @ 2014-11-20 17:25 ` Pádraig Brady 2015-01-12 7:38 ` Paul Eggert 2015-03-21 2:37 ` Paul Eggert 3 siblings, 0 replies; 85+ messages in thread From: Pádraig Brady @ 2014-11-20 17:25 UTC (permalink / raw) To: 19113 gitlog-to-changelog takes the same options as `git log` so it should be easy enough to generate logs for the last n versions, or the last x versions in the last N years etc. and discard anything older (which can/should be looked up in git if required). I'm considering removing any of these old logs from coreutils that are already in git logs: $ find -name "ChangeLog*" | xargs du -hsc | sort -h 8.0K ./build-aux/ChangeLog-2007 8.0K ./po/ChangeLog-2007 16K ./ChangeLog-2008 64K ./old/sh-utils/ChangeLog.0 72K ./doc/ChangeLog-2007 152K ./ChangeLog-2006 156K ./ChangeLog-2007 164K ./old/sh-utils/ChangeLog 172K ./m4/ChangeLog-2007 220K ./old/fileutils/ChangeLog-1997 288K ./old/fileutils/ChangeLog 304K ./old/textutils/ChangeLog 312K ./lib/ChangeLog-2007 440K ./ChangeLog-2005 1.1M ./ChangeLog 3.4M total Pádraig. ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-11-19 23:57 bug#19113: Generate a ChangeLog file from commit logs Paul Eggert 2014-11-20 15:51 ` Eli Zaretskii 2014-11-20 17:25 ` Pádraig Brady @ 2015-01-12 7:38 ` Paul Eggert 2015-01-15 14:58 ` Stefan Monnier 2015-01-15 21:46 ` Glenn Morris 2015-03-21 2:37 ` Paul Eggert 3 siblings, 2 replies; 85+ messages in thread From: Paul Eggert @ 2015-01-12 7:38 UTC (permalink / raw) To: 19113 [-- Attachment #1: Type: text/plain, Size: 420 bytes --] Attached is a proposed announcement for installing the patch (currently it suggests a changeover date of January 21, but obviously that's adjustable), along with updated copies of the rename patch (which should be applied to both emacs-24 and master branches), a followup patch for the emacs-24 branch, and a followup patch for the master branch. This all tries to address some (though not all) the points raised. [-- Attachment #2: announcement.txt --] [-- Type: text/plain, Size: 1893 bytes --] On January 21 we plan to change the procedure for committing changes to the Emacs git repository, so that the ChangeLog file in the Emacs distribution is generated automatically from git commit messages, instead of being maintained manually as a near-copy of the commit messages. Because the ChangeLog file will no longer be fixed up by hand after changes are installed, it will be more important to write good commit messages. The suggested format is: * The first line should be a brief summary without trailing period. * The second line should be empty. * Any general explanatory text should come next. * Finally, the ChangeLog entries themselves should appear, in the format specified by the GNU coding standards. * Append a "Fixes: bug#NNNN" line if the change fixes a bug. Lines should hold at most 78 characters. Here is an example commit message: Deactivate shifted region Do not silently extend a region that is not highlighted; this can happen after a shift. * lisp/window.el (handle-select-window): * src/frame.c (Fhandle_switch_frame, Fselected_frame): Deactivate the mark. Fixes: bug#19003 (The actual commit message should not be indented.) - 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 GNU command vc-dwim (if installed) to maintain commit messages in ChangeLog format. When you create a source directory FOO, run the shell command 'cd FOO; 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 'cd FOO; vc-dwim'. [-- Attachment #3: rename.patch --] [-- Type: text/x-patch, Size: 655 bytes --] From 5a3b51993515fd3a22f23138369c8ebdb4e81664 Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> Date: Sun, 11 Jan 2015 22:38:14 -0800 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]" --- [body of patch elided in the interests of brevity] [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #4: changelog-emacs-24.patch --] [-- Type: text/x-patch; name="changelog-emacs-24.patch", Size: 35850 bytes --] From 6d589bea66874973e393f107d16f9e306e94b6af Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> Date: Sun, 11 Jan 2015 22:37:08 -0800 Subject: [PATCH] Generate a ChangeLog file from commit logs Instead of having a ChangeLog file or files in the repository, generate the ChangeLog file automatically from the git commit logs, as part of the process of making a distribution. * .gitignore: Add ChangeLog. * Makefile.in (gen_origin): New macro. (gen-ChangeLog): New rule. * admin/admin.el (make-manuals-dist--1): Don't treat ChangeLog specially. * admin/make-tarball.txt, admin/notes/bugtracker: * lisp/emacs-lisp/authors.el: Add a FIXME comment. * admin/merge-gnulib (GNULIB_MODULES): Add gitlog-to-changelog. * admin/notes/repo: Add note about vc-dwim. * admin/admin.el (add-release-logs, make-manuals-dist--1): * build-aux/gitlog-to-changelog: New file, from Gnulib. * build-aux/gitlog-to-emacslog: New file. * lisp/calendar/icalendar.el, lisp/gnus/deuglify.el: * lisp/emacs-lisp/gulp.el, lwlib/README, make-dist: Adjust to renamed old ChangeLog files. * build-aux/git-hooks/pre-commit: Disallow ChangeLog commits. * etc/CONTRIBUTE: Adjust suggested procedures accordingly. * make-dist: Use 'make gen-ChangeLog' to build top-level ChangeLog in the distribution. Distribute gitlog-to-changelog. Fixes: bug#19113 --- .gitignore | 1 + Makefile.in | 8 + admin/admin.el | 9 +- admin/make-tarball.txt | 4 + admin/merge-gnulib | 2 +- admin/notes/bugtracker | 3 +- admin/notes/repo | 12 +- build-aux/git-hooks/pre-commit | 18 +- build-aux/gitlog-to-changelog | 437 +++++++++++++++++++++++++++++++++++++++++ build-aux/gitlog-to-emacslog | 49 +++++ etc/CONTRIBUTE | 65 +++--- lisp/calendar/icalendar.el | 4 +- lisp/emacs-lisp/authors.el | 5 +- lisp/emacs-lisp/gulp.el | 2 +- lisp/gnus/deuglify.el | 2 +- lwlib/README | 2 +- make-dist | 28 ++- 17 files changed, 595 insertions(+), 56 deletions(-) create mode 100755 build-aux/gitlog-to-changelog create mode 100755 build-aux/gitlog-to-emacslog diff --git a/.gitignore b/.gitignore index d326a35..ff57e6f 100644 --- a/.gitignore +++ b/.gitignore @@ -233,6 +233,7 @@ info/dir *~ .#* \#*\# +ChangeLog [0-9]*.patch # Built by 'make install'. diff --git a/Makefile.in b/Makefile.in index 4987cf6..9dd0580 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1100,6 +1100,14 @@ bootstrap: bootstrap-clean FRC $(MAKE) $(MFLAGS) MAKEFILE_NAME=force-Makefile force-Makefile $(MAKE) $(MFLAGS) info all +# The first revision to appear in the generated ChangeLog. +gen_origin = 149749a1daea874283f83a882fb2e679d1417783 +# Convert git commit log to ChangeLog file. make-dist uses this. +.PHONY: gen-ChangeLog +gen-ChangeLog: + $(AM_V_GEN)distprefix=$(distprefix) srcprefix=$(srcdir)/ \ + $(srcdir)/build-aux/gitlog-to-emacslog $(gen_origin) + .PHONY: check-declare check-declare: diff --git a/admin/admin.el b/admin/admin.el index fcdb6cb..c273be4 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -28,10 +28,9 @@ (defvar add-log-time-format) ; in add-log -;; 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 +;; FIXME: Update this in the light of the fact that there's only +;; one ChangeLog file now, at the top level, and it's generated from +;; commit logs by 'make-dist'. (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. @@ -650,7 +649,7 @@ style=\"text-align:left\">") (copy-file "../doc/misc/texinfo.tex" stem) (or (equal type "emacs") (copy-file "../doc/emacs/emacsver.texi" stem)) (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/make-tarball.txt b/admin/make-tarball.txt index 9603c61..c080014 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -2,6 +2,10 @@ Instructions to create pretest or release tarballs. -*- coding: utf-8 -*- -- originally written by Gerd Moellmann, amended by Francesco Potortì with the initial help of Eli Zaretskii +FIXME: There is now just one ChangeLog file, at the top level, +generated automatically from commit logs by 'make-dist'. The +procedure below needs to be updated accordingly. + Steps to take before starting on the first pretest in any release sequence: diff --git a/admin/merge-gnulib b/admin/merge-gnulib index cfc1a34..09cf629 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib @@ -31,7 +31,7 @@ GNULIB_MODULES=' 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/bugtracker b/admin/notes/bugtracker index fd7bd08..9d03798 100644 --- a/admin/notes/bugtracker +++ b/admin/notes/bugtracker @@ -481,7 +481,8 @@ can see exactly what the fix was. *** bug-reference-mode Activate `bug-reference-mode' in ChangeLogs to get clickable links to -the bug web-pages. +the bug web-pages. FIXME: This may need to be updated in the light of +the new policy of just one ChangeLog, at the top level. *** Debian stuff diff --git a/admin/notes/repo b/admin/notes/repo index 46a9e08..a9da8fc 100644 --- a/admin/notes/repo +++ b/admin/notes/repo @@ -37,6 +37,15 @@ NEWS, MAINTAINERS, and FOR-RELEASE, or to indicate regeneration of files such as 'configure'. "There is no need" means you don't have to, but you can if you want to. +** Using vc-dwim to maintain commit messages + +You can use vc-dwim to maintain commit messages in ChangeLog format. +When you create a source directory FOO, run the shell command 'cd FOO; +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 +'cd FOO; vc-dwim'. Type 'vc-dwim --help' for more info. + * Commit to the right branch Development normally takes places on the trunk. @@ -132,7 +141,8 @@ http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00262.html * How to merge changes from emacs-24 to trunk -[The section on git merge procedure has not yet been written] +[The section on git merge procedure has not yet been written. +Among other things, the ChangeLog file is now automatically generated.] Inspect the change log entries (e.g. in case too many entries have been included or whitespace between entries needs fixing). If someone made diff --git a/build-aux/git-hooks/pre-commit b/build-aux/git-hooks/pre-commit 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 -new_names=`$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 files." + exit 1;; + esac +done exec git diff-index --check --cached HEAD -- diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog new file mode 100755 index 0000000..190f7b5 --- /dev/null +++ b/build-aux/gitlog-to-changelog @@ -0,0 +1,437 @@ +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 = '2014-11-20 17:25'; # 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-2014 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 <http://www.gnu.org/licenses/>. + +# Written by Jim Meyering + +use strict; +use warnings; +use Getopt::Long; +use POSIX qw(strftime); + +(my $ME = $0) =~ 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"; + $? ||= 1; +} + +sub usage ($) +{ + my ($exit_code) = @_; + my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); + if ($exit_code != 0) + { + print $STREAM "Try '$ME --help' for more information.\n"; + } + else + { + print $STREAM <<EOF; +Usage: $ME [OPTIONS] [ARGS] + +Convert git log output to ChangeLog format. If present, any ARGS +are passed to "git log". To avoid ARGS being parsed as options to +$ME, they may be preceded by '--'. + +OPTIONS: + + --amend=FILE FILE maps from an SHA1 to perl code (i.e., s/old/new/) that + makes a change to SHA1's commit log text or metadata. + --append-dot append a dot to the first line of each commit message if + there is no other punctuation or blank at the end. + --no-cluster never cluster commit messages under the same date/author + header; the default is to cluster adjacent commit messages + if their headers are the same and neither commit message + contains multiple paragraphs. + --srcdir=DIR the root of the source tree, from which the .git/ + directory can be derived. + --since=DATE convert only the logs since DATE; + the default is to convert all log entries. + --until=DATE convert only the logs older than DATE. + --format=FMT set format string for commit subject and body; + see 'man git-log' for the list of format metacharacters; + the default is '%s%n%b%n' + --strip-tab remove one additional leading TAB from commit message lines. + --strip-cherry-pick remove data inserted by "git cherry-pick"; + this includes the "cherry picked from commit ..." line, + and the possible final "Conflicts:" paragraph. + --help display this help and exit + --version output version information and exit + +EXAMPLE: + + $ME --since=2008-01-01 > ChangeLog + $ME -- -n 5 foo > last-5-commits-to-branch-foo + +SPECIAL SYNTAX: + +The following types of strings are interpreted specially when they appear +at the beginning of a log message line. They are not copied to the output. + + 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 <user\@example.com> + List the specified name and email address on a second + ChangeLog header, denoting a co-author. + Signed-off-by: Joe User <user\@example.com> + These lines are simply elided. + +In a FILE specified via --amend, comment lines (starting with "#") are ignored. +FILE must consist of <SHA,CODE+> 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. + +Here is sample input for use with --amend=FILE, 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 <eggert\\\@cs.ucla.edu>, + +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) = @_; + if ($s =~ m![^\w+/.,-]!) + { + # Convert each single quote to '\'' + $s =~ s/\'/\'\\\'\'/g; + # Then single quote the string. + $s = "'$s'"; + } + return $s; +} + +sub quoted_cmd(@) +{ + return join (' ', map {shell_quote $_} @_); +} + +# Parse file F. +# Comment lines (starting with "#") are ignored. +# F must consist of <SHA,CODE+> 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) = @_; + + open F, '<', $f + or die "$ME: $f: failed to open for reading: $!\n"; + + my $fail; + my $h = {}; + my $in_code = 0; + my $sha; + while (defined (my $line = <F>)) + { + $line =~ /^\#/ + and next; + chomp $line; + $line eq '' + and $in_code = 0, next; + + if (!$in_code) + { + $line =~ /^([0-9a-fA-F]{40})$/ + or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), + $fail = 1, next; + $sha = lc $1; + $in_code = 1; + exists $h->{$sha} + and (warn "$ME: $f:$.: duplicate SHA1\n"), + $fail = 1, next; + } + else + { + $h->{$sha} ||= ''; + $h->{$sha} .= "$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) = @_; + my @res = (); + if (defined $srcdir) + { + my $qdir = shell_quote $srcdir; + my $cmd = "cd $qdir && git rev-parse --show-toplevel"; + my $qcmd = shell_quote $cmd; + my $git_dir = qx($cmd); + defined $git_dir + or die "$ME: cannot run $qcmd: $!\n"; + $? == 0 + or die "$ME: $qcmd had unexpected exit code or signal ($?)\n"; + chomp $git_dir; + push @res, "--git-dir=$git_dir/.git"; + } + @res; +} + +{ + my $since_date; + my $until_date; + my $format_string = '%s%n%b%n'; + my $amend_file; + my $append_dot = 0; + my $cluster = 1; + my $strip_tab = 0; + my $strip_cherry_pick = 0; + my $srcdir; + GetOptions + ( + help => sub { usage 0 }, + version => sub { print "$ME version $VERSION\n"; exit }, + 'since=s' => \$since_date, + 'until=s' => \$until_date, + 'format=s' => \$format_string, + 'amend=s' => \$amend_file, + 'append-dot' => \$append_dot, + 'cluster!' => \$cluster, + 'strip-tab' => \$strip_tab, + 'strip-cherry-pick' => \$strip_cherry_pick, + 'srcdir=s' => \$srcdir, + ) or usage 1; + + defined $since_date + and unshift @ARGV, "--since=$since_date"; + defined $until_date + and unshift @ARGV, "--until=$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 = defined $amend_file ? parse_amend_file $amend_file : {}; + + my @cmd = ('git', + git_dir_option $srcdir, + qw(log --log-size), + '--pretty=format:%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.)\n"); + + my $prev_multi_paragraph; + my $prev_date_line = ''; + my @prev_coauthors = (); + while (1) + { + defined (my $in = <PIPE>) + or last; + $in =~ /^log size (\d+)$/ + or die "$ME:$.: Invalid line (expected log size):\n$in"; + my $log_nbytes = $1; + + my $log; + my $n_read = read PIPE, $log, $log_nbytes; + $n_read == $log_nbytes + or die "$ME:$.: unexpected EOF\n"; + + # Extract leading hash. + my ($sha, $rest) = split ':', $log, 2; + defined $sha + or die "$ME:$.: malformed log entry\n"; + $sha =~ /^[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 = $amend_code->{$sha}; + if (defined $code) + { + eval 'use Safe'; + my $s = new Safe; + # Put the unpreprocessed entry into "$_". + $_ = $rest; + + # Let $code operate on it, safely. + my $r = $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 = $_; + } + + # Remove lines inserted by "git cherry-pick". + if ($strip_cherry_pick) + { + $rest =~ s/^\s*Conflicts:\n.*//sm; + $rest =~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m; + } + + my @line = split "\n", $rest; + my $author_line = shift @line; + defined $author_line + or die "$ME:$.: unexpected EOF\n"; + $author_line =~ /^(\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 = (grep (/^Copyright-paperwork-exempt:\s+[Yy]es$/, @line) + ? ' (tiny change)' : ''); + + my $date_line = sprintf "%s %s$tiny\n", + strftime ("%F", localtime ($1)), $2; + + my @coauthors = grep /^Co-authored-by:.*$/, @line; + # Omit meta-data lines we've already interpreted. + @line = grep !/^(?:Signed-off-by:[ ].*>$ + |Co-authored-by:[ ] + |Copyright-paperwork-exempt:[ ] + )/x, @line; + + # Remove leading and trailing blank lines. + if (@line) + { + while ($line[0] =~ /^\s*$/) { shift @line; } + while ($line[$#line] =~ /^\s*$/) { pop @line; } + } + + # Record whether there are two or more paragraphs. + my $multi_paragraph = grep /^\s*$/, @line; + + # Format 'Co-authored-by: A U Thor <email@example.com>' 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/email/coauthors header, + # or if this or the previous entry consists of two or more paragraphs, + # 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 = $date_line; + @prev_coauthors = @coauthors; + $prev_multi_paragraph = $multi_paragraph; + + # If there were any lines + if (@line == 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, then + if (length $line[0] < 72) + { + # append a dot if there is no other punctuation or blank + # at the end. + $line[0] =~ /[[:punct:]\s]$/ + or $line[0] .= '.'; + } + } + + # Remove one additional leading TAB from each line. + $strip_tab + and map { s/^\t// } @line; + + # Prefix each non-empty line with a TAB. + @line = map { length $_ ? "\t$_" : '' } @line; + + print "\n", join ("\n", @line), "\n"; + } + + defined ($in = <PIPE>) + 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=F specified file. + my $fail = 0; + foreach my $sha (keys %$amend_code) + { + warn "$ME:$amend_file: unused entry: $sha\n"; + $fail = 1; + } + + exit $fail; +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "my $VERSION = '" +# 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..8ea8112 --- /dev/null +++ b/build-aux/gitlog-to-emacslog @@ -0,0 +1,49 @@ +#!/bin/sh + +# Convert git log output to ChangeLog format for GNU Emacs. + +# Copyright (C) 2014 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 <http://www.gnu.org/licenses/>. + +LC_ALL=C +export LC_ALL + +gen_origin=${1?} +shift + +if test -d ${srcprefix}.git; then + gen_origin_date=`git log --pretty=format:%ci "$gen_origin"^! ` || exit + gen_start_year=`expr "$gen_origin_date" : '\([^-]*\)'` || exit + log_fix="${srcprefix}build-aux/git-log-fix" + test -e "$log_fix" && set -- "$@" --amend="$log_fix" + + ${srcprefix}build-aux/gitlog-to-changelog "$@" $gen_origin^.. \ + > ${distprefix}cl-t || exit + + gen_end_year=`sed 's/-.*//; q' ${distprefix}cl-t` + if test "$gen_start_year" = "$gen_end_year"; then + year_range=$gen_start_year + else + year_range=$gen_start_year-$gen_end_year + fi + + sed "1d + s/Copyright (C) [0-9]*-[0-9]*/Copyright (C) $year_range/ + s/^# // + /http:/q + " Makefile.in >>${distprefix}cl-t && + rm -f ${distprefix}ChangeLog && + mv ${distprefix}cl-t ${distprefix}ChangeLog +fi diff --git a/etc/CONTRIBUTE b/etc/CONTRIBUTE index 92b4c9e..51820c7 100644 --- a/etc/CONTRIBUTE +++ b/etc/CONTRIBUTE @@ -101,6 +101,16 @@ If your patch is not complete and you think it needs more discussion, you might want to send it to emacs-devel@gnu.org instead. If you revise your patch, send it as a followup to the initial topic. +** Do not mix changes. + +If you send several unrelated changes together, we will ask you to +separate them so we can consider each of the changes by itself. + +** Do not make formatting changes. + +Making cosmetic formatting changes (indentation, etc.) makes it harder +to see what you have really changed. + ** Description For bug fixes, a description of the bug and how your patch fixes it. @@ -109,20 +119,37 @@ For new features, a description of the feature and your implementation. ** ChangeLog -A ChangeLog entry as plaintext (separate from the patch). +A ChangeLog entry, which should be separate from the rest of the patch. + +Normally the git commit message should contain the ChangeLog entry, +starting with a single short line explaining the change, then an empty +line, then ChangeLog entries. Append a "Fixes:" line if the commit +fixes a bug numbered at http://debbugs.gnu.org. Here is an indented +example (the actual commit message should not be indented): -See the existing ChangeLog files for format and content. Note that, -unlike some other projects, we do require ChangeLogs also for -documentation, i.e. Texinfo files. + Deactivate shifted region + + 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 + +If you don't use git, the ChangeLog entry should be in plaintext and +should be separate from the patch. Ref: "Change Log Concepts" node of the GNU Coding Standards Info -Manual, for how to write good log entries. +Manual, for how to write good log entries. Unlike some other +projects, we require ChangeLog entries also for documentation, i.e., +Texinfo files. -When using git, commit messages should use ChangeLog format, with a -single short line explaining the change, then an empty line, then -unindented ChangeLog entries. (Essentially, a commit message should -be a duplicate of what the patch adds to the ChangeLog files. We are -planning to automate this better, to avoid the duplication.) +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 vc-dwim as described in ../admin/repo. ** The patch itself. @@ -131,27 +158,17 @@ up-to-date (e.g. with 'git pull'). You can commit your changes to a private branch and generate a patch from the master version by using git format-patch master -Or you can leave your changes uncommitted and use - git diff With no repository, you can use diff -u OLD NEW +** Please reread your patch before submitting it. + ** Mail format. We prefer to get the patches as plain text, either inline (be careful your mail client does not change line breaks) or as MIME attachments. - -** Please reread your patch before submitting it. - -** Do not mix changes. - -If you send several unrelated changes together, we will ask you to -separate them so we can consider each of the changes by itself. - -** Do not make formatting changes. - -Making cosmetic formatting changes (indentation, etc) makes it harder -to see what you have really changed. +To send a git-format patch inline, you can use + git send-email 0001-FOO.patch * Coding style and conventions. diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index 638f99f..ce6135e 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -39,7 +39,7 @@ ;;; History: -;; 0.07 onwards: see lisp/ChangeLog +;; 0.07 onwards: see commit logs and ../ChangeLog*. ;; 0.06: (2004-10-06) ;; - Bugfixes regarding icalendar-import-format-*. @@ -1047,7 +1047,7 @@ FExport diary data into iCalendar file: ") (setq header (concat "\nBEGIN:VEVENT\nUID:" (or uid - (icalendar--create-uid entry-full + (icalendar--create-uid entry-full contents))))) (setq result (concat result header contents "\nEND:VEVENT"))) ;; handle errors diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el index e20ae95..e095be6 100644 --- a/lisp/emacs-lisp/authors.el +++ b/lisp/emacs-lisp/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. +;; FIXME: This needs to modernized in the light of current practice, +;; which generates a single top-level ChangeLog file from commit logs. + ;;; Code: (defvar authors-coding-system 'utf-8 @@ -75,7 +78,7 @@ files.") ("Gerd Möllmann" "Gerd Moellmann") ("Hallvard B. Furuseth" "Hallvard B Furuseth" "Hallvard Furuseth") ("Hrvoje Nikšić" "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/lisp/emacs-lisp/gulp.el b/lisp/emacs-lisp/gulp.el index ccefc09..b26f3f4 100644 --- a/lisp/emacs-lisp/gulp.el +++ b/lisp/emacs-lisp/gulp.el @@ -69,7 +69,7 @@ please send them to me ASAP. Please don't send the whole file. Instead, please send a patch made with `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. Thanks.") diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el index 00d1ee9..92f2c00 100644 --- a/lisp/gnus/deuglify.el +++ b/lisp/gnus/deuglify.el @@ -188,7 +188,7 @@ ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; -;; See ChangeLog for other changes. +;; See commit log or ChangeLog* 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/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. This version of the library differs from the original as described in -the ChangeLog file. +the ChangeLog.1 file. diff --git a/make-dist b/make-dist index df5e505..20e49d1 100755 --- a/make-dist +++ b/make-dist @@ -278,13 +278,20 @@ fi echo "Creating top directory: \`${tempdir}'" mkdir ${tempdir} +if test -d .git; then + echo "Making top-level ChangeLog" + make distprefix=${tempdir}/ gen-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 ${tempdir} ln config.bat make-dist .dir-locals.el ${tempdir} ln aclocal.m4 ${tempdir} @@ -334,7 +341,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 @@ -345,6 +352,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}/build-aux + ln gitlog-to-changelog ../${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) @@ -361,7 +369,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 @@ -383,7 +391,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 testfile ../${tempdir}/lib-src + ln ChangeLog.*[0-9] Makefile.in README testfile ../${tempdir}/lib-src ln grep-changelog rcs2log ../${tempdir}/lib-src ln makefile.w32-in ../${tempdir}/lib-src ln update-game-score.exe.manifest ../${tempdir}/lib-src) @@ -399,7 +407,7 @@ echo "Making links to \`nt'" ln nmake.defs gmake.defs subdirs.el [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt ln Makefile.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 ../${tempdir}/nt) echo "Making links to \`nt/inc' and its subdirectories" for f in `find nt/inc -type f -name '[a-z]*.h'`; do @@ -413,13 +421,13 @@ echo "Making links to \`nt/icons'" 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}/msdos ln depfiles.bat inttypes.h ../${tempdir}/msdos ln is_exec.c sigaction.c mainmake.v2 sed*.inp ../${tempdir}/msdos) 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) echo "Making links to \`nextstep/templates'" (cd nextstep/templates @@ -440,12 +448,12 @@ echo "Making links to \`nextstep/GNUstep/Emacs.base/Resources'" echo "Making links to \`oldXMenu'" (cd oldXMenu ln *.[ch] *.in ../${tempdir}/oldXMenu - ln README ChangeLog ../${tempdir}/oldXMenu) + ln README ChangeLog.*[0-9] ../${tempdir}/oldXMenu) echo "Making links to \`lwlib'" (cd lwlib ln *.[ch] *.in ../${tempdir}/lwlib - ln README ChangeLog ../${tempdir}/lwlib) + ln README ChangeLog.*[0-9] ../${tempdir}/lwlib) ## It is important to distribute admin/ because it contains sources ## for generated lisp/international/uni-*.el files. @@ -504,7 +512,7 @@ echo "Making links to \`doc/lispintro'" echo "Making links to \`doc/man'" (cd doc/man - ln ChangeLog* *.1 ../../${tempdir}/doc/man + ln *.1 ../../${tempdir}/doc/man cd ../../${tempdir}/doc/man) ### It would be nice if they could all be symlinks to top-level copy, but -- 2.1.0 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #5: changelog-master.patch --] [-- Type: text/x-patch; name="changelog-master.patch", Size: 32263 bytes --] From 071a20671bc7b01565243529f51eb2236a0e7134 Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> Date: Sun, 11 Jan 2015 22:42:09 -0800 Subject: [PATCH] Generate a ChangeLog file from commit logs Instead of having a ChangeLog file or files in the repository, generate the ChangeLog file automatically from the git commit logs, as part of the process of making a distribution. * .gitignore: Add ChangeLog. * CONTRIBUTE: Adjust suggested procedures accordingly. * Makefile.in (gen_origin): New macro. (gen-ChangeLog): New rule. * admin/admin.el (make-manuals-dist--1): Don't treat ChangeLog specially. * admin/make-tarball.txt, admin/notes/bugtracker, admin/notes/repo: * lisp/emacs-lisp/authors.el: Add a FIXME comment. * admin/merge-gnulib (GNULIB_MODULES): Add gitlog-to-changelog. * admin/admin.el (add-release-logs, make-manuals-dist--1): * build-aux/git-hooks/pre-commit: Disallow ChangeLog commits. * build-aux/gitlog-to-changelog: New file, from Gnulib. * build-aux/gitlog-to-emacslog: New file. * lisp/calendar/icalendar.el, lisp/gnus/deuglify.el: * lisp/emacs-lisp/gulp.el, lwlib/README, make-dist: Adjust to renamed old ChangeLog files. * make-dist: Use 'make gen-ChangeLog' to build top-level ChangeLog in the distribution. Distribute gitlog-to-changelog. Fixes: bug#19113 --- .gitignore | 1 + CONTRIBUTE | 57 ++++-- Makefile.in | 8 + admin/admin.el | 9 +- admin/authors.el | 5 +- admin/make-tarball.txt | 4 + admin/merge-gnulib | 2 +- admin/notes/bugtracker | 3 +- admin/notes/repo | 3 +- build-aux/git-hooks/pre-commit | 18 +- build-aux/gitlog-to-changelog | 437 +++++++++++++++++++++++++++++++++++++++++ build-aux/gitlog-to-emacslog | 49 +++++ lisp/calendar/icalendar.el | 2 +- lisp/gnus/deuglify.el | 2 +- lisp/obsolete/gulp.el | 2 +- lwlib/README | 2 +- make-dist | 16 +- 17 files changed, 578 insertions(+), 42 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 # Built by 'make install'. diff --git a/CONTRIBUTE b/CONTRIBUTE index 5cf015f..c5e36bd 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -27,10 +27,10 @@ advanced information. Alternately, see admin/notes/git-workflow. -If committing changes written by someone else, make the ChangeLog -entry in their name, not yours. git distinguishes between the author -and the committer; use the --author option on the commit command to -specify the actual author; the committer defaults to you. +If committing changes written by someone else, do so in their name, +not yours. git distinguishes between the author and the committer; +use the --author option on the commit command to specify the actual +author; the committer defaults to you. ** commit messages @@ -77,28 +77,29 @@ following modifications: and have a reasonable chance of being read in the future, so it's better that they have good presentation. -- 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". -- Preferred form for several entries with the same content: - - * help.el (view-lossage): - * kmacro.el (kmacro-edit-lossage): - * edmacro.el (edit-kbd-macro): Fix docstring, lossage is now 300 keys. - - (Rather than anything involving "ditto" and suchlike.) - - If the commit fixes a bug, add a separate line Fixes: bug#NNNN where NNNN is the bug number. +- Here is an example, showing the preferred form for several entries + with the same content: + + Deactivate shifted region + + Do not silently extend a region that is not highlighted; + this can happen after a shift. + * lisp/window.el (handle-select-window): + * src/frame.c (Fhandle_switch_frame, Fselected_frame): + Deactivate the mark. + Fixes: bug#19003 + + (Rather than anything involving "ditto" and suchlike.) + - In ChangeLog entries, there is no standard or recommended way to identify revisions. @@ -113,6 +114,19 @@ following modifications: of files such as 'configure'. "There is no need" means you don't have to, but you can if you want to. +- 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 GNU command vc-dwim (if installed) + to maintain commit messages in ChangeLog format. When you create a + source directory FOO, run the shell command 'cd FOO; + 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 'cd FOO; vc-dwim'. + ** branches Development normally takes places on the trunk. @@ -176,6 +190,15 @@ 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=emacs . +To send a git-format patch to the mailing list, which contains the +most recent commit in your private repository, you can use a shell +command like this: + + git format-patch -1 + git send-email 0001-*.patch + +Double-check the patch before sending it. + ** Document your changes. Any change that matters to end-users should have an entry in etc/NEWS. diff --git a/Makefile.in b/Makefile.in index 4cdd293..1c45f91 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1087,6 +1087,14 @@ bootstrap: bootstrap-clean $(MAKE) MAKEFILE_NAME=force-Makefile force-Makefile $(MAKE) all +# The first revision to appear in the generated ChangeLog. +gen_origin = 149749a1daea874283f83a882fb2e679d1417783 +# Convert git commit log to ChangeLog file. make-dist uses this. +.PHONY: gen-ChangeLog +gen-ChangeLog: + $(AM_V_GEN)distprefix=$(distprefix) srcprefix=$(srcdir)/ \ + $(srcdir)/build-aux/gitlog-to-emacslog $(gen_origin) + .PHONY: check-declare check-declare: diff --git a/admin/admin.el b/admin/admin.el index 18ea4a4..3988977 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -28,10 +28,9 @@ (defvar add-log-time-format) ; in add-log -;; 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 +;; FIXME: Update this in the light of the fact that there's only +;; one ChangeLog file now, at the top level, and it's generated from +;; commit logs by 'make-dist'. (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 +600,7 @@ style=\"text-align:left\">") (copy-file "../doc/misc/texinfo.tex" stem) (or (equal type "emacs") (copy-file "../doc/emacs/emacsver.texi" stem)) (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 afab6f0..de6088d 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. +;; FIXME: This needs to modernized in the light of current practice, +;; which generates a single top-level ChangeLog file from commit logs. + ;;; Code: (defvar authors-coding-system 'utf-8 @@ -76,7 +79,7 @@ files.") ("Gerd Möllmann" "Gerd Moellmann") ("Hallvard B. Furuseth" "Hallvard B Furuseth" "Hallvard Furuseth") ("Hrvoje Nikšić" "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..81f573f 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -2,6 +2,10 @@ Instructions to create pretest or release tarballs. -*- coding: utf-8 -*- -- originally written by Gerd Moellmann, amended by Francesco Potortì with the initial help of Eli Zaretskii +FIXME: There is now just one ChangeLog file, at the top level, +generated automatically from commit logs by 'make-dist'. The +procedure below needs to be updated accordingly. + Steps to take before starting on the first pretest in any release sequence: 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=' 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/bugtracker b/admin/notes/bugtracker index fd7bd08..9d03798 100644 --- a/admin/notes/bugtracker +++ b/admin/notes/bugtracker @@ -481,7 +481,8 @@ can see exactly what the fix was. *** bug-reference-mode Activate `bug-reference-mode' in ChangeLogs to get clickable links to -the bug web-pages. +the bug web-pages. FIXME: This may need to be updated in the light of +the new policy of just one ChangeLog, at the top level. *** Debian stuff diff --git a/admin/notes/repo b/admin/notes/repo index 2d4cc2a..f76187f 100644 --- a/admin/notes/repo +++ b/admin/notes/repo @@ -47,7 +47,8 @@ removes a file, then remove the corresponding files by hand. * How to merge changes from emacs-24 to trunk -[The section on git merge procedure has not yet been written] +[The section on git merge procedure has not yet been written. +Among other things, the ChangeLog file is now automatically generated.] Inspect the change log entries (e.g. in case too many entries have been included or whitespace between entries needs fixing). If someone made diff --git a/build-aux/git-hooks/pre-commit b/build-aux/git-hooks/pre-commit 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 -new_names=`$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 files." + exit 1;; + esac +done exec git diff-index --check --cached HEAD -- diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog new file mode 100755 index 0000000..190f7b5 --- /dev/null +++ b/build-aux/gitlog-to-changelog @@ -0,0 +1,437 @@ +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 = '2014-11-20 17:25'; # 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-2014 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 <http://www.gnu.org/licenses/>. + +# Written by Jim Meyering + +use strict; +use warnings; +use Getopt::Long; +use POSIX qw(strftime); + +(my $ME = $0) =~ 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"; + $? ||= 1; +} + +sub usage ($) +{ + my ($exit_code) = @_; + my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); + if ($exit_code != 0) + { + print $STREAM "Try '$ME --help' for more information.\n"; + } + else + { + print $STREAM <<EOF; +Usage: $ME [OPTIONS] [ARGS] + +Convert git log output to ChangeLog format. If present, any ARGS +are passed to "git log". To avoid ARGS being parsed as options to +$ME, they may be preceded by '--'. + +OPTIONS: + + --amend=FILE FILE maps from an SHA1 to perl code (i.e., s/old/new/) that + makes a change to SHA1's commit log text or metadata. + --append-dot append a dot to the first line of each commit message if + there is no other punctuation or blank at the end. + --no-cluster never cluster commit messages under the same date/author + header; the default is to cluster adjacent commit messages + if their headers are the same and neither commit message + contains multiple paragraphs. + --srcdir=DIR the root of the source tree, from which the .git/ + directory can be derived. + --since=DATE convert only the logs since DATE; + the default is to convert all log entries. + --until=DATE convert only the logs older than DATE. + --format=FMT set format string for commit subject and body; + see 'man git-log' for the list of format metacharacters; + the default is '%s%n%b%n' + --strip-tab remove one additional leading TAB from commit message lines. + --strip-cherry-pick remove data inserted by "git cherry-pick"; + this includes the "cherry picked from commit ..." line, + and the possible final "Conflicts:" paragraph. + --help display this help and exit + --version output version information and exit + +EXAMPLE: + + $ME --since=2008-01-01 > ChangeLog + $ME -- -n 5 foo > last-5-commits-to-branch-foo + +SPECIAL SYNTAX: + +The following types of strings are interpreted specially when they appear +at the beginning of a log message line. They are not copied to the output. + + 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 <user\@example.com> + List the specified name and email address on a second + ChangeLog header, denoting a co-author. + Signed-off-by: Joe User <user\@example.com> + These lines are simply elided. + +In a FILE specified via --amend, comment lines (starting with "#") are ignored. +FILE must consist of <SHA,CODE+> 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. + +Here is sample input for use with --amend=FILE, 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 <eggert\\\@cs.ucla.edu>, + +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) = @_; + if ($s =~ m![^\w+/.,-]!) + { + # Convert each single quote to '\'' + $s =~ s/\'/\'\\\'\'/g; + # Then single quote the string. + $s = "'$s'"; + } + return $s; +} + +sub quoted_cmd(@) +{ + return join (' ', map {shell_quote $_} @_); +} + +# Parse file F. +# Comment lines (starting with "#") are ignored. +# F must consist of <SHA,CODE+> 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) = @_; + + open F, '<', $f + or die "$ME: $f: failed to open for reading: $!\n"; + + my $fail; + my $h = {}; + my $in_code = 0; + my $sha; + while (defined (my $line = <F>)) + { + $line =~ /^\#/ + and next; + chomp $line; + $line eq '' + and $in_code = 0, next; + + if (!$in_code) + { + $line =~ /^([0-9a-fA-F]{40})$/ + or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), + $fail = 1, next; + $sha = lc $1; + $in_code = 1; + exists $h->{$sha} + and (warn "$ME: $f:$.: duplicate SHA1\n"), + $fail = 1, next; + } + else + { + $h->{$sha} ||= ''; + $h->{$sha} .= "$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) = @_; + my @res = (); + if (defined $srcdir) + { + my $qdir = shell_quote $srcdir; + my $cmd = "cd $qdir && git rev-parse --show-toplevel"; + my $qcmd = shell_quote $cmd; + my $git_dir = qx($cmd); + defined $git_dir + or die "$ME: cannot run $qcmd: $!\n"; + $? == 0 + or die "$ME: $qcmd had unexpected exit code or signal ($?)\n"; + chomp $git_dir; + push @res, "--git-dir=$git_dir/.git"; + } + @res; +} + +{ + my $since_date; + my $until_date; + my $format_string = '%s%n%b%n'; + my $amend_file; + my $append_dot = 0; + my $cluster = 1; + my $strip_tab = 0; + my $strip_cherry_pick = 0; + my $srcdir; + GetOptions + ( + help => sub { usage 0 }, + version => sub { print "$ME version $VERSION\n"; exit }, + 'since=s' => \$since_date, + 'until=s' => \$until_date, + 'format=s' => \$format_string, + 'amend=s' => \$amend_file, + 'append-dot' => \$append_dot, + 'cluster!' => \$cluster, + 'strip-tab' => \$strip_tab, + 'strip-cherry-pick' => \$strip_cherry_pick, + 'srcdir=s' => \$srcdir, + ) or usage 1; + + defined $since_date + and unshift @ARGV, "--since=$since_date"; + defined $until_date + and unshift @ARGV, "--until=$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 = defined $amend_file ? parse_amend_file $amend_file : {}; + + my @cmd = ('git', + git_dir_option $srcdir, + qw(log --log-size), + '--pretty=format:%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.)\n"); + + my $prev_multi_paragraph; + my $prev_date_line = ''; + my @prev_coauthors = (); + while (1) + { + defined (my $in = <PIPE>) + or last; + $in =~ /^log size (\d+)$/ + or die "$ME:$.: Invalid line (expected log size):\n$in"; + my $log_nbytes = $1; + + my $log; + my $n_read = read PIPE, $log, $log_nbytes; + $n_read == $log_nbytes + or die "$ME:$.: unexpected EOF\n"; + + # Extract leading hash. + my ($sha, $rest) = split ':', $log, 2; + defined $sha + or die "$ME:$.: malformed log entry\n"; + $sha =~ /^[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 = $amend_code->{$sha}; + if (defined $code) + { + eval 'use Safe'; + my $s = new Safe; + # Put the unpreprocessed entry into "$_". + $_ = $rest; + + # Let $code operate on it, safely. + my $r = $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 = $_; + } + + # Remove lines inserted by "git cherry-pick". + if ($strip_cherry_pick) + { + $rest =~ s/^\s*Conflicts:\n.*//sm; + $rest =~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m; + } + + my @line = split "\n", $rest; + my $author_line = shift @line; + defined $author_line + or die "$ME:$.: unexpected EOF\n"; + $author_line =~ /^(\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 = (grep (/^Copyright-paperwork-exempt:\s+[Yy]es$/, @line) + ? ' (tiny change)' : ''); + + my $date_line = sprintf "%s %s$tiny\n", + strftime ("%F", localtime ($1)), $2; + + my @coauthors = grep /^Co-authored-by:.*$/, @line; + # Omit meta-data lines we've already interpreted. + @line = grep !/^(?:Signed-off-by:[ ].*>$ + |Co-authored-by:[ ] + |Copyright-paperwork-exempt:[ ] + )/x, @line; + + # Remove leading and trailing blank lines. + if (@line) + { + while ($line[0] =~ /^\s*$/) { shift @line; } + while ($line[$#line] =~ /^\s*$/) { pop @line; } + } + + # Record whether there are two or more paragraphs. + my $multi_paragraph = grep /^\s*$/, @line; + + # Format 'Co-authored-by: A U Thor <email@example.com>' 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/email/coauthors header, + # or if this or the previous entry consists of two or more paragraphs, + # 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 = $date_line; + @prev_coauthors = @coauthors; + $prev_multi_paragraph = $multi_paragraph; + + # If there were any lines + if (@line == 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, then + if (length $line[0] < 72) + { + # append a dot if there is no other punctuation or blank + # at the end. + $line[0] =~ /[[:punct:]\s]$/ + or $line[0] .= '.'; + } + } + + # Remove one additional leading TAB from each line. + $strip_tab + and map { s/^\t// } @line; + + # Prefix each non-empty line with a TAB. + @line = map { length $_ ? "\t$_" : '' } @line; + + print "\n", join ("\n", @line), "\n"; + } + + defined ($in = <PIPE>) + 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=F specified file. + my $fail = 0; + foreach my $sha (keys %$amend_code) + { + warn "$ME:$amend_file: unused entry: $sha\n"; + $fail = 1; + } + + exit $fail; +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "my $VERSION = '" +# 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..8ea8112 --- /dev/null +++ b/build-aux/gitlog-to-emacslog @@ -0,0 +1,49 @@ +#!/bin/sh + +# Convert git log output to ChangeLog format for GNU Emacs. + +# Copyright (C) 2014 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 <http://www.gnu.org/licenses/>. + +LC_ALL=C +export LC_ALL + +gen_origin=${1?} +shift + +if test -d ${srcprefix}.git; then + gen_origin_date=`git log --pretty=format:%ci "$gen_origin"^! ` || exit + gen_start_year=`expr "$gen_origin_date" : '\([^-]*\)'` || exit + log_fix="${srcprefix}build-aux/git-log-fix" + test -e "$log_fix" && set -- "$@" --amend="$log_fix" + + ${srcprefix}build-aux/gitlog-to-changelog "$@" $gen_origin^.. \ + > ${distprefix}cl-t || exit + + gen_end_year=`sed 's/-.*//; q' ${distprefix}cl-t` + if test "$gen_start_year" = "$gen_end_year"; then + year_range=$gen_start_year + else + year_range=$gen_start_year-$gen_end_year + fi + + sed "1d + s/Copyright (C) [0-9]*-[0-9]*/Copyright (C) $year_range/ + s/^# // + /http:/q + " Makefile.in >>${distprefix}cl-t && + rm -f ${distprefix}ChangeLog && + mv ${distprefix}cl-t ${distprefix}ChangeLog +fi 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 @@ ;;; History: -;; 0.07 onwards: see lisp/ChangeLog +;; 0.07 onwards: see commit logs and ../ChangeLog*. ;; 0.06: (2004-10-06) ;; - Bugfixes regarding icalendar-import-format-*. diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el index 00d1ee9..92f2c00 100644 --- a/lisp/gnus/deuglify.el +++ b/lisp/gnus/deuglify.el @@ -188,7 +188,7 @@ ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; -;; See ChangeLog for other changes. +;; See commit log or ChangeLog* 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 with `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. 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. This version of the library differs from the original as described in -the ChangeLog file. +the ChangeLog.1 file. diff --git a/make-dist b/make-dist index 4e05594..f66a0db 100755 --- a/make-dist +++ b/make-dist @@ -277,13 +277,20 @@ fi echo "Creating top directory: \`${tempdir}'" mkdir ${tempdir} +if test -d .git; then + echo "Making top-level ChangeLog" + make distprefix=${tempdir}/ gen-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 ${tempdir} ln config.bat make-dist .dir-locals.el ${tempdir} ln aclocal.m4 ${tempdir} @@ -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}/build-aux + ln gitlog-to-changelog ../${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 @@ -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 ../${tempdir}/nt) echo "Making links to \`nt/inc' and its subdirectories" for f in `find nt/inc -type f -name '[a-z]*.h'`; do -- 2.1.0 ^ permalink raw reply related [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2015-01-12 7:38 ` Paul Eggert @ 2015-01-15 14:58 ` Stefan Monnier 2015-01-15 21:46 ` Glenn Morris 1 sibling, 0 replies; 85+ messages in thread From: Stefan Monnier @ 2015-01-15 14:58 UTC (permalink / raw) To: Paul Eggert; +Cc: 19113 > Attached is a proposed announcement for installing the patch (currently it > suggests a changeover date of January 21, but obviously that's adjustable), > along with updated copies of the rename patch (which should be applied to > both emacs-24 and master branches), a followup patch for the emacs-24 > branch, and a followup patch for the master branch. This all tries to > address some (though not all) the points raised. If no one objects, go ahead, Stefan ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2015-01-12 7:38 ` Paul Eggert 2015-01-15 14:58 ` Stefan Monnier @ 2015-01-15 21:46 ` Glenn Morris 2015-01-16 1:27 ` Paul Eggert 1 sibling, 1 reply; 85+ messages in thread From: Glenn Morris @ 2015-01-15 21:46 UTC (permalink / raw) To: Paul Eggert; +Cc: 19113 Paul Eggert wrote: > (currently it suggests a changeover date of January 21, but obviously > that's adjustable), I would like to see people get at least one week's notice, since this changes a decades-old convention. This bug report doesn't count as notice. So Jan 21 is almost too soon... To avoid confusion, does emacs-24 need to merged to trunk just before this change? (I would also like to repeat my request for a dedicated announcement mechanism for things like this. But you don't need to wait for such a mechanism to exist before making this change. Ref: http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00851.html ) ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2015-01-15 21:46 ` Glenn Morris @ 2015-01-16 1:27 ` Paul Eggert 2015-01-30 16:34 ` Stefan Monnier 0 siblings, 1 reply; 85+ messages in thread From: Paul Eggert @ 2015-01-16 1:27 UTC (permalink / raw) To: Glenn Morris; +Cc: 19113 Glenn Morris wrote: > I would like to see people get at least one week's notice, since this > changes a decades-old convention. This bug report doesn't count as > notice. So Jan 21 is almost too soon... Yes, I'll change the date to give people a week at least. > To avoid confusion, does emacs-24 need to merged to trunk just before > this change? I was planning to do a merge, yes. My thought was to install the changes in emacs-24 and then skip them when merging to master, as there's a separate set of changes prepared for master. ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2015-01-16 1:27 ` Paul Eggert @ 2015-01-30 16:34 ` Stefan Monnier 2015-01-30 20:14 ` Paul Eggert 0 siblings, 1 reply; 85+ messages in thread From: Stefan Monnier @ 2015-01-30 16:34 UTC (permalink / raw) To: Paul Eggert; +Cc: 19113 > I was planning to do a merge, yes. My thought was to install the changes in > emacs-24 and then skip them when merging to master, as there's a separate > set of changes prepared for master. Could we simply only make the change on master, and keep using the ChangeLog files in `emacs-24'? This would decouple this change from the schedule of the Emacs-24.5 release, which I think would be good. Then we could make the change on Valentine's day. Stefan ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2015-01-30 16:34 ` Stefan Monnier @ 2015-01-30 20:14 ` Paul Eggert 2015-01-31 6:33 ` Stefan Monnier 2015-01-31 9:06 ` Andreas Schwab 0 siblings, 2 replies; 85+ messages in thread From: Paul Eggert @ 2015-01-30 20:14 UTC (permalink / raw) To: Stefan Monnier; +Cc: 19113 On 01/30/2015 08:34 AM, Stefan Monnier wrote: > Could we simply only make the change on master, and keep using the > ChangeLog files in `emacs-24'? Not easily, I'm afraid, as the emacs-24 branch would contain patches to ChangeLog files, and these files should be absent on the master branch. This would make merges problematic. ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2015-01-30 20:14 ` Paul Eggert @ 2015-01-31 6:33 ` Stefan Monnier 2015-01-31 8:18 ` Paul Eggert 2015-01-31 9:06 ` Andreas Schwab 1 sibling, 1 reply; 85+ messages in thread From: Stefan Monnier @ 2015-01-31 6:33 UTC (permalink / raw) To: Paul Eggert; +Cc: 19113 >> Could we simply only make the change on master, and keep using the >> ChangeLog files in `emacs-24'? > Not easily, I'm afraid, as the emacs-24 branch would contain patches to > ChangeLog files, and these files should be absent on the master branch. > This would make merges problematic. Sounds less risky than testing the new changelog-free release process on a release which i supposed to be short, tho. Spurious conflicts are part of life, to some extent. Stefan ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2015-01-31 6:33 ` Stefan Monnier @ 2015-01-31 8:18 ` Paul Eggert 0 siblings, 0 replies; 85+ messages in thread From: Paul Eggert @ 2015-01-31 8:18 UTC (permalink / raw) To: Stefan Monnier; +Cc: 19113 Stefan Monnier wrote: > Sounds less risky than testing the new changelog-free release process on > a release which i supposed to be short, tho. Spurious conflicts are > part of life, to some extent. OK, I'll give that a try in my private copy and see how well it works out. There's another thing that I would like to get working better too, namely, rotation of commit messages into ChangeLog.1 etc. files. So that's two birds that perhaps I can kill with 1.5 stones. ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2015-01-30 20:14 ` Paul Eggert 2015-01-31 6:33 ` Stefan Monnier @ 2015-01-31 9:06 ` Andreas Schwab 1 sibling, 0 replies; 85+ messages in thread From: Andreas Schwab @ 2015-01-31 9:06 UTC (permalink / raw) To: Paul Eggert; +Cc: 19113 Paul Eggert <eggert@cs.ucla.edu> writes: > This would make merges problematic. But trivial to resolve. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2014-11-19 23:57 bug#19113: Generate a ChangeLog file from commit logs Paul Eggert ` (2 preceding siblings ...) 2015-01-12 7:38 ` Paul Eggert @ 2015-03-21 2:37 ` Paul Eggert 2015-03-21 8:33 ` Eli Zaretskii ` (2 more replies) 3 siblings, 3 replies; 85+ messages in thread From: Paul Eggert @ 2015-03-21 2:37 UTC (permalink / raw) To: 19113 [-- Attachment #1: Type: text/plain, Size: 939 bytes --] 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 '#'. [-- Attachment #2: announcement.txt --] [-- Type: text/plain, Size: 2941 bytes --] On [fill in the date here -- about a week from when this announcement is made] we plan to change the procedure for committing changes to the Emacs git repository, so that the ChangeLog file in the Emacs distribution can be generated automatically from git commit messages. Although you'll still be able to edit ChangeLog history by running 'make change-history' and then committing changes to a new top-level file (initially 'ChangeLog.1'), most commits shouldn't need to change any ChangeLog* files and this should simplify merging. The suggested format for commit messages will be changed slightly: - File names should be relative to the top level, e.g.: Deactivate shifted region Do not silently extend an unhighlighted region; this can happen after a shift. * doc/emacs/mark.texi (Shift Selection): Document this. * lisp/window.el (handle-select-window): * src/frame.c (Fhandle_switch_frame, Fselected_frame): Deactivate the mark. Fixes: bug#19003 (The actual commit message should not be indented.) - If the commit has authors other than yourself, the commit message should contain a separate line like the following: Co-authored-by: Joe Schmoe <j.schmoe@example.org> - 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 message should not appear in generated ChangeLogs, its first line should start with "; ". With the new approach there are multiple ways to format ChangeLog entries as part of the process of creating a commit message: - If you use Emacs VC, you can 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. The above will all be documented in the files CONTRIBUTE (for ordinary commits) and admin/notes/repo (for commits that edit ChangeLog history files). This change will be installed on the master branch. Other branches can adopt this change whenever convenient. The emacs-24 branch can continue to use the old procedure, and changes to ChangeLog files in emacs-24 can be discarded by hand when merging to master. Although this new style of maintenance is common in other GNU projects, Emacs has its own special needs and most likely there will be glitches after the transition. We will do our best to straighten out these problems as they occur. [-- Attachment #3: 0001-Rename-ChangeLogs-for-gitlog-to-changelog.patch --] [-- Type: text/x-patch, Size: 4923 bytes --] From 443656eace2ae1c94a762b8a907f2c4b4e728258 Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> 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.] [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #4: 0002-Add-support-for-generating-a-ChangeLog-file-from-com.patch --] [-- Type: text/x-patch; name="0002-Add-support-for-generating-a-ChangeLog-file-from-com.patch", Size: 50734 bytes --] From e4068162684d9c3529d2ced881d1af226f23e446 Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> Date: Fri, 20 Mar 2015 12:18:52 -0700 Subject: [PATCH 2/2] Add support for generating a ChangeLog file from commit 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 .git 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 # 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 between the author and the committer; use the --author option on the commit command to specify the actual author; the committer defaults to you. -** commit messages +** Commit messages -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): -- Add a single short line explaining the change, then an empty line, - then unindented ChangeLog entries. + Deactivate shifted region - 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-Commands.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. -- 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. - 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. -** 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. -- 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". - Preferred form for several entries with the same content: - * help.el (view-lossage): - * kmacro.el (kmacro-edit-lossage): - * edmacro.el (edit-kbd-macro): Fix docstring, lossage is now 300 keys. + * lisp/help.el (view-lossage): + * lisp/kmacro.el (kmacro-edit-lossage): + * lisp/edmacro.el (edit-kbd-macro): Fix docstring, lossage is now 300 keys. (Rather than anything involving "ditto" and suchlike.) -- 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 <j.schmoe@example.org> + +- 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 Fixes: bug#NNNN @@ -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. +- 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-Commands.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 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=emacs . +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. 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:=_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.* ### `bootclean' @@ -1087,6 +1087,36 @@ bootstrap: bootstrap-clean $(MAKE) MAKEFILE_NAME=force-Makefile force-Makefile $(MAKE) all +# The newest revision that should not appear in the generated ChangeLog. +gen_origin = 13eb26ad38378e0063e9c9313c3ba8af666629dc +# Convert git commit log to ChangeLog file. make-dist uses this. +.PHONY: ChangeLog change-history unchanged-history-files +ChangeLog: + $(AM_V_GEN)distprefix=$(distprefix) srcprefix=$(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 files. +unchanged-history-files: + x=$$(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 && cat ChangeLog.1) >ChangeLog.1.tmp + new_origin=$$(git log --pretty=format:%H HEAD^!) && \ + sed 's/^\(gen_origin *= *\).*/\1'"$$new_origin/" \ + <Makefile.in >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 text, +# 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 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 @@ (defvar add-log-time-format) ; in add-log -;; 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=\"text-align:left\">") (copy-file "../doc/misc/texinfo.tex" stem) (or (equal type "emacs") (copy-file "../doc/emacs/emacsver.texi" stem)) (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. +;; FIXME: This needs to modernized in the light of current practice, +;; which generates a single top-level ChangeLog file from commit logs. + ;;; Code: (defvar authors-coding-system 'utf-8 @@ -76,7 +79,7 @@ files.") ("Gerd Möllmann" "Gerd Moellmann") ("Hallvard B. Furuseth" "Hallvard B Furuseth" "Hallvard Furuseth") ("Hrvoje Nikšić" "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 errors): M-x authors RET 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-files, + 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. 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. 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'). For a pretest, start at version .90. After .99, use .990 (so that it sorts). 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-logs - 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. @@ -65,8 +67,7 @@ General steps (for each step, check for possible errors): 5. Copy lisp/loaddefs.el to lisp/ldefs-boot.el. 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. 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=' 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 needed. 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" branch 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. 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 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"). @@ -32,14 +32,14 @@ that matches "merge"). 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. 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. -* How to merge changes from emacs-24 to trunk +* How to merge changes from emacs-24 to master -[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.] 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. * Re-adding a file that has been removed from the repository @@ -124,3 +116,21 @@ again. 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-commit 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 -new_names=`$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 files." + exit 1;; + esac +done exec git diff-index --check --cached HEAD -- diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog 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 = '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 <http://www.gnu.org/licenses/>. + +# Written by Jim Meyering + +use strict; +use warnings; +use Getopt::Long; +use POSIX qw(strftime); + +(my $ME = $0) =~ 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"; + $? ||= 1; +} + +sub usage ($) +{ + my ($exit_code) = @_; + my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); + if ($exit_code != 0) + { + print $STREAM "Try '$ME --help' for more information.\n"; + } + else + { + print $STREAM <<EOF; +Usage: $ME [OPTIONS] [ARGS] + +Convert git log output to ChangeLog format. If present, any ARGS +are passed to "git log". To avoid ARGS being parsed as options to +$ME, they may be preceded by '--'. + +OPTIONS: + + --amend=FILE FILE maps from an SHA1 to perl code (i.e., s/old/new/) that + makes a change to SHA1's commit log text or metadata. + --append-dot append a dot to the first line of each commit message if + there is no other punctuation or blank at the end. + --no-cluster never cluster commit messages under the same date/author + header; the default is to cluster adjacent commit messages + if their headers are the same and neither commit message + contains multiple paragraphs. + --srcdir=DIR the root of the source tree, from which the .git/ + directory can be derived. + --since=DATE convert only the logs since DATE; + the default is to convert all log entries. + --until=DATE convert only the logs older than DATE. + --ignore-matching=PAT ignore commit messages whose first lines match PAT. + --format=FMT set format string for commit subject and body; + see 'man git-log' for the list of format metacharacters; + the default is '%s%n%b%n' + --strip-tab remove one additional leading TAB from commit message lines. + --strip-cherry-pick remove data inserted by "git cherry-pick"; + this includes the "cherry picked from commit ..." line, + and the possible final "Conflicts:" paragraph. + --help display this help and exit + --version output version information and exit + +EXAMPLE: + + $ME --since=2008-01-01 > ChangeLog + $ME -- -n 5 foo > last-5-commits-to-branch-foo + +SPECIAL SYNTAX: + +The following types of strings are interpreted specially when they appear +at the beginning of a log message line. They are not copied to the output. + + 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 <user\@example.com> + List the specified name and email address on a second + ChangeLog header, denoting a co-author. + Signed-off-by: Joe User <user\@example.com> + These lines are simply elided. + +In a FILE specified via --amend, comment lines (starting with "#") are ignored. +FILE must consist of <SHA,CODE+> 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. + +Here is sample input for use with --amend=FILE, 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 <eggert\\\@cs.ucla.edu>, + +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) = @_; + if ($s =~ m![^\w+/.,-]!) + { + # Convert each single quote to '\'' + $s =~ s/\'/\'\\\'\'/g; + # Then single quote the string. + $s = "'$s'"; + } + return $s; +} + +sub quoted_cmd(@) +{ + return join (' ', map {shell_quote $_} @_); +} + +# Parse file F. +# Comment lines (starting with "#") are ignored. +# F must consist of <SHA,CODE+> 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) = @_; + + open F, '<', $f + or die "$ME: $f: failed to open for reading: $!\n"; + + my $fail; + my $h = {}; + my $in_code = 0; + my $sha; + while (defined (my $line = <F>)) + { + $line =~ /^\#/ + and next; + chomp $line; + $line eq '' + and $in_code = 0, next; + + if (!$in_code) + { + $line =~ /^([0-9a-fA-F]{40})$/ + or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), + $fail = 1, next; + $sha = lc $1; + $in_code = 1; + exists $h->{$sha} + and (warn "$ME: $f:$.: duplicate SHA1\n"), + $fail = 1, next; + } + else + { + $h->{$sha} ||= ''; + $h->{$sha} .= "$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) = @_; + my @res = (); + if (defined $srcdir) + { + my $qdir = shell_quote $srcdir; + my $cmd = "cd $qdir && git rev-parse --show-toplevel"; + my $qcmd = shell_quote $cmd; + my $git_dir = qx($cmd); + defined $git_dir + or die "$ME: cannot run $qcmd: $!\n"; + $? == 0 + or die "$ME: $qcmd had unexpected exit code or signal ($?)\n"; + chomp $git_dir; + push @res, "--git-dir=$git_dir/.git"; + } + @res; +} + +{ + my $since_date; + my $until_date; + my $format_string = '%s%n%b%n'; + my $amend_file; + my $append_dot = 0; + my $cluster = 1; + my $ignore_matching; + my $strip_tab = 0; + my $strip_cherry_pick = 0; + my $srcdir; + GetOptions + ( + help => sub { usage 0 }, + version => sub { print "$ME version $VERSION\n"; exit }, + 'since=s' => \$since_date, + 'until=s' => \$until_date, + 'format=s' => \$format_string, + 'amend=s' => \$amend_file, + 'append-dot' => \$append_dot, + 'cluster!' => \$cluster, + 'ignore-matching=s' => \$ignore_matching, + 'strip-tab' => \$strip_tab, + 'strip-cherry-pick' => \$strip_cherry_pick, + 'srcdir=s' => \$srcdir, + ) or usage 1; + + defined $since_date + and unshift @ARGV, "--since=$since_date"; + defined $until_date + and unshift @ARGV, "--until=$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 = defined $amend_file ? parse_amend_file $amend_file : {}; + + my @cmd = ('git', + git_dir_option $srcdir, + qw(log --log-size), + '--pretty=format:%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.)\n"); + + my $prev_multi_paragraph; + my $prev_date_line = ''; + my @prev_coauthors = (); + while (1) + { + defined (my $in = <PIPE>) + or last; + $in =~ /^log size (\d+)$/ + or die "$ME:$.: Invalid line (expected log size):\n$in"; + my $log_nbytes = $1; + + my $log; + my $n_read = read PIPE, $log, $log_nbytes; + $n_read == $log_nbytes + or die "$ME:$.: unexpected EOF\n"; + + # Extract leading hash. + my ($sha, $rest) = split ':', $log, 2; + defined $sha + or die "$ME:$.: malformed log entry\n"; + $sha =~ /^[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 = $amend_code->{$sha}; + if (defined $code) + { + eval 'use Safe'; + my $s = new Safe; + # Put the unpreprocessed entry into "$_". + $_ = $rest; + + # Let $code operate on it, safely. + my $r = $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 = $_; + } + + # Remove lines inserted by "git cherry-pick". + if ($strip_cherry_pick) + { + $rest =~ s/^\s*Conflicts:\n.*//sm; + $rest =~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m; + } + + my @line = split /\s*\n/, $rest; + my $author_line = shift @line; + defined $author_line + or die "$ME:$.: unexpected EOF\n"; + $author_line =~ /^(\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 = (grep (/^Copyright-paperwork-exempt:\s+[Yy]es$/, @line) + ? ' (tiny change)' : ''); + + my $date_line = sprintf "%s %s$tiny\n", + strftime ("%F", localtime ($1)), $2; + + my @coauthors = grep /^Co-authored-by:.*$/, @line; + # Omit meta-data lines we've already interpreted. + @line = grep !/^(?:Signed-off-by:[ ].*>$ + |Co-authored-by:[ ] + |Copyright-paperwork-exempt:[ ] + )/x, @line; + + # Remove leading and trailing blank lines. + if (@line) + { + while ($line[0] =~ /^\s*$/) { shift @line; } + while ($line[$#line] =~ /^\s*$/) { pop @line; } + } + + # Ignore commits that match the --ignore-matching pattern, if specified. + if (! (defined $ignore_matching + && @line && $line[0] =~ /$ignore_matching/)) + { + # Record whether there are two or more paragraphs. + my $multi_paragraph = grep /^\s*$/, @line; + + # Format 'Co-authored-by: A U Thor <email@example.com>' 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 paragraphs, + # 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 = $date_line; + @prev_coauthors = @coauthors; + $prev_multi_paragraph = $multi_paragraph; + + # If there were any lines + if (@line == 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, then + if (length $line[0] < 72) + { + # append a dot if there is no other punctuation or blank + # at the end. + $line[0] =~ /[[:punct:]\s]$/ + or $line[0] .= '.'; + } + } + + # Remove one additional leading TAB from each line. + $strip_tab + and map { s/^\t// } @line; + + # Prefix each non-empty line with a TAB. + @line = map { length $_ ? "\t$_" : '' } @line; + + print "\n", join ("\n", @line), "\n"; + } + } + + defined ($in = <PIPE>) + 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=F specified file. + my $fail = 0; + foreach my $sha (keys %$amend_code) + { + warn "$ME:$amend_file: unused entry: $sha\n"; + $fail = 1; + } + + exit $fail; +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "my $VERSION = '" +# 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 <http://www.gnu.org/licenses/>. + +# Written by Paul Eggert + +LC_ALL=C +export LC_ALL + +gen_origin=${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='^; ' \ + "$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=` + sed -n 's/^\([0-9][0-9]*\).*/\1/p' "${distprefix}ChangeLog.tmp" | + sort -nu + ` + start_year= + end_year= + for year in $years; do + : ${start_year:=$year} + end_year=$year + done + + if test "$start_year" = "$end_year"; then + year_range=$start_year + else + year_range=$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 + " <Makefile.in >>"${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=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros 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 intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros 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 gitlog-to-changelog intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings MOSTLYCLEANFILES += core *.stackdump @@ -539,6 +539,13 @@ EXTRA_libgnu_a_SOURCES += gettimeofday.c ## end gnulib module gettimeofday +## begin gnulib module gitlog-to-changelog + + +EXTRA_DIST += $(top_srcdir)/build-aux/gitlog-to-changelog + +## end gnulib module gitlog-to-changelog + ## begin gnulib module group-member 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 @@ ;;; History: -;; 0.07 onwards: see lisp/ChangeLog +;; 0.07 onwards: see commit logs and ../ChangeLog*. ;; 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 with `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. 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. 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} +if test -d .git; then + echo "Making top-level ChangeLog" + make distprefix=${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 ${tempdir} ln config.bat make-dist .dir-locals.el ${tempdir} ln aclocal.m4 ${tempdir} @@ -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}/build-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 ../${tempdir}/nt) 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'" 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}/msdos ln depfiles.bat inttypes.h ../${tempdir}/msdos ln mainmake.v2 sed*.inp ../${tempdir}/msdos) 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) 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) 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) ## 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 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/emacs) echo "Making links to \`doc/misc'" (cd doc/misc - ln *.texi *.tex *.in makefile.w32-in gnus-news.el ChangeLog* ../../${tempdir}/doc/misc) + ln *.texi *.tex *.in makefile.w32-in gnus-news.el ChangeLog.*[0-9] \ + ../../${tempdir}/doc/misc) echo "Making links to \`doc/lispref'" (cd doc/lispref - ln *.texi *.in makefile.w32-in README ChangeLog* ../../${tempdir}/doc/lispref + 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/lispref) echo "Making links to \`doc/lispintro'" (cd doc/lispintro ln *.texi *.in makefile.w32-in *.eps *.pdf ../../${tempdir}/doc/lispintro - ln README ChangeLog* ../../${tempdir}/doc/lispintro + ln README ChangeLog.*[0-9] ../../${tempdir}/doc/lispintro cd ../../${tempdir}/doc/lispintro) 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) -- 2.1.0 ^ permalink raw reply related [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2015-03-21 2:37 ` Paul Eggert @ 2015-03-21 8:33 ` Eli Zaretskii 2015-03-21 14:38 ` Stefan Monnier 2015-03-22 23:53 ` Glenn Morris 2015-04-07 7:06 ` Paul Eggert 2 siblings, 1 reply; 85+ messages in thread From: Eli Zaretskii @ 2015-03-21 8:33 UTC (permalink / raw) To: Paul Eggert; +Cc: 19113 > Date: Fri, 20 Mar 2015 19:37:01 -0700 > From: Paul Eggert <eggert@cs.ucla.edu> > > This change will be installed on the master branch. Other > branches can adopt this change whenever convenient. The emacs-24 > branch can continue to use the old procedure, and changes to > ChangeLog files in emacs-24 can be discarded by hand when merging > to master. I think we wanted to stop using ChangeLog files on the branch as well, and that is the only reason we are waiting until after 24.5 release. ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2015-03-21 8:33 ` Eli Zaretskii @ 2015-03-21 14:38 ` Stefan Monnier 0 siblings, 0 replies; 85+ messages in thread From: Stefan Monnier @ 2015-03-21 14:38 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 19113, Paul Eggert > I think we wanted to stop using ChangeLog files on the branch as well, > and that is the only reason we are waiting until after 24.5 release. No, we instead decided we didn't want to wait. Stefan ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2015-03-21 2:37 ` Paul Eggert 2015-03-21 8:33 ` Eli Zaretskii @ 2015-03-22 23:53 ` Glenn Morris 2015-04-07 7:06 ` Paul Eggert 2 siblings, 0 replies; 85+ messages in thread From: Glenn Morris @ 2015-03-22 23:53 UTC (permalink / raw) To: Paul Eggert; +Cc: 19113 Thanks for doing all that work. Shame about the '#', but life goes on. ^ permalink raw reply [flat|nested] 85+ messages in thread
* bug#19113: Generate a ChangeLog file from commit logs 2015-03-21 2:37 ` Paul Eggert 2015-03-21 8:33 ` Eli Zaretskii 2015-03-22 23:53 ` Glenn Morris @ 2015-04-07 7:06 ` Paul Eggert 2 siblings, 0 replies; 85+ messages in thread From: Paul Eggert @ 2015-04-07 7:06 UTC (permalink / raw) To: 19113-done OK, it's April 7 by my clock, so I've installed the patch, with a few minor fixups (mostly having to do with allowing top-level history files ChangeLog.2, ChangeLog.3, etc., in the future). I'm marking this bug as done. No doubt there will be glitches in the fix, but they can be followed up with further bug reports. ^ permalink raw reply [flat|nested] 85+ messages in thread
end of thread, other threads:[~2015-04-07 7:06 UTC | newest] Thread overview: 85+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-11-19 23:57 bug#19113: Generate a ChangeLog file from commit logs Paul Eggert 2014-11-20 15:51 ` Eli Zaretskii 2014-11-20 17:43 ` Paul Eggert 2014-11-20 17:44 ` Paul Eggert 2014-11-26 5:38 ` Paul Eggert 2014-11-26 6:21 ` Jan D. 2014-11-26 7:50 ` Paul Eggert 2014-11-26 15:12 ` Stefan Monnier 2014-11-26 19:16 ` Paul Eggert 2014-11-26 22:15 ` Stefan Monnier 2014-12-05 8:07 ` Glenn Morris 2014-12-05 8:38 ` Eli Zaretskii 2014-12-05 14:33 ` Ted Zlatanov 2014-12-05 18:49 ` Stefan Monnier 2014-12-05 20:08 ` Ted Zlatanov 2014-12-06 4:59 ` Stefan Monnier 2014-12-06 13:17 ` Ted Zlatanov 2014-12-06 2:27 ` Dmitry Gutov 2014-12-06 5:06 ` Stefan Monnier 2014-12-06 7:26 ` Eli Zaretskii 2014-12-09 13:46 ` Dmitry Gutov 2014-12-06 10:08 ` Patch queue management systems Eli Zaretskii 2014-12-06 13:12 ` Ted Zlatanov 2014-12-08 21:49 ` Thomas Koch 2014-12-08 23:10 ` Lars Magne Ingebrigtsen 2014-12-09 0:00 ` Lars Magne Ingebrigtsen 2014-12-09 0:32 ` Lars Magne Ingebrigtsen 2014-12-09 2:57 ` Stefan Monnier 2014-12-09 3:16 ` Lars Magne Ingebrigtsen 2014-12-09 12:37 ` Dmitry Gutov 2014-12-09 17:20 ` Lars Magne Ingebrigtsen 2014-12-09 20:40 ` Dmitry Gutov 2014-12-09 20:44 ` Lars Magne Ingebrigtsen 2014-12-09 21:32 ` Dmitry Gutov 2014-12-09 21:58 ` Lars Magne Ingebrigtsen 2014-12-09 21:57 ` Lars Magne Ingebrigtsen 2014-12-10 14:35 ` Ted Zlatanov 2014-12-08 22:24 ` Lars Magne Ingebrigtsen 2014-12-08 22:54 ` joakim 2014-12-09 5:31 ` Ivan Andrus 2014-12-09 0:06 ` Thien-Thi Nguyen 2014-12-09 2:54 ` Stefan Monnier 2014-12-09 3:15 ` Lars Magne Ingebrigtsen 2014-12-09 8:13 ` Stephen Leake 2014-12-09 13:03 ` Dmitry Gutov 2014-12-09 17:09 ` Eli Zaretskii 2014-12-09 17:17 ` Dmitry Gutov 2014-12-09 17:36 ` Eli Zaretskii 2014-12-09 19:31 ` Dmitry Gutov 2014-12-10 14:39 ` Ted Zlatanov 2014-12-11 8:59 ` Steinar Bang 2014-12-11 11:52 ` Ted Zlatanov 2014-12-11 12:38 ` Steinar Bang 2014-12-11 14:31 ` Ted Zlatanov 2014-12-11 14:39 ` David Kastrup 2014-12-11 14:50 ` Ted Zlatanov 2014-12-11 14:55 ` Andreas Schwab 2014-12-11 15:00 ` Ted Zlatanov 2014-12-11 15:26 ` David Kastrup 2014-12-11 15:33 ` Ted Zlatanov 2014-12-11 15:49 ` David Kastrup 2014-12-11 15:19 ` David Kastrup 2014-12-11 18:43 ` Achim Gratz 2014-12-05 15:38 ` bug#19113: Generate a ChangeLog file from commit logs Stefan Monnier 2014-12-06 4:42 ` Paul Eggert 2014-12-06 7:40 ` Eli Zaretskii 2014-12-09 5:14 ` Glenn Morris 2014-12-09 6:42 ` Paul Eggert 2015-01-03 1:37 ` Glenn Morris 2014-11-20 18:00 ` Achim Gratz 2014-11-20 17:25 ` Pádraig Brady 2015-01-12 7:38 ` Paul Eggert 2015-01-15 14:58 ` Stefan Monnier 2015-01-15 21:46 ` Glenn Morris 2015-01-16 1:27 ` Paul Eggert 2015-01-30 16:34 ` Stefan Monnier 2015-01-30 20:14 ` Paul Eggert 2015-01-31 6:33 ` Stefan Monnier 2015-01-31 8:18 ` Paul Eggert 2015-01-31 9:06 ` Andreas Schwab 2015-03-21 2:37 ` Paul Eggert 2015-03-21 8:33 ` Eli Zaretskii 2015-03-21 14:38 ` Stefan Monnier 2015-03-22 23:53 ` Glenn Morris 2015-04-07 7:06 ` Paul Eggert
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.