comparison lisp/vc.el @ 15977:abc3b3e7ea88

(vc-update-change-log): Remove code which found RCS files only in RCS directory; leave this to rcs2log, which will find entries for CVS or RCS/*,v and *,v. Lose sub-process' stderr output. Doc fix.
author Richard M. Stallman <rms@gnu.org>
date Thu, 29 Aug 1996 21:22:07 +0000
parents d5dd4b891c3e
children 2813c68432c9
comparison
equal deleted inserted replaced
15976:e6d654e1fa2a 15977:abc3b3e7ea88
1741 ) 1741 )
1742 ) 1742 )
1743 1743
1744 ;;;###autoload 1744 ;;;###autoload
1745 (defun vc-update-change-log (&rest args) 1745 (defun vc-update-change-log (&rest args)
1746 "Find change log file and add entries from recent RCS logs. 1746 "Find change log file and add entries from recent RCS/CVS logs.
1747 The mark is left at the end of the text prepended to the change log. 1747 The mark is left at the end of the text prepended to the change log.
1748 With prefix arg of C-u, only find log entries for the current buffer's file. 1748 With prefix arg of C-u, only find log entries for the current buffer's file.
1749 With any numeric prefix arg, find log entries for all files currently visited. 1749 With any numeric prefix arg, find log entries for all files currently visited.
1750 Otherwise, find log entries for all registered files in the default directory. 1750 Otherwise, find log entries for all registered files in the default
1751 From a program, any arguments are passed to the `rcs2log' script." 1751 directory using `rcs2log', which finds CVS logs preferentially.
1752 From a program, any arguments are assumed to be filenames and are
1753 passed to the `rcs2log' script after massaging to be relative to the
1754 default directory."
1752 (interactive 1755 (interactive
1753 (cond ((consp current-prefix-arg) ;C-u 1756 (cond ((consp current-prefix-arg) ;C-u
1754 (list buffer-file-name)) 1757 (list buffer-file-name))
1755 (current-prefix-arg ;Numeric argument. 1758 (current-prefix-arg ;Numeric argument.
1756 (let ((files nil) 1759 (let ((files nil)
1761 (and file (vc-backend file) 1764 (and file (vc-backend file)
1762 (setq files (cons file files))) 1765 (setq files (cons file files)))
1763 (setq buffers (cdr buffers))) 1766 (setq buffers (cdr buffers)))
1764 files)) 1767 files))
1765 (t 1768 (t
1766 (let ((RCS (concat default-directory "RCS"))) 1769 ;; `rcs2log' will find the relevant RCS or CVS files
1767 (and (file-directory-p RCS) 1770 ;; relative to the curent directory if none supplied.
1768 (mapcar (function 1771 nil)))
1769 (lambda (f)
1770 (if (string-match "\\(.*\\),v$" f)
1771 (substring f 0 (match-end 1))
1772 f)))
1773 (directory-files RCS nil "...\\|^[^.]\\|^.[^.]")))))))
1774 (let ((odefault default-directory) 1772 (let ((odefault default-directory)
1775 (full-name (or add-log-full-name 1773 (full-name (or add-log-full-name
1776 (user-full-name))) 1774 (user-full-name)))
1777 (mailing-address (or add-log-mailing-address 1775 (mailing-address (or add-log-mailing-address
1778 user-mail-address))) 1776 user-mail-address)))
1782 (undo-boundary) 1780 (undo-boundary)
1783 (goto-char (point-min)) 1781 (goto-char (point-min))
1784 (push-mark) 1782 (push-mark)
1785 (message "Computing change log entries...") 1783 (message "Computing change log entries...")
1786 (message "Computing change log entries... %s" 1784 (message "Computing change log entries... %s"
1787 (if (or (null args) 1785 (if (eq 0 (apply 'call-process "rcs2log" nil '(t nil) nil
1788 (eq 0 (apply 'call-process "rcs2log" nil t nil 1786 "-u"
1789 "-u" 1787 (concat (user-login-name)
1790 (concat (user-login-name) 1788 "\t"
1791 "\t" 1789 full-name
1792 full-name 1790 "\t"
1793 "\t" 1791 mailing-address)
1794 mailing-address) 1792 (mapcar (function
1795 (mapcar (function 1793 (lambda (f)
1796 (lambda (f) 1794 (file-relative-name
1797 (file-relative-name 1795 (if (file-name-absolute-p f)
1798 (if (file-name-absolute-p f) 1796 f
1799 f 1797 (concat odefault f)))))
1800 (concat odefault f))))) 1798 args)))
1801 args))))
1802 "done" "failed")))) 1799 "done" "failed"))))
1803 1800
1804 ;; Collect back-end-dependent stuff here 1801 ;; Collect back-end-dependent stuff here
1805 1802
1806 (defun vc-backend-admin (file &optional rev comment) 1803 (defun vc-backend-admin (file &optional rev comment)