* admin/authors.el (authors): First update the ChangeLog.

* admin/make-tarball.txt: Related updates.
This commit is contained in:
Glenn Morris 2016-05-25 12:47:13 -04:00
parent 897fb6fa49
commit 3f4a9d9d26
2 changed files with 30 additions and 17 deletions

View file

@ -1361,24 +1361,36 @@ and changed by AUTHOR."
(cons (list author wrote-list cowrote-list changed-list) (cons (list author wrote-list cowrote-list changed-list)
authors-author-list))))) authors-author-list)))))
(defun authors (root) (defun authors (root &optional nologupdate)
"Extract author information from change logs and Lisp source files. "Extract author information from change logs and Lisp source files.
ROOT is the root directory under which to find the files. If called ROOT is the root directory under which to find the files.
interactively, ROOT is read from the minibuffer. Interactively, read ROOT from the minibuffer.
Result is a buffer *Authors* containing authorship information, and a Accurate author information requires up-to-date change logs, so this
buffer *Authors Errors* containing references to unknown files." first updates them, unless optional prefix argument NOLOGUPDATE is non-nil.
(interactive "DEmacs source directory: ") The result is a buffer *Authors* containing authorship information,
and a buffer *Authors Errors* containing references to unknown files."
(interactive "DEmacs source directory: \nP")
(setq root (expand-file-name root)) (setq root (expand-file-name root))
(unless (file-exists-p (expand-file-name "src/emacs.c" root))
(unless (y-or-n-p
(format "Not the root directory of Emacs: %s, continue? " root))
(user-error "Not the root directory")))
;; May contain your personal entries.
(or (not (file-exists-p (expand-file-name "ChangeLog" root)))
(y-or-n-p "Unversioned ChangeLog present, continue?")
(user-error "Unversioned ChangeLog may have irrelevant entries"))
(or nologupdate
;; There are likely to be things that need fixing, so we update
;; the versioned ChangeLog.N rather than the unversioned ChangeLog.
(zerop (call-process "make" nil nil nil
"-C" root "change-history-nocommit"))
(error "Problem updating ChangeLog"))
(let ((logs (process-lines find-program root "-name" "ChangeLog*")) (let ((logs (process-lines find-program root "-name" "ChangeLog*"))
(table (make-hash-table :test 'equal)) (table (make-hash-table :test 'equal))
(buffer-name "*Authors*") (buffer-name "*Authors*")
authors-checked-files-alist authors-checked-files-alist
authors-invalid-file-names) authors-invalid-file-names)
(authors-add-fixed-entries table) (authors-add-fixed-entries table)
(unless (file-exists-p (expand-file-name "src/emacs.c" root))
(unless (y-or-n-p
(format "Not the root directory of Emacs: %s, continue? " root))
(error "Not the root directory")))
(dolist (log logs) (dolist (log logs)
(when (string-match "ChangeLog\\(.[0-9]+\\)?$" log) (when (string-match "ChangeLog\\(.[0-9]+\\)?$" log)
(message "Scanning %s..." log) (message "Scanning %s..." log)

View file

@ -37,14 +37,15 @@ General steps (for each step, check for possible errors):
M-: (require 'authors) RET M-: (require 'authors) RET
M-x authors RET M-x authors RET
(This first updates the current versioned ChangeLog.N)
If there is an "*Authors Errors*" buffer, address the issues. If there is an "*Authors Errors*" buffer, address the issues.
If there was a ChangeLog typo, run "make change-history" and then If there was a ChangeLog typo, fix the relevant entry.
fix the newest ChangeLog history file. If a file was deleted or If a file was deleted or renamed, consider adding an appropriate
renamed, consider adding an appropriate entry to entry to authors-ignored-files, authors-valid-file-names, or
authors-ignored-files, authors-valid-file-names, or
authors-renamed-files-alist. authors-renamed-files-alist.
If necessary, repeat M-x authors after making those changes. If necessary, repeat 'C-u M-x authors' after making those changes.
Save the "*Authors*" buffer as etc/AUTHORS. Save the "*Authors*" buffer as etc/AUTHORS.
Check the diff looks reasonable. Maybe add entries to Check the diff looks reasonable. Maybe add entries to
authors-ambiguous-files or authors-aliases, and repeat. authors-ambiguous-files or authors-aliases, and repeat.
@ -85,8 +86,8 @@ General steps (for each step, check for possible errors):
5. Copy lisp/loaddefs.el to lisp/ldefs-boot.el. 5. Copy lisp/loaddefs.el to lisp/ldefs-boot.el.
Commit etc/AUTHORS, lisp/ldefs-boot.el, and the files changed Commit ChangeLog.N, etc/AUTHORS, lisp/ldefs-boot.el, and the
by M-x set-version. files changed by M-x set-version.
If someone else made a commit between step 1 and now, If someone else made a commit between step 1 and now,
you need to repeat from step 4 onwards. (You can commit the files you need to repeat from step 4 onwards. (You can commit the files