summaryrefslogtreecommitdiff
path: root/lisp/vc-rcs.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2008-04-29 15:32:56 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2008-04-29 15:32:56 +0000
commite0607aaa2c6b33104fed475eb15452b2cdb6df03 (patch)
treebb3f35077180a6aa3f3fcf7399c68d4b7e2a4fb4 /lisp/vc-rcs.el
parentb95ced6beee4bf2afccfc5aa0670d110d6afdfa6 (diff)
downloademacs-e0607aaa2c6b33104fed475eb15452b2cdb6df03.tar.gz
Make `checkout-model' apply to filesets.
* vc-hooks.el (vc-checkout-model): Rewrite. (vc-before-save, vc-after-save): Adjust callers accordingly. * vc.el (vc-editable-p, vc-next-action, vc-checkout, vc-update) (vc-transfer-file): Adjust callers accordingly. * vc-rcs.el (vc-rcs-checkout-model): Adjust arg. (vc-rcs-state, vc-rcs-state-heuristic, vc-rcs-receive-file) (vc-rcs-checkout, vc-rcs-fetch-master-state): Use vc-rcs-checkout-model instead of vc-checkout-model. * vc-mcvs.el (vc-mcvs-revert): Use vc-mcvs-checkout-model i.s.o vc-checkout-model. * vc-cvs.el (vc-cvs-checkout-model): Adjust arg. (vc-cvs-revert): Use vc-cvs-checkout-model i.s.o vc-checkout-model. * vc-svn.el (vc-svn-checkout-model): * vc-hg.el (vc-hg-checkout-model): * vc-git.el (vc-git-checkout-model): * vc-bzr.el (vc-bzr-checkout-model): Adjust arg.
Diffstat (limited to 'lisp/vc-rcs.el')
-rw-r--r--lisp/vc-rcs.el28
1 files changed, 14 insertions, 14 deletions
diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el
index ac882762b62..a1b10aaa541 100644
--- a/lisp/vc-rcs.el
+++ b/lisp/vc-rcs.el
@@ -109,13 +109,12 @@ For a description of possible values, see `vc-check-master-templates'."
;;; State-querying functions
;;;
-;;; The autoload cookie below places vc-rcs-registered directly into
-;;; loaddefs.el, so that vc-rcs.el does not need to be loaded for
-;;; every file that is visited. The definition is repeated below
-;;; so that Help and etags can find it.
-
-;;;###autoload (defun vc-rcs-registered (f) (vc-default-registered 'RCS f))
-(defun vc-rcs-registered (f) (vc-default-registered 'RCS f))
+;; The autoload cookie below places vc-rcs-registered directly into
+;; loaddefs.el, so that vc-rcs.el does not need to be loaded for
+;; every file that is visited.
+;;;###autoload
+(progn
+(defun vc-rcs-registered (f) (vc-default-registered 'RCS f)))
(defun vc-rcs-state (file)
"Implementation of `vc-state' for RCS."
@@ -133,7 +132,7 @@ For a description of possible values, see `vc-check-master-templates'."
state
(if (vc-workfile-unchanged-p file)
'up-to-date
- (if (eq (vc-checkout-model file) 'locking)
+ (if (eq (vc-rcs-checkout-model file) 'locking)
'unlocked-changes
'edited)))))
@@ -168,7 +167,7 @@ For a description of possible values, see `vc-check-master-templates'."
(vc-file-setprop file 'vc-checkout-model 'locking)
'up-to-date)
((string-match ".rw..-..-." permissions)
- (if (eq (vc-checkout-model file) 'locking)
+ (if (eq (vc-rcs-checkout-model file) 'locking)
(if (file-ownership-preserved-p file)
'edited
owner-name)
@@ -218,9 +217,10 @@ When VERSION is given, perform check for that version."
(vc-insert-file (vc-name file) "^desc")
(vc-rcs-find-most-recent-rev (vc-branch-part version))))))
-(defun vc-rcs-checkout-model (file)
+(defun vc-rcs-checkout-model (files)
"RCS-specific version of `vc-checkout-model'."
- (let (result)
+ (let ((file (if (consp files) (car files) files))
+ result)
(when vc-consult-headers
(vc-file-setprop file 'vc-checkout-model nil)
(vc-rcs-consult-headers file)
@@ -319,7 +319,7 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
(defun vc-rcs-receive-file (file rev)
"Implementation of receive-file for RCS."
- (let ((checkout-model (vc-checkout-model file)))
+ (let ((checkout-model (vc-rcs-checkout-model file)))
(vc-rcs-register file rev "")
(when (eq checkout-model 'implicit)
(vc-rcs-set-non-strict-locking file))
@@ -430,7 +430,7 @@ whether to remove it."
nil 0 "co" (vc-name file)
;; If locking is not strict, force to overwrite
;; the writable workfile.
- (if (eq (vc-checkout-model file) 'implicit) "-f")
+ (if (eq (vc-rcs-checkout-model file) 'implicit) "-f")
(if editable "-l")
(if (stringp rev)
;; a literal revision was specified
@@ -893,7 +893,7 @@ file."
;; locked by the calling user
((and (stringp locking-user)
(string= locking-user (vc-user-login-name file)))
- (if (or (eq (vc-checkout-model file) 'locking)
+ (if (or (eq (vc-rcs-checkout-model file) 'locking)
workfile-is-latest
(vc-rcs-latest-on-branch-p file working-revision))
'edited