]> code.delx.au - gnu-emacs/blobdiff - lisp/vc-rcs.el
*** empty log message ***
[gnu-emacs] / lisp / vc-rcs.el
index 92676717cde4f6fffa935090c29ba66bcc8cd370..f703b680482cd317eb89d3f454ff10d39892ce1f 100644 (file)
@@ -1,11 +1,11 @@
 ;;; vc-rcs.el --- support for RCS version-control
 
-;; Copyright (C) 1992,93,94,95,96,97,98,99,2000  Free Software Foundation, Inc.
+;; Copyright (C) 1992,93,94,95,96,97,98,99,2000,2001  Free Software Foundation, Inc.
 
 ;; Author:     FSF (see vc.el for full credits)
 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
 
-;; $Id: vc-rcs.el,v 1.15 2001/01/08 16:25:43 spiegel Exp $
+;; $Id: vc-rcs.el,v 1.20 2001/07/16 12:22:59 pj Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -24,7 +24,9 @@
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
-;;; Commentary:   see vc.el
+;;; Commentary:
+
+;; See vc.el
 
 ;;; Code:
 
@@ -33,7 +35,8 @@
 ;;;
 
 (eval-when-compile
-  (require 'cl))
+  (require 'cl)
+  (require 'vc))
 
 (defcustom vc-rcs-release nil
   "*The release number of your RCS installation, as a string.
@@ -77,6 +80,16 @@ These are passed to the checkout program by \\[vc-rcs-checkout]."
   :version "21.1"
   :group 'vc)
 
+(defcustom vc-rcs-diff-switches nil
+  "*A string or list of strings specifying extra switches for rcsdiff under VC."
+  :type '(choice (const :tag "None" nil)
+                (string :tag "Argument String")
+                (repeat :tag "Argument List"
+                        :value ("")
+                        string))
+  :version "21.1"
+  :group 'vc)
+
 (defcustom vc-rcs-header (or (cdr (assoc 'RCS vc-header-alist)) '("\$Id\$"))
   "*Header keywords to be inserted by `vc-insert-headers'."
   :type '(repeat string)
@@ -442,7 +455,7 @@ whether to remove it."
                      new-version))))))
        (message "Checking out %s...done" filename)))))
 
-(defun vc-rcs-revert (file)
+(defun vc-rcs-revert (file &optional contents-done)
   "Revert FILE to the version it was based on."
   (vc-do-command nil 0 "co" (vc-name file) "-f"
                 (concat "-u" (vc-workfile-version file))))
@@ -498,7 +511,7 @@ Needs RCS 5.6.2 or later for -M."
 
 (defun vc-rcs-print-log (file)
   "Get change log associated with FILE."
-  (vc-do-command t 0 "rlog" (vc-name file)))
+  (vc-do-command nil 0 "rlog" (vc-name file)))
 
 (defun vc-rcs-show-log-entry (version)
   (when (re-search-forward
@@ -534,15 +547,11 @@ Needs RCS 5.6.2 or later for -M."
 (defun vc-rcs-diff (file &optional oldvers newvers)
   "Get a difference report using RCS between two versions of FILE."
   (if (not oldvers) (setq oldvers (vc-workfile-version file)))
-  ;; If we know that --brief is not supported, don't try it.
-  (let* ((diff-switches-list (if (listp diff-switches)
-                                diff-switches
-                              (list diff-switches)))
-        (options (append (list "-q"
-                               (concat "-r" oldvers)
-                               (and newvers (concat "-r" newvers)))
-                         diff-switches-list)))
-    (apply 'vc-do-command t 1 "rcsdiff" file options)))
+  (apply 'vc-do-command "*vc-diff*" 1 "rcsdiff" file
+         (append (list "-q"
+                       (concat "-r" oldvers)
+                       (and newvers (concat "-r" newvers)))
+                 (vc-diff-switches-list rcs))))
 
 \f
 ;;;