aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-04-12 03:14:16 +0000
committerRichard M. Stallman1997-04-12 03:14:16 +0000
commit124c852b0a825f7e64e41e4b137fc693060b3c19 (patch)
tree43a01612a39e31dbfe2c3c0e3d4dc863d8c2a841
parent13709db5cf8a3428445270f66214cb7fe1abed2f (diff)
downloademacs-124c852b0a825f7e64e41e4b137fc693060b3c19.tar.gz
emacs-124c852b0a825f7e64e41e4b137fc693060b3c19.zip
(vc-update-change-log): Run `rcs2log' in the correct
directory when ChangeLog is found elsewhere. Display any error output from rcs2log.
-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."
1817 ;; relative to the curent directory if none supplied. 1817 ;; relative to the curent directory if none supplied.
1818 nil))) 1818 nil)))
1819 (let ((odefault default-directory) 1819 (let ((odefault default-directory)
1820 (changelog (find-change-log))
1821 ;; Presumably not portable to non-Unixy systems, along with rcs2log:
1822 (tempfile (make-temp-name
1823 (concat (file-name-as-directory
1824 (directory-file-name (or (getenv "TMPDIR")
1825 (getenv "TMP")
1826 (getenv "TEMP")
1827 "/tmp")))
1828 "vc")))
1820 (full-name (or add-log-full-name 1829 (full-name (or add-log-full-name
1821 (user-full-name) 1830 (user-full-name)
1822 (user-login-name) 1831 (user-login-name)
1823 (format "uid%d" (number-to-string (user-uid))))) 1832 (format "uid%d" (number-to-string (user-uid)))))
1824 (mailing-address (or add-log-mailing-address 1833 (mailing-address (or add-log-mailing-address
1825 user-mail-address))) 1834 user-mail-address)))
1826 (find-file-other-window (find-change-log)) 1835 (find-file-other-window changelog)
1827 (barf-if-buffer-read-only) 1836 (barf-if-buffer-read-only)
1828 (vc-buffer-sync) 1837 (vc-buffer-sync)
1829 (undo-boundary) 1838 (undo-boundary)
@@ -1831,21 +1840,31 @@ default directory."
1831 (push-mark) 1840 (push-mark)
1832 (message "Computing change log entries...") 1841 (message "Computing change log entries...")
1833 (message "Computing change log entries... %s" 1842 (message "Computing change log entries... %s"
1834 (if (eq 0 (apply 'call-process "rcs2log" nil '(t nil) nil 1843 (unwind-protect
1835 "-u" 1844 (progn
1836 (concat (vc-user-login-name) 1845 (cd odefault)
1837 "\t" 1846 (if (eq 0 (apply 'call-process "rcs2log" nil
1838 full-name 1847 (list t tempfile) nil
1839 "\t" 1848 "-c" changelog
1840 mailing-address) 1849 "-u" (concat (vc-user-login-name)
1841 (mapcar (function 1850 "\t" full-name
1842 (lambda (f) 1851 "\t" mailing-address)
1843 (file-relative-name 1852 (mapcar
1844 (if (file-name-absolute-p f) 1853 (function
1845 f 1854 (lambda (f)
1846 (concat odefault f))))) 1855 (file-relative-name
1847 args))) 1856 (if (file-name-absolute-p f)
1848 "done" "failed")))) 1857 f
1858 (concat odefault f)))))
1859 args)))
1860 "done"
1861 (pop-to-buffer
1862 (set-buffer (get-buffer-create "*vc*")))
1863 (erase-buffer)
1864 (insert-file tempfile)
1865 "failed"))
1866 (cd (file-name-directory changelog))
1867 (delete-file tempfile)))))
1849 1868
1850;; Collect back-end-dependent stuff here 1869;; Collect back-end-dependent stuff here
1851 1870