emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108495: Find rcs2log in the sourc


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108495: Find rcs2log in the source-directory when running uninstalled
Date: Fri, 02 Nov 2012 01:46:50 -0000
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108495
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2012-06-05 21:28:08 -0400
message:
  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.
modified:
  lisp/ChangeLog
  lisp/vc/vc-rcs.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-06-06 01:06:54 +0000
+++ b/lisp/ChangeLog    2012-06-06 01:28:08 +0000
@@ -1,5 +1,8 @@
 2012-06-06  Glenn Morris  <address@hidden>
 
+       * vc/vc-rcs.el (vc-rcs-rcs2log-program): New.
+       (vc-rcs-update-changelog): Use it.
+
        * emacs-lisp/authors.el (authors-fixed-entries): Remove vcdiff
 
        * vc/vc-sccs.el (vc-sccs-write-revision): New function.

=== modified file 'lisp/vc/vc-rcs.el'
--- a/lisp/vc/vc-rcs.el 2012-02-25 04:29:09 +0000
+++ b/lisp/vc/vc-rcs.el 2012-06-06 01:28:08 +0000
@@ -1,6 +1,6 @@
 ;;; vc-rcs.el --- support for RCS version-control
 
-;; Copyright (C) 1992-2012  Free Software Foundation, Inc.
+;; Copyright (C) 1992-2012 Free Software Foundation, Inc.
 
 ;; Author:     FSF (see vc.el for full credits)
 ;; Maintainer: Andre Spiegel <address@hidden>
@@ -868,6 +868,23 @@
          (minor-num (string-to-number (vc-rcs-minor-part rev))))
       (concat branch "." (number-to-string (1+ minor-num))))))
 
+;; Note that most GNU/Linux distributions seem to supply rcs2log in a
+;; standard bin directory.  Eg both Red Hat and Debian include it in
+;; their cvs packages.  It's not obvious why Emacs still needs to
+;; provide it as well...
+(defvar vc-rcs-rcs2log-program
+  (let (exe)
+    (cond ((file-executable-p
+            (setq exe (expand-file-name "rcs2log" exec-directory)))
+           exe)
+          ;; In the unlikely event that someone is running an
+          ;; uninstalled Emacs and wants to do something RCS-related.
+          ((file-executable-p
+            (setq exe (expand-file-name "lib-src/rcs2log" source-directory)))
+           exe)
+          (t "rcs2log")))
+  "Path to the `rcs2log' program (normally in `exec-directory').")
+
 (defun vc-rcs-update-changelog (files)
   "Default implementation of update-changelog.
 Uses `rcs2log' which only works for RCS and CVS."
@@ -898,9 +915,7 @@
             (unwind-protect
                 (progn
                   (setq default-directory odefault)
-                  (if (eq 0 (apply 'call-process
-                                    (expand-file-name "rcs2log"
-                                                      exec-directory)
+                  (if (eq 0 (apply 'call-process vc-rcs-rcs2log-program
                                     nil (list t tempfile) nil
                                     "-c" changelog
                                     "-u" (concat login-name


reply via email to

[Prev in Thread] Current Thread [Next in Thread]