diff options
| author | Glenn Morris | 2016-05-25 14:45:05 -0400 |
|---|---|---|
| committer | Glenn Morris | 2016-05-25 14:45:05 -0400 |
| commit | 853b9b92072e9eff11aff9c0110380c9a93864ca (patch) | |
| tree | 548a5e4ed92faf57ebc7ee4e4e1306ce8ed7949c | |
| parent | 5fa80cfe9fc1b7056b5cbf7fa6a44a23611d6f01 (diff) | |
| download | emacs-853b9b92072e9eff11aff9c0110380c9a93864ca.tar.gz emacs-853b9b92072e9eff11aff9c0110380c9a93864ca.zip | |
* admin/admin.el (add-release-logs): Basic check of existing ChangeLog.
| -rw-r--r-- | admin/admin.el | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/admin/admin.el b/admin/admin.el index 33b0808f4fa..4af1ff9003a 100644 --- a/admin/admin.el +++ b/admin/admin.el | |||
| @@ -43,13 +43,19 @@ Optional argument DATE is the release date, default today." | |||
| 43 | (setq root (expand-file-name root)) | 43 | (setq root (expand-file-name root)) |
| 44 | (unless (file-exists-p (expand-file-name "src/emacs.c" root)) | 44 | (unless (file-exists-p (expand-file-name "src/emacs.c" root)) |
| 45 | (user-error "%s doesn't seem to be the root of an Emacs source tree" root)) | 45 | (user-error "%s doesn't seem to be the root of an Emacs source tree" root)) |
| 46 | ;; FIXME this does not check that a ChangeLog that exists is not | 46 | (let ((clog (expand-file-name "ChangeLog" root))) |
| 47 | ;; your own personal one. Perhaps we should move any existing file | 47 | (if (file-exists-p clog) |
| 48 | ;; and unconditionally call make ChangeLog? | 48 | ;; Basic check that a ChangeLog that exists is not your personal one. |
| 49 | ;; Or make ChangeLog CHANGELOG=temp and compare with the existing? | 49 | ;; TODO Perhaps we should move any existing file and unconditionally |
| 50 | (or (file-exists-p (expand-file-name "ChangeLog" root)) | 50 | ;; call make ChangeLog? Or make ChangeLog CHANGELOG=temp and compare |
| 51 | (zerop (call-process "make" nil nil nil "-C" root "ChangeLog")) | 51 | ;; with the existing? |
| 52 | (error "Problem generating ChangeLog")) | 52 | (with-temp-buffer |
| 53 | (insert-file-contents clog) | ||
| 54 | (or (re-search-forward "^[ \t]*Copyright.*Free Software" nil t) | ||
| 55 | (user-error "ChangeLog looks like a personal one - remove it?"))) | ||
| 56 | (or | ||
| 57 | (zerop (call-process "make" nil nil nil "-C" root "ChangeLog")) | ||
| 58 | (error "Problem generating ChangeLog")))) | ||
| 53 | (require 'add-log) | 59 | (require 'add-log) |
| 54 | (or date (setq date (funcall add-log-time-format nil t))) | 60 | (or date (setq date (funcall add-log-time-format nil t))) |
| 55 | (let* ((logs (process-lines "find" root "-name" "ChangeLog")) | 61 | (let* ((logs (process-lines "find" root "-name" "ChangeLog")) |