diff options
| author | Glenn Morris | 2012-06-05 21:28:08 -0400 |
|---|---|---|
| committer | Glenn Morris | 2012-06-05 21:28:08 -0400 |
| commit | f7dd4e98e4c50f9d058d49218d1ef7abc7cb553f (patch) | |
| tree | e5ece34c249550dc87130124ca94aeb04cbb05bf | |
| parent | 276d5f5de52a2226e818e3b2361e0858bda9cec6 (diff) | |
| download | emacs-f7dd4e98e4c50f9d058d49218d1ef7abc7cb553f.tar.gz emacs-f7dd4e98e4c50f9d058d49218d1ef7abc7cb553f.zip | |
Find rcs2log in the source-directory when running uninstalled
This is preparation for getting rid of lib-src's "stamp-*" files.
* lisp/vc/vc-rcs.el (vc-rcs-rcs2log-program): New.
(vc-rcs-update-changelog): Use it.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/vc/vc-rcs.el | 23 |
2 files changed, 22 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 59039e19ab2..211ea180ec4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2012-06-06 Glenn Morris <rgm@gnu.org> | 1 | 2012-06-06 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * vc/vc-rcs.el (vc-rcs-rcs2log-program): New. | ||
| 4 | (vc-rcs-update-changelog): Use it. | ||
| 5 | |||
| 3 | * emacs-lisp/authors.el (authors-fixed-entries): Remove vcdiff | 6 | * emacs-lisp/authors.el (authors-fixed-entries): Remove vcdiff |
| 4 | 7 | ||
| 5 | * vc/vc-sccs.el (vc-sccs-write-revision): New function. | 8 | * vc/vc-sccs.el (vc-sccs-write-revision): New function. |
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el index 7e10372f362..104e6fd59e3 100644 --- a/lisp/vc/vc-rcs.el +++ b/lisp/vc/vc-rcs.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; vc-rcs.el --- support for RCS version-control | 1 | ;;; vc-rcs.el --- support for RCS version-control |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1992-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: FSF (see vc.el for full credits) | 5 | ;; Author: FSF (see vc.el for full credits) |
| 6 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> | 6 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> |
| @@ -868,6 +868,23 @@ and CVS." | |||
| 868 | (minor-num (string-to-number (vc-rcs-minor-part rev)))) | 868 | (minor-num (string-to-number (vc-rcs-minor-part rev)))) |
| 869 | (concat branch "." (number-to-string (1+ minor-num)))))) | 869 | (concat branch "." (number-to-string (1+ minor-num)))))) |
| 870 | 870 | ||
| 871 | ;; Note that most GNU/Linux distributions seem to supply rcs2log in a | ||
| 872 | ;; standard bin directory. Eg both Red Hat and Debian include it in | ||
| 873 | ;; their cvs packages. It's not obvious why Emacs still needs to | ||
| 874 | ;; provide it as well... | ||
| 875 | (defvar vc-rcs-rcs2log-program | ||
| 876 | (let (exe) | ||
| 877 | (cond ((file-executable-p | ||
| 878 | (setq exe (expand-file-name "rcs2log" exec-directory))) | ||
| 879 | exe) | ||
| 880 | ;; In the unlikely event that someone is running an | ||
| 881 | ;; uninstalled Emacs and wants to do something RCS-related. | ||
| 882 | ((file-executable-p | ||
| 883 | (setq exe (expand-file-name "lib-src/rcs2log" source-directory))) | ||
| 884 | exe) | ||
| 885 | (t "rcs2log"))) | ||
| 886 | "Path to the `rcs2log' program (normally in `exec-directory').") | ||
| 887 | |||
| 871 | (defun vc-rcs-update-changelog (files) | 888 | (defun vc-rcs-update-changelog (files) |
| 872 | "Default implementation of update-changelog. | 889 | "Default implementation of update-changelog. |
| 873 | Uses `rcs2log' which only works for RCS and CVS." | 890 | Uses `rcs2log' which only works for RCS and CVS." |
| @@ -898,9 +915,7 @@ Uses `rcs2log' which only works for RCS and CVS." | |||
| 898 | (unwind-protect | 915 | (unwind-protect |
| 899 | (progn | 916 | (progn |
| 900 | (setq default-directory odefault) | 917 | (setq default-directory odefault) |
| 901 | (if (eq 0 (apply 'call-process | 918 | (if (eq 0 (apply 'call-process vc-rcs-rcs2log-program |
| 902 | (expand-file-name "rcs2log" | ||
| 903 | exec-directory) | ||
| 904 | nil (list t tempfile) nil | 919 | nil (list t tempfile) nil |
| 905 | "-c" changelog | 920 | "-c" changelog |
| 906 | "-u" (concat login-name | 921 | "-u" (concat login-name |