Mercurial > emacs
comparison lisp/vc.el @ 17410:777a31320b0f
(vc-update-change-log): Run `rcs2log' in the correct
directory when ChangeLog is found elsewhere. Display any error
output from rcs2log.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 12 Apr 1997 03:14:16 +0000 |
parents | c8228f461dda |
children | 3e14521699ff |
comparison
equal
deleted
inserted
replaced
17409:6f49eb13a7c6 | 17410:777a31320b0f |
---|---|
1815 (t | 1815 (t |
1816 ;; `rcs2log' will find the relevant RCS or CVS files | 1816 ;; `rcs2log' will find the relevant RCS or CVS files |
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) |
1830 (goto-char (point-min)) | 1839 (goto-char (point-min)) |
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 |
1852 (defun vc-backend-admin (file &optional rev comment) | 1871 (defun vc-backend-admin (file &optional rev comment) |
1853 ;; Register a file into the version-control system | 1872 ;; Register a file into the version-control system |