aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond2008-05-02 17:47:25 +0000
committerEric S. Raymond2008-05-02 17:47:25 +0000
commit70e2f6c752f2d83bd013406a96b809572203e8fa (patch)
treee38864b2dbbf1211b146915a10da6b481d840df6
parent991ae4e4f8e8cefd2a83e7ffb4148d358c750486 (diff)
downloademacs-70e2f6c752f2d83bd013406a96b809572203e8fa.tar.gz
emacs-70e2f6c752f2d83bd013406a96b809572203e8fa.zip
Clean up vc*-revision-granularity and vc*-checkout-model.
-rw-r--r--lisp/vc-arch.el7
-rw-r--r--lisp/vc-bzr.el6
-rw-r--r--lisp/vc-cvs.el48
-rw-r--r--lisp/vc-git.el8
-rw-r--r--lisp/vc-hg.el8
-rw-r--r--lisp/vc-hooks.el4
-rw-r--r--lisp/vc-mcvs.el10
-rw-r--r--lisp/vc-mtn.el2
-rw-r--r--lisp/vc-rcs.el35
-rw-r--r--lisp/vc-sccs.el5
-rw-r--r--lisp/vc-svn.el10
-rw-r--r--lisp/vc.el10
12 files changed, 74 insertions, 79 deletions
diff --git a/lisp/vc-arch.el b/lisp/vc-arch.el
index 1573e55bd78..18eddb6f9c7 100644
--- a/lisp/vc-arch.el
+++ b/lisp/vc-arch.el
@@ -57,6 +57,11 @@
57 57
58(eval-when-compile (require 'vc) (require 'cl)) 58(eval-when-compile (require 'vc) (require 'cl))
59 59
60;;; Properties of the backend
61
62(defun vc-arch-revision-granularity () 'repository)
63(defun vc-arch-checkout-model (files) 'implicit)
64
60;;; 65;;;
61;;; Customization options 66;;; Customization options
62;;; 67;;;
@@ -369,8 +374,6 @@ Return non-nil if FILE is unchanged."
369 (message "There are unresolved conflicts in %s" 374 (message "There are unresolved conflicts in %s"
370 (file-name-nondirectory rej)))))) 375 (file-name-nondirectory rej))))))
371 376
372(defun vc-arch-checkout-model (file) 'implicit)
373
374(defun vc-arch-checkin (files rev comment) 377(defun vc-arch-checkin (files rev comment)
375 (if rev (error "Committing to a specific revision is unsupported")) 378 (if rev (error "Committing to a specific revision is unsupported"))
376 ;; FIXME: This implementation probably only works for singleton filesets 379 ;; FIXME: This implementation probably only works for singleton filesets
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el
index 15529e20f0c..3269bee7c0f 100644
--- a/lisp/vc-bzr.el
+++ b/lisp/vc-bzr.el
@@ -44,6 +44,10 @@
44;; For an up-to-date list of bugs, please see: 44;; For an up-to-date list of bugs, please see:
45;; https://bugs.launchpad.net/vc-bzr/+bugs 45;; https://bugs.launchpad.net/vc-bzr/+bugs
46 46
47;;; Properties of the backend
48
49(defun vc-bzr-revision-granularity () 'repository)
50(defun vc-bzr-checkout-model (files) 'implicit)
47 51
48;;; Code: 52;;; Code:
49 53
@@ -346,8 +350,6 @@ If any error occurred in running `bzr status', then return nil."
346 ((eq exitcode 0) (substring output 0 -1)) 350 ((eq exitcode 0) (substring output 0 -1))
347 (t nil)))))) 351 (t nil))))))
348 352
349(defun vc-bzr-checkout-model (files) 'implicit)
350
351(defun vc-bzr-create-repo () 353(defun vc-bzr-create-repo ()
352 "Create a new Bzr repository." 354 "Create a new Bzr repository."
353 (vc-bzr-command "init" nil 0 nil)) 355 (vc-bzr-command "init" nil 0 nil))
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el
index d67352ab250..5c3a93ff36f 100644
--- a/lisp/vc-cvs.el
+++ b/lisp/vc-cvs.el
@@ -35,6 +35,30 @@
35;; new functions when we reload this file. 35;; new functions when we reload this file.
36(put 'CVS 'vc-functions nil) 36(put 'CVS 'vc-functions nil)
37 37
38;;; Properties of the backend.
39
40(defun vc-cvs-revision-granularity () 'file)
41
42(defun vc-cvs-checkout-model (files)
43 "CVS-specific version of `vc-checkout-model'."
44 (if (getenv "CVSREAD")
45 'announce
46 (let* ((file (if (consp files) (car files) files))
47 (attrib (file-attributes file)))
48 (or (vc-file-getprop file 'vc-checkout-model)
49 (vc-file-setprop
50 file 'vc-checkout-model
51 (if (and attrib ;; don't check further if FILE doesn't exist
52 ;; If the file is not writable (despite CVSREAD being
53 ;; undefined), this is probably because the file is being
54 ;; "watched" by other developers.
55 ;; (If vc-mistrust-permissions was t, we actually shouldn't
56 ;; trust this, but there is no other way to learn this from
57 ;; CVS at the moment (version 1.9).)
58 (string-match "r-..-..-." (nth 8 attrib)))
59 'announce
60 'implicit))))))
61
38;;; 62;;;
39;;; Customization options 63;;; Customization options
40;;; 64;;;
@@ -238,26 +262,6 @@ See also variable `vc-cvs-sticky-date-format-string'."
238 (vc-cvs-registered file) 262 (vc-cvs-registered file)
239 (vc-file-getprop file 'vc-working-revision)) 263 (vc-file-getprop file 'vc-working-revision))
240 264
241(defun vc-cvs-checkout-model (files)
242 "CVS-specific version of `vc-checkout-model'."
243 (if (getenv "CVSREAD")
244 'announce
245 (let* ((file (if (consp files) (car files) files))
246 (attrib (file-attributes file)))
247 (or (vc-file-getprop file 'vc-checkout-model)
248 (vc-file-setprop
249 file 'vc-checkout-model
250 (if (and attrib ;; don't check further if FILE doesn't exist
251 ;; If the file is not writable (despite CVSREAD being
252 ;; undefined), this is probably because the file is being
253 ;; "watched" by other developers.
254 ;; (If vc-mistrust-permissions was t, we actually shouldn't
255 ;; trust this, but there is no other way to learn this from
256 ;; CVS at the moment (version 1.9).)
257 (string-match "r-..-..-." (nth 8 attrib)))
258 'announce
259 'implicit))))))
260
261(defun vc-cvs-mode-line-string (file) 265(defun vc-cvs-mode-line-string (file)
262 "Return string for placement into the modeline for FILE. 266 "Return string for placement into the modeline for FILE.
263Compared to the default implementation, this function does two things: 267Compared to the default implementation, this function does two things:
@@ -393,7 +397,7 @@ REV is the revision to check out."
393 (if (and (file-exists-p file) (not rev)) 397 (if (and (file-exists-p file) (not rev))
394 ;; If no revision was specified, just make the file writable 398 ;; If no revision was specified, just make the file writable
395 ;; if necessary (using `cvs-edit' if requested). 399 ;; if necessary (using `cvs-edit' if requested).
396 (and editable (not (eq (vc-cvs-checkout-model file) 'implicit)) 400 (and editable (not (eq (vc-cvs-checkout-model (list file)) 'implicit))
397 (if vc-cvs-use-edit 401 (if vc-cvs-use-edit
398 (vc-cvs-command nil 0 file "edit") 402 (vc-cvs-command nil 0 file "edit")
399 (set-file-modes file (logior (file-modes file) 128)) 403 (set-file-modes file (logior (file-modes file) 128))
@@ -421,7 +425,7 @@ REV is the revision to check out."
421(defun vc-cvs-revert (file &optional contents-done) 425(defun vc-cvs-revert (file &optional contents-done)
422 "Revert FILE to the working revision on which it was based." 426 "Revert FILE to the working revision on which it was based."
423 (vc-default-revert 'CVS file contents-done) 427 (vc-default-revert 'CVS file contents-done)
424 (unless (eq (vc-cvs-checkout-model file) 'implicit) 428 (unless (eq (vc-cvs-checkout-model (list file)) 'implicit)
425 (if vc-cvs-use-edit 429 (if vc-cvs-use-edit
426 (vc-cvs-command nil 0 file "unedit") 430 (vc-cvs-command nil 0 file "unedit")
427 ;; Make the file read-only by switching off all w-bits 431 ;; Make the file read-only by switching off all w-bits
diff --git a/lisp/vc-git.el b/lisp/vc-git.el
index 9c8ebfc9993..ed13cb92081 100644
--- a/lisp/vc-git.el
+++ b/lisp/vc-git.el
@@ -55,7 +55,7 @@
55;; - dir-state (dir) OK 55;; - dir-state (dir) OK
56;; * working-revision (file) OK 56;; * working-revision (file) OK
57;; - latest-on-branch-p (file) NOT NEEDED 57;; - latest-on-branch-p (file) NOT NEEDED
58;; * checkout-model (file) OK 58;; * checkout-model (files) OK
59;; - workfile-unchanged-p (file) OK 59;; - workfile-unchanged-p (file) OK
60;; - mode-line-string (file) OK 60;; - mode-line-string (file) OK
61;; - prettify-state-info (file) OK 61;; - prettify-state-info (file) OK
@@ -118,8 +118,8 @@
118 118
119;;; BACKEND PROPERTIES 119;;; BACKEND PROPERTIES
120 120
121(defun vc-git-revision-granularity () 121(defun vc-git-revision-granularity () 'repository)
122 'repository) 122(defun vc-git-checkout-model (files) 'implicit)
123 123
124;;; STATE-QUERYING FUNCTIONS 124;;; STATE-QUERYING FUNCTIONS
125 125
@@ -195,8 +195,6 @@
195 (match-string 2 str) 195 (match-string 2 str)
196 str))) 196 str)))
197 197
198(defun vc-git-checkout-model (files) 'implicit)
199
200(defun vc-git-workfile-unchanged-p (file) 198(defun vc-git-workfile-unchanged-p (file)
201 (eq 'up-to-date (vc-git-state file))) 199 (eq 'up-to-date (vc-git-state file)))
202 200
diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el
index a4e08e021ee..85ea6e13b07 100644
--- a/lisp/vc-hg.el
+++ b/lisp/vc-hg.el
@@ -47,7 +47,7 @@
47;; - dir-state (dir) OK 47;; - dir-state (dir) OK
48;; * working-revision (file) OK 48;; * working-revision (file) OK
49;; - latest-on-branch-p (file) ?? 49;; - latest-on-branch-p (file) ??
50;; * checkout-model (file) OK 50;; * checkout-model (files) OK
51;; - workfile-unchanged-p (file) OK 51;; - workfile-unchanged-p (file) OK
52;; - mode-line-string (file) NOT NEEDED 52;; - mode-line-string (file) NOT NEEDED
53;; - prettify-state-info (file) OK 53;; - prettify-state-info (file) OK
@@ -131,8 +131,8 @@
131 131
132;;; Properties of the backend 132;;; Properties of the backend
133 133
134(defun vc-hg-revision-granularity () 134(defun vc-hg-revision-granularity () 'repository)
135 'repository) 135(defun vc-hg-checkout-model (files) 'implicit)
136 136
137;;; State querying functions 137;;; State querying functions
138 138
@@ -444,8 +444,6 @@ REV is the revision to check out into WORKFILE."
444 (vc-hg-command t 0 file "cat" "-r" rev) 444 (vc-hg-command t 0 file "cat" "-r" rev)
445 (vc-hg-command t 0 file "cat"))))) 445 (vc-hg-command t 0 file "cat")))))
446 446
447(defun vc-hg-checkout-model (files) 'implicit)
448
449;; Modelled after the similar function in vc-bzr.el 447;; Modelled after the similar function in vc-bzr.el
450(defun vc-hg-workfile-unchanged-p (file) 448(defun vc-hg-workfile-unchanged-p (file)
451 (eq 'up-to-date (vc-hg-state file))) 449 (eq 'up-to-date (vc-hg-state file)))
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index 0d63abc9b9e..a09d62604b6 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -746,7 +746,7 @@ Before doing that, check if there are any old backups and get rid of them."
746 (ignore-errors ;Be careful not to prevent saving the file. 746 (ignore-errors ;Be careful not to prevent saving the file.
747 (and (setq backend (vc-backend file)) 747 (and (setq backend (vc-backend file))
748 (vc-up-to-date-p file) 748 (vc-up-to-date-p file)
749 (eq (vc-checkout-model backend file) 'implicit) 749 (eq (vc-checkout-model backend (list file)) 'implicit)
750 (vc-call make-version-backups-p file) 750 (vc-call make-version-backups-p file)
751 (vc-make-version-backup file))))) 751 (vc-make-version-backup file)))))
752 752
@@ -768,7 +768,7 @@ Before doing that, check if there are any old backups and get rid of them."
768 (vc-file-setprop file 'vc-checkout-time nil)) 768 (vc-file-setprop file 'vc-checkout-time nil))
769 t) 769 t)
770 (vc-up-to-date-p file) 770 (vc-up-to-date-p file)
771 (eq (vc-checkout-model backend file) 'implicit) 771 (eq (vc-checkout-model backend (list file)) 'implicit)
772 (vc-file-setprop file 'vc-state 'edited) 772 (vc-file-setprop file 'vc-state 'edited)
773 (vc-mode-line file) 773 (vc-mode-line file)
774 (when (featurep 'vc) 774 (when (featurep 'vc)
diff --git a/lisp/vc-mcvs.el b/lisp/vc-mcvs.el
index df8a4ebad0b..ff40647ead4 100644
--- a/lisp/vc-mcvs.el
+++ b/lisp/vc-mcvs.el
@@ -111,8 +111,8 @@ This is only meaningful if you don't use the implicit checkout model
111 111
112;;; Properties of the backend 112;;; Properties of the backend
113 113
114(defun vc-mcvs-revision-granularity () 114(defalias 'vc-mcvs-revision-granularity 'vc-cvs-revision-granularity)
115 'file) 115(defalias 'vc-mcvs-checkout-model 'vc-cvs-checkout-model)
116 116
117;;; 117;;;
118;;; State-querying functions 118;;; State-querying functions
@@ -202,8 +202,6 @@ This is only meaningful if you don't use the implicit checkout model
202 (expand-file-name (vc-file-getprop file 'mcvs-inode) 202 (expand-file-name (vc-file-getprop file 'mcvs-inode)
203 (vc-file-getprop file 'mcvs-root)))) 203 (vc-file-getprop file 'mcvs-root))))
204 204
205(defalias 'vc-mcvs-checkout-model 'vc-cvs-checkout-model)
206
207;;; 205;;;
208;;; State-changing functions 206;;; State-changing functions
209;;; 207;;;
@@ -344,7 +342,7 @@ This is only possible if Meta-CVS is responsible for FILE's directory.")
344 (if (and (file-exists-p file) (not rev)) 342 (if (and (file-exists-p file) (not rev))
345 ;; If no revision was specified, just make the file writable 343 ;; If no revision was specified, just make the file writable
346 ;; if necessary (using `cvs-edit' if requested). 344 ;; if necessary (using `cvs-edit' if requested).
347 (and editable (not (eq (vc-mcvs-checkout-model file) 'implicit)) 345 (and editable (not (eq (vc-mcvs-checkout-model (list file)) 'implicit))
348 (if vc-mcvs-use-edit 346 (if vc-mcvs-use-edit
349 (vc-mcvs-command nil 0 file "edit") 347 (vc-mcvs-command nil 0 file "edit")
350 (set-file-modes file (logior (file-modes file) 128)) 348 (set-file-modes file (logior (file-modes file) 128))
@@ -367,7 +365,7 @@ This is only possible if Meta-CVS is responsible for FILE's directory.")
367(defun vc-mcvs-revert (file &optional contents-done) 365(defun vc-mcvs-revert (file &optional contents-done)
368 "Revert FILE to the working revision it was based on." 366 "Revert FILE to the working revision it was based on."
369 (vc-default-revert 'MCVS file contents-done) 367 (vc-default-revert 'MCVS file contents-done)
370 (unless (eq (vc-mcvs-checkout-model file) 'implicit) 368 (unless (eq (vc-mcvs-checkout-model (list file)) 'implicit)
371 (if vc-mcvs-use-edit 369 (if vc-mcvs-use-edit
372 (vc-mcvs-command nil 0 file "unedit") 370 (vc-mcvs-command nil 0 file "unedit")
373 ;; Make the file read-only by switching off all w-bits 371 ;; Make the file read-only by switching off all w-bits
diff --git a/lisp/vc-mtn.el b/lisp/vc-mtn.el
index 9f300a8f8eb..558889dcba6 100644
--- a/lisp/vc-mtn.el
+++ b/lisp/vc-mtn.el
@@ -49,7 +49,7 @@
49;;;###autoload (vc-mtn-registered file)))) 49;;;###autoload (vc-mtn-registered file))))
50 50
51(defun vc-mtn-revision-granularity () 'repository) 51(defun vc-mtn-revision-granularity () 'repository)
52(defun vc-mtn-checkout-model (file) 'implicit) 52(defun vc-mtn-checkout-model (files) 'implicit)
53 53
54(defun vc-mtn-root (file) 54(defun vc-mtn-root (file)
55 (setq file (if (file-directory-p file) 55 (setq file (if (file-directory-p file)
diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el
index d6157171985..84cd589d4b7 100644
--- a/lisp/vc-rcs.el
+++ b/lisp/vc-rcs.el
@@ -102,8 +102,19 @@ For a description of possible values, see `vc-check-master-templates'."
102 102
103;;; Properties of the backend 103;;; Properties of the backend
104 104
105(defun vc-rcs-revision-granularity () 105(defun vc-rcs-revision-granularity () 'file)
106 'file) 106
107(defun vc-rcs-checkout-model (files)
108 "RCS-specific version of `vc-checkout-model'."
109 (let ((file (if (consp files) (car files) files))
110 result)
111 (when vc-consult-headers
112 (vc-file-setprop file 'vc-checkout-model nil)
113 (vc-rcs-consult-headers file)
114 (setq result (vc-file-getprop file 'vc-checkout-model)))
115 (or result
116 (progn (vc-rcs-fetch-master-state file)
117 (vc-file-getprop file 'vc-checkout-model)))))
107 118
108;;; 119;;;
109;;; State-querying functions 120;;; State-querying functions
@@ -134,7 +145,7 @@ For a description of possible values, see `vc-check-master-templates'."
134 state 145 state
135 (if (vc-workfile-unchanged-p file) 146 (if (vc-workfile-unchanged-p file)
136 'up-to-date 147 'up-to-date
137 (if (eq (vc-rcs-checkout-model file) 'locking) 148 (if (eq (vc-rcs-checkout-model (list file)) 'locking)
138 'unlocked-changes 149 'unlocked-changes
139 'edited)))))) 150 'edited))))))
140 151
@@ -218,18 +229,6 @@ When VERSION is given, perform check for that version."
218 (vc-insert-file (vc-name file) "^desc") 229 (vc-insert-file (vc-name file) "^desc")
219 (vc-rcs-find-most-recent-rev (vc-branch-part version)))))) 230 (vc-rcs-find-most-recent-rev (vc-branch-part version))))))
220 231
221(defun vc-rcs-checkout-model (files)
222 "RCS-specific version of `vc-checkout-model'."
223 (let ((file (if (consp files) (car files) files))
224 result)
225 (when vc-consult-headers
226 (vc-file-setprop file 'vc-checkout-model nil)
227 (vc-rcs-consult-headers file)
228 (setq result (vc-file-getprop file 'vc-checkout-model)))
229 (or result
230 (progn (vc-rcs-fetch-master-state file)
231 (vc-file-getprop file 'vc-checkout-model)))))
232
233(defun vc-rcs-workfile-unchanged-p (file) 232(defun vc-rcs-workfile-unchanged-p (file)
234 "RCS-specific implementation of `vc-workfile-unchanged-p'." 233 "RCS-specific implementation of `vc-workfile-unchanged-p'."
235 ;; Try to use rcsdiff --brief. If rcsdiff does not understand that, 234 ;; Try to use rcsdiff --brief. If rcsdiff does not understand that,
@@ -320,7 +319,7 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
320 319
321(defun vc-rcs-receive-file (file rev) 320(defun vc-rcs-receive-file (file rev)
322 "Implementation of receive-file for RCS." 321 "Implementation of receive-file for RCS."
323 (let ((checkout-model (vc-rcs-checkout-model file))) 322 (let ((checkout-model (vc-rcs-checkout-model (list file))))
324 (vc-rcs-register file rev "") 323 (vc-rcs-register file rev "")
325 (when (eq checkout-model 'implicit) 324 (when (eq checkout-model 'implicit)
326 (vc-rcs-set-non-strict-locking file)) 325 (vc-rcs-set-non-strict-locking file))
@@ -431,7 +430,7 @@ whether to remove it."
431 nil 0 "co" (vc-name file) 430 nil 0 "co" (vc-name file)
432 ;; If locking is not strict, force to overwrite 431 ;; If locking is not strict, force to overwrite
433 ;; the writable workfile. 432 ;; the writable workfile.
434 (if (eq (vc-rcs-checkout-model file) 'implicit) "-f") 433 (if (eq (vc-rcs-checkout-model (list file)) 'implicit) "-f")
435 (if editable "-l") 434 (if editable "-l")
436 (if (stringp rev) 435 (if (stringp rev)
437 ;; a literal revision was specified 436 ;; a literal revision was specified
@@ -894,7 +893,7 @@ file."
894 ;; locked by the calling user 893 ;; locked by the calling user
895 ((and (stringp locking-user) 894 ((and (stringp locking-user)
896 (string= locking-user (vc-user-login-name file))) 895 (string= locking-user (vc-user-login-name file)))
897 (if (or (eq (vc-rcs-checkout-model file) 'locking) 896 (if (or (eq (vc-rcs-checkout-model (list file)) 'locking)
898 workfile-is-latest 897 workfile-is-latest
899 (vc-rcs-latest-on-branch-p file working-revision)) 898 (vc-rcs-latest-on-branch-p file working-revision))
900 'edited 899 'edited
diff --git a/lisp/vc-sccs.el b/lisp/vc-sccs.el
index 481d37ecc61..ce1b977e7f6 100644
--- a/lisp/vc-sccs.el
+++ b/lisp/vc-sccs.el
@@ -102,6 +102,7 @@ For a description of possible values, see `vc-check-master-templates'."
102;;; Properties of the backend 102;;; Properties of the backend
103 103
104(defun vc-sccs-revision-granularity () 'file) 104(defun vc-sccs-revision-granularity () 'file)
105(defun vc-sccs-checkout-model (files) 'locking)
105 106
106;;; 107;;;
107;;; State-querying functions 108;;; State-querying functions
@@ -177,10 +178,6 @@ For a description of possible values, see `vc-check-master-templates'."
177 (vc-insert-file (vc-name file) "^\001e\n\001[^s]") 178 (vc-insert-file (vc-name file) "^\001e\n\001[^s]")
178 (vc-parse-buffer "^\001d D \\([^ ]+\\)" 1))) 179 (vc-parse-buffer "^\001d D \\([^ ]+\\)" 1)))
179 180
180(defun vc-sccs-checkout-model (file)
181 "SCCS-specific version of `vc-checkout-model'."
182 'locking)
183
184(defun vc-sccs-workfile-unchanged-p (file) 181(defun vc-sccs-workfile-unchanged-p (file)
185 "SCCS-specific implementation of `vc-workfile-unchanged-p'." 182 "SCCS-specific implementation of `vc-workfile-unchanged-p'."
186 (zerop (apply 'vc-do-command nil 1 "vcdiff" (vc-name file) 183 (zerop (apply 'vc-do-command nil 1 "vcdiff" (vc-name file)
diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el
index 053c7fd1965..5ddedc364ae 100644
--- a/lisp/vc-svn.el
+++ b/lisp/vc-svn.el
@@ -91,8 +91,9 @@ If you want to force an empty list of arguments, use t."
91 91
92;;; Properties of the backend 92;;; Properties of the backend
93 93
94(defun vc-svn-revision-granularity () 94(defun vc-svn-revision-granularity () 'repository)
95 'repository) 95(defun vc-svn-checkout-model (files) 'implicit)
96
96;;; 97;;;
97;;; State-querying functions 98;;; State-querying functions
98;;; 99;;;
@@ -193,11 +194,6 @@ RESULT is a list of conses (FILE . STATE) for directory DIR."
193 (vc-svn-registered file) 194 (vc-svn-registered file)
194 (vc-file-getprop file 'vc-working-revision)) 195 (vc-file-getprop file 'vc-working-revision))
195 196
196(defun vc-svn-checkout-model (files)
197 "SVN-specific version of `vc-checkout-model'."
198 ;; It looks like Subversion has no equivalent of CVSREAD.
199 'implicit)
200
201;; vc-svn-mode-line-string doesn't exist because the default implementation 197;; vc-svn-mode-line-string doesn't exist because the default implementation
202;; works just fine. 198;; works just fine.
203 199
diff --git a/lisp/vc.el b/lisp/vc.el
index 426f7660eda..0434bde7cad 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1537,7 +1537,7 @@ Otherwise, throw an error."
1537 "Return non-nil if FILE can be edited." 1537 "Return non-nil if FILE can be edited."
1538 (let ((backend (vc-backend file))) 1538 (let ((backend (vc-backend file)))
1539 (and backend 1539 (and backend
1540 (or (eq (vc-checkout-model backend file) 'implicit) 1540 (or (eq (vc-checkout-model backend (list file)) 'implicit)
1541 (memq (vc-state file) '(edited needs-merge conflict)))))) 1541 (memq (vc-state file) '(edited needs-merge conflict))))))
1542 1542
1543(defun vc-revert-buffer-internal (&optional arg no-confirm) 1543(defun vc-revert-buffer-internal (&optional arg no-confirm)
@@ -1626,7 +1626,7 @@ merge in the changes into your working copy."
1626 (unless (vc-compatible-state (vc-state file) state) 1626 (unless (vc-compatible-state (vc-state file) state)
1627 (error "%s:%s clashes with %s:%s" 1627 (error "%s:%s clashes with %s:%s"
1628 file (vc-state file) (car files) state)) 1628 file (vc-state file) (car files) state))
1629 (unless (eq (vc-checkout-model backend file) model) 1629 (unless (eq (vc-checkout-model backend (list file)) model)
1630 (error "Fileset has mixed checkout models")))) 1630 (error "Fileset has mixed checkout models"))))
1631 ;; Check for buffers in the fileset not matching the on-disk contents. 1631 ;; Check for buffers in the fileset not matching the on-disk contents.
1632 (dolist (file files) 1632 (dolist (file files)
@@ -1967,7 +1967,7 @@ After check-out, runs the normal hook `vc-checkout-hook'."
1967 (let ((buf (get-file-buffer file))) 1967 (let ((buf (get-file-buffer file)))
1968 (when buf (with-current-buffer buf (toggle-read-only -1))))) 1968 (when buf (with-current-buffer buf (toggle-read-only -1)))))
1969 (signal (car err) (cdr err)))) 1969 (signal (car err) (cdr err))))
1970 `((vc-state . ,(if (or (eq (vc-checkout-model backend file) 'implicit) 1970 `((vc-state . ,(if (or (eq (vc-checkout-model backend (list file)) 'implicit)
1971 (not writable)) 1971 (not writable))
1972 (if (vc-call latest-on-branch-p file) 1972 (if (vc-call latest-on-branch-p file)
1973 'up-to-date 1973 'up-to-date
@@ -3857,7 +3857,7 @@ changes from the current branch are merged into the working file."
3857 (error "Please kill or save all modified buffers before updating.")) 3857 (error "Please kill or save all modified buffers before updating."))
3858 (if (vc-up-to-date-p file) 3858 (if (vc-up-to-date-p file)
3859 (vc-checkout file nil t) 3859 (vc-checkout file nil t)
3860 (if (eq (vc-checkout-model backend file) 'locking) 3860 (if (eq (vc-checkout-model backend (list file)) 'locking)
3861 (if (eq (vc-state file) 'edited) 3861 (if (eq (vc-state file) 'edited)
3862 (error "%s" 3862 (error "%s"
3863 (substitute-command-keys 3863 (substitute-command-keys
@@ -3984,7 +3984,7 @@ backend to NEW-BACKEND, and unregister FILE from the current backend.
3984 (vc-call-backend new-backend 'receive-file file rev)) 3984 (vc-call-backend new-backend 'receive-file file rev))
3985 (when modified-file 3985 (when modified-file
3986 (vc-switch-backend file new-backend) 3986 (vc-switch-backend file new-backend)
3987 (unless (eq (vc-checkout-model new-backend file) 'implicit) 3987 (unless (eq (vc-checkout-model new-backend (list file)) 'implicit)
3988 (vc-checkout file t nil)) 3988 (vc-checkout file t nil))
3989 (rename-file modified-file file 'ok-if-already-exists) 3989 (rename-file modified-file file 'ok-if-already-exists)
3990 (vc-file-setprop file 'vc-checkout-time nil))))) 3990 (vc-file-setprop file 'vc-checkout-time nil)))))