summaryrefslogtreecommitdiff
path: root/lisp/vc.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-04-12 03:14:16 +0000
committerRichard M. Stallman <rms@gnu.org>1997-04-12 03:14:16 +0000
commit124c852b0a825f7e64e41e4b137fc693060b3c19 (patch)
tree43a01612a39e31dbfe2c3c0e3d4dc863d8c2a841 /lisp/vc.el
parent13709db5cf8a3428445270f66214cb7fe1abed2f (diff)
downloademacs-124c852b0a825f7e64e41e4b137fc693060b3c19.tar.gz
(vc-update-change-log): Run `rcs2log' in the correct
directory when ChangeLog is found elsewhere. Display any error output from rcs2log.
Diffstat (limited to 'lisp/vc.el')
-rw-r--r--lisp/vc.el51
1 files changed, 35 insertions, 16 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index 37694325cda..8c8aa44aaf8 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1817,13 +1817,22 @@ default directory."
;; relative to the curent directory if none supplied.
nil)))
(let ((odefault default-directory)
+ (changelog (find-change-log))
+ ;; Presumably not portable to non-Unixy systems, along with rcs2log:
+ (tempfile (make-temp-name
+ (concat (file-name-as-directory
+ (directory-file-name (or (getenv "TMPDIR")
+ (getenv "TMP")
+ (getenv "TEMP")
+ "/tmp")))
+ "vc")))
(full-name (or add-log-full-name
(user-full-name)
(user-login-name)
(format "uid%d" (number-to-string (user-uid)))))
(mailing-address (or add-log-mailing-address
user-mail-address)))
- (find-file-other-window (find-change-log))
+ (find-file-other-window changelog)
(barf-if-buffer-read-only)
(vc-buffer-sync)
(undo-boundary)
@@ -1831,21 +1840,31 @@ default directory."
(push-mark)
(message "Computing change log entries...")
(message "Computing change log entries... %s"
- (if (eq 0 (apply 'call-process "rcs2log" nil '(t nil) nil
- "-u"
- (concat (vc-user-login-name)
- "\t"
- full-name
- "\t"
- mailing-address)
- (mapcar (function
- (lambda (f)
- (file-relative-name
- (if (file-name-absolute-p f)
- f
- (concat odefault f)))))
- args)))
- "done" "failed"))))
+ (unwind-protect
+ (progn
+ (cd odefault)
+ (if (eq 0 (apply 'call-process "rcs2log" nil
+ (list t tempfile) nil
+ "-c" changelog
+ "-u" (concat (vc-user-login-name)
+ "\t" full-name
+ "\t" mailing-address)
+ (mapcar
+ (function
+ (lambda (f)
+ (file-relative-name
+ (if (file-name-absolute-p f)
+ f
+ (concat odefault f)))))
+ args)))
+ "done"
+ (pop-to-buffer
+ (set-buffer (get-buffer-create "*vc*")))
+ (erase-buffer)
+ (insert-file tempfile)
+ "failed"))
+ (cd (file-name-directory changelog))
+ (delete-file tempfile)))))
;; Collect back-end-dependent stuff here