diff options
| author | André Spiegel | 2001-02-01 15:12:35 +0000 |
|---|---|---|
| committer | André Spiegel | 2001-02-01 15:12:35 +0000 |
| commit | a1e9f194d2fd1813000dea1a25ef907aefc41f22 (patch) | |
| tree | d698b58ac8c028c0b9223f2a02fc2a0e8e43345f | |
| parent | 10489ed706862c9b293acb154b93c69e858dece6 (diff) | |
| download | emacs-a1e9f194d2fd1813000dea1a25ef907aefc41f22.tar.gz emacs-a1e9f194d2fd1813000dea1a25ef907aefc41f22.zip | |
(vc-sccs-diff-switches): New customization option.
(vc-sccs-diff): Use it via vc-diff-switches-list.
(vc-sccs-workfile-unchanged-p): Return correct status.
| -rw-r--r-- | lisp/vc-sccs.el | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/lisp/vc-sccs.el b/lisp/vc-sccs.el index c37c37e6475..856f8e1549b 100644 --- a/lisp/vc-sccs.el +++ b/lisp/vc-sccs.el | |||
| @@ -5,7 +5,7 @@ | |||
| 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> |
| 7 | 7 | ||
| 8 | ;; $Id: vc-sccs.el,v 1.6 2001/01/08 16:26:44 spiegel Exp $ | 8 | ;; $Id: vc-sccs.el,v 1.7 2001/01/09 14:55:30 fx Exp $ |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -28,6 +28,9 @@ | |||
| 28 | 28 | ||
| 29 | ;;; Code: | 29 | ;;; Code: |
| 30 | 30 | ||
| 31 | (eval-when-compile | ||
| 32 | (require 'vc)) | ||
| 33 | |||
| 31 | ;;; | 34 | ;;; |
| 32 | ;;; Customization options | 35 | ;;; Customization options |
| 33 | ;;; | 36 | ;;; |
| @@ -44,6 +47,17 @@ A string or list of strings passed to the checkin program by | |||
| 44 | :version "21.1" | 47 | :version "21.1" |
| 45 | :group 'vc) | 48 | :group 'vc) |
| 46 | 49 | ||
| 50 | (defcustom vc-sccs-diff-switches nil | ||
| 51 | "*A string or list of strings specifying extra switches for `vcdiff', | ||
| 52 | the diff utility used for SCCS under VC." | ||
| 53 | :type '(choice (const :tag "None" nil) | ||
| 54 | (string :tag "Argument String") | ||
| 55 | (repeat :tag "Argument List" | ||
| 56 | :value ("") | ||
| 57 | string)) | ||
| 58 | :version "21.1" | ||
| 59 | :group 'vc) | ||
| 60 | |||
| 47 | (defcustom vc-sccs-header (or (cdr (assoc 'SCCS vc-header-alist)) '("%W%")) | 61 | (defcustom vc-sccs-header (or (cdr (assoc 'SCCS vc-header-alist)) '("%W%")) |
| 48 | "*Header keywords to be inserted by `vc-insert-headers'." | 62 | "*Header keywords to be inserted by `vc-insert-headers'." |
| 49 | :type '(repeat string) | 63 | :type '(repeat string) |
| @@ -128,9 +142,9 @@ For a description of possible values, see `vc-check-master-templates'." | |||
| 128 | 142 | ||
| 129 | (defun vc-sccs-workfile-unchanged-p (file) | 143 | (defun vc-sccs-workfile-unchanged-p (file) |
| 130 | "SCCS-specific implementation of vc-workfile-unchanged-p." | 144 | "SCCS-specific implementation of vc-workfile-unchanged-p." |
| 131 | (apply 'vc-do-command nil 1 "vcdiff" (vc-name file) | 145 | (zerop (apply 'vc-do-command nil 1 "vcdiff" (vc-name file) |
| 132 | (list "--brief" "-q" | 146 | (list "--brief" "-q" |
| 133 | (concat "-r" (vc-workfile-version file))))) | 147 | (concat "-r" (vc-workfile-version file)))))) |
| 134 | 148 | ||
| 135 | 149 | ||
| 136 | ;;; | 150 | ;;; |
| @@ -291,14 +305,11 @@ EDITABLE non-nil means previous version should be locked." | |||
| 291 | "Get a difference report using SCCS between two versions of FILE." | 305 | "Get a difference report using SCCS between two versions of FILE." |
| 292 | (setq oldvers (vc-sccs-lookup-triple file oldvers)) | 306 | (setq oldvers (vc-sccs-lookup-triple file oldvers)) |
| 293 | (setq newvers (vc-sccs-lookup-triple file newvers)) | 307 | (setq newvers (vc-sccs-lookup-triple file newvers)) |
| 294 | (let* ((diff-switches-list (if (listp diff-switches) | 308 | (apply 'vc-do-command t 1 "vcdiff" (vc-name file) |
| 295 | diff-switches | 309 | (append (list "-q" |
| 296 | (list diff-switches))) | 310 | (and oldvers (concat "-r" oldvers)) |
| 297 | (options (append (list "-q" | 311 | (and newvers (concat "-r" newvers))) |
| 298 | (and oldvers (concat "-r" oldvers)) | 312 | (vc-diff-switches-list sccs)))) |
| 299 | (and newvers (concat "-r" newvers))) | ||
| 300 | diff-switches-list))) | ||
| 301 | (apply 'vc-do-command t 1 "vcdiff" (vc-name file) options))) | ||
| 302 | 313 | ||
| 303 | 314 | ||
| 304 | ;;; | 315 | ;;; |