1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-23 06:00:41 -08:00

Doc fixes.

(vc-rcs-register-switches, vc-rcs-checkin-switches)
(vc-rcs-checkout-switches, vc-rcs-header)
(vc-rcs-master-templates): Add or change :version.
This commit is contained in:
Dave Love 2000-09-07 20:02:38 +00:00
parent 0d685c4f7b
commit 33c1b7a13a

View file

@ -5,7 +5,7 @@
;; Author: FSF (see vc.el for full credits) ;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org> ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
;; $Id: vc-rcs.el,v 1.1 2000/09/04 19:47:43 gerd Exp $ ;; $Id: vc-rcs.el,v 1.2 2000/09/05 20:08:21 monnier Exp $
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
@ -37,14 +37,15 @@ If nil, VC itself computes this value when it is first needed."
:group 'vc) :group 'vc)
(defcustom vc-rcs-register-switches nil (defcustom vc-rcs-register-switches nil
"*A string or list of strings; extra switches for registering a file "*Extra switches for registering a file in RCS.
in RCS. These are passed to the checkin program by A string or list of strings. These are passed to the checkin program
\\[vc-rcs-register]." by \\[vc-rcs-register]."
:type '(choice (const :tag "None" nil) :type '(choice (const :tag "None" nil)
(string :tag "Argument String") (string :tag "Argument String")
(repeat :tag "Argument List" (repeat :tag "Argument List"
:value ("") :value ("")
string)) string))
:version "21.1"
:group 'vc) :group 'vc)
(defcustom vc-rcs-checkin-switches nil (defcustom vc-rcs-checkin-switches nil
@ -55,6 +56,7 @@ These are passed to the checkin program by \\[vc-rcs-checkin]."
(repeat :tag "Argument List" (repeat :tag "Argument List"
:value ("") :value ("")
string)) string))
:version "21.1"
:group 'vc) :group 'vc)
(defcustom vc-rcs-checkout-switches nil (defcustom vc-rcs-checkout-switches nil
@ -65,11 +67,13 @@ These are passed to the checkout program by \\[vc-rcs-checkout]."
(repeat :tag "Argument List" (repeat :tag "Argument List"
:value ("") :value ("")
string)) string))
:version "21.1"
:group 'vc) :group 'vc)
(defcustom vc-rcs-header (or (cdr (assoc 'RCS vc-header-alist)) '("\$Id\$")) (defcustom vc-rcs-header (or (cdr (assoc 'RCS vc-header-alist)) '("\$Id\$"))
"*Header keywords to be inserted by `vc-insert-headers'." "*Header keywords to be inserted by `vc-insert-headers'."
:type 'string :type 'string
:version "21.1"
:group 'vc) :group 'vc)
(defcustom vc-rcsdiff-knows-brief nil (defcustom vc-rcsdiff-knows-brief nil
@ -89,7 +93,7 @@ For a description of possible values, see `vc-check-master-templates'."
(repeat :tag "User-specified" (repeat :tag "User-specified"
(choice string (choice string
function))) function)))
:version "20.5" :version "21.1"
:group 'vc) :group 'vc)
;;;###autoload ;;;###autoload
@ -104,12 +108,12 @@ For a description of possible values, see `vc-check-master-templates'."
;; vc-workfile-version might not be known; in that case the ;; vc-workfile-version might not be known; in that case the
;; property is nil. vc-rcs-fetch-master-state knows how to ;; property is nil. vc-rcs-fetch-master-state knows how to
;; handle that. ;; handle that.
(vc-rcs-fetch-master-state file (vc-rcs-fetch-master-state file
(vc-file-getprop file (vc-file-getprop file
'vc-workfile-version)))) 'vc-workfile-version))))
(if (eq state 'up-to-date) (if (eq state 'up-to-date)
(if (vc-workfile-unchanged-p file) (if (vc-workfile-unchanged-p file)
'up-to-date 'up-to-date
'unlocked-changes) 'unlocked-changes)
state))) state)))
@ -117,7 +121,7 @@ For a description of possible values, see `vc-check-master-templates'."
"State heuristic for RCS." "State heuristic for RCS."
(let (vc-rcs-headers-result) (let (vc-rcs-headers-result)
(if (and vc-consult-headers (if (and vc-consult-headers
(setq vc-rcs-headers-result (setq vc-rcs-headers-result
(vc-rcs-consult-headers file)) (vc-rcs-consult-headers file))
(eq vc-rcs-headers-result 'rev-and-lock)) (eq vc-rcs-headers-result 'rev-and-lock))
(let ((state (vc-file-getprop file 'vc-state))) (let ((state (vc-file-getprop file 'vc-state)))
@ -181,8 +185,8 @@ For a description of possible values, see `vc-check-master-templates'."
value)) value))
(defun vc-rcs-fetch-master-state (file &optional workfile-version) (defun vc-rcs-fetch-master-state (file &optional workfile-version)
"Compute the master file's idea of the state of FILE. If a "Compute the master file's idea of the state of FILE.
WORKFILE-VERSION is given, compute the state of that version, If a WORKFILE-VERSION is given, compute the state of that version,
otherwise determine the workfile version based on the master file. otherwise determine the workfile version based on the master file.
This function sets the properties `vc-workfile-version' and This function sets the properties `vc-workfile-version' and
`vc-checkout-model' to their correct values, based on the master `vc-checkout-model' to their correct values, based on the master
@ -227,7 +231,7 @@ file."
(cond (cond
;; not locked ;; not locked
((not locking-user) ((not locking-user)
(if (or workfile-is-latest (if (or workfile-is-latest
(vc-rcs-latest-on-branch-p file workfile-version)) (vc-rcs-latest-on-branch-p file workfile-version))
;; workfile version is latest on branch ;; workfile version is latest on branch
'up-to-date 'up-to-date
@ -516,11 +520,11 @@ WRITABLE non-nil means previous version should be locked."
(vc-rename-master (vc-name old) new vc-rcs-master-templates)) (vc-rename-master (vc-name old) new vc-rcs-master-templates))
(defun vc-release-greater-or-equal (r1 r2) (defun vc-release-greater-or-equal (r1 r2)
"Compare release numbers, represented as strings. Release "Compare release numbers, represented as strings.
components are assumed cardinal numbers, not decimal fractions \(5.10 Release components are assumed cardinal numbers, not decimal fractions
is a higher release than 5.9\). Omitted fields are considered lower \(5.10 is a higher release than 5.9\). Omitted fields are considered
\(5.6.7 is earlier than 5.6.7.1\). Comparison runs till the end of lower \(5.6.7 is earlier than 5.6.7.1\). Comparison runs till the end
the string is found, or a non-numeric component shows up \(5.6.7 is of the string is found, or a non-numeric component shows up \(5.6.7 is
earlier than \"5.6.7 beta\", which is probably not what you want in earlier than \"5.6.7 beta\", which is probably not what you want in
some cases\). This code is suitable for existing RCS release numbers. some cases\). This code is suitable for existing RCS release numbers.
CVS releases are handled reasonably, too \(1.3 < 1.4* < 1.5\)." CVS releases are handled reasonably, too \(1.3 < 1.4* < 1.5\)."
@ -544,7 +548,7 @@ CVS releases are handled reasonably, too \(1.3 < 1.4* < 1.5\)."
(throw 'done t))))) (throw 'done t)))))
(defun vc-rcs-release-p (release) (defun vc-rcs-release-p (release)
"Return t if we have RELEASE or better" "Return t if we have RELEASE or better."
(let ((installation (vc-rcs-system-release))) (let ((installation (vc-rcs-system-release)))
(if (and installation (if (and installation
(not (eq installation 'unknown))) (not (eq installation 'unknown)))
@ -668,11 +672,11 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
(vc-file-setprop file 'vc-name (vc-file-setprop file 'vc-name
(if (file-name-absolute-p name) (if (file-name-absolute-p name)
name name
(expand-file-name (expand-file-name
name name
(file-name-directory file)))))) (file-name-directory file))))))
(vc-file-setprop file 'vc-workfile-version (vc-file-setprop file 'vc-workfile-version
(if (re-search-forward (if (re-search-forward
"^initial revision: \\([0-9.]+\\).*\n" "^initial revision: \\([0-9.]+\\).*\n"
nil t) nil t)
(match-string 1)))))) (match-string 1))))))
@ -714,11 +718,11 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
(if writable "-l") (if writable "-l")
(concat "-p" rev) (concat "-p" rev)
switches))) switches)))
(set-file-modes filename (set-file-modes filename
(logior (file-modes (vc-name file)) (logior (file-modes (vc-name file))
(if writable 128 0))) (if writable 128 0)))
(setq failed nil)) (setq failed nil))
(and failed (file-exists-p filename) (and failed (file-exists-p filename)
(delete-file filename)))) (delete-file filename))))
(let (new-version) (let (new-version)
;; if we should go to the head of the trunk, ;; if we should go to the head of the trunk,