emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 853b9b9: * admin/admin.el (add-release-logs): Bas


From: Glenn Morris
Subject: [Emacs-diffs] emacs-25 853b9b9: * admin/admin.el (add-release-logs): Basic check of existing ChangeLog.
Date: Wed, 25 May 2016 18:45:13 +0000 (UTC)

branch: emacs-25
commit 853b9b92072e9eff11aff9c0110380c9a93864ca
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    * admin/admin.el (add-release-logs): Basic check of existing ChangeLog.
---
 admin/admin.el |   20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/admin/admin.el b/admin/admin.el
index 33b0808..4af1ff9 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -43,13 +43,19 @@ Optional argument DATE is the release date, default today."
   (setq root (expand-file-name root))
   (unless (file-exists-p (expand-file-name "src/emacs.c" root))
     (user-error "%s doesn't seem to be the root of an Emacs source tree" root))
-  ;; FIXME this does not check that a ChangeLog that exists is not
-  ;; your own personal one.  Perhaps we should move any existing file
-  ;; and unconditionally call make ChangeLog?
-  ;; Or make ChangeLog CHANGELOG=temp and compare with the existing?
-  (or (file-exists-p (expand-file-name "ChangeLog" root))
-      (zerop (call-process "make" nil nil nil "-C" root "ChangeLog"))
-      (error "Problem generating ChangeLog"))
+  (let ((clog (expand-file-name "ChangeLog" root)))
+    (if (file-exists-p clog)
+        ;; Basic check that a ChangeLog that exists is not your personal one.
+        ;; TODO Perhaps we should move any existing file and unconditionally
+        ;; call make ChangeLog?  Or make ChangeLog CHANGELOG=temp and compare
+        ;; with the existing?
+        (with-temp-buffer
+          (insert-file-contents clog)
+          (or (re-search-forward "^[ \t]*Copyright.*Free Software" nil t)
+              (user-error "ChangeLog looks like a personal one - remove it?")))
+      (or
+       (zerop (call-process "make" nil nil nil "-C" root "ChangeLog"))
+       (error "Problem generating ChangeLog"))))
   (require 'add-log)
   (or date (setq date (funcall add-log-time-format nil t)))
   (let* ((logs (process-lines "find" root "-name" "ChangeLog"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]