aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond2014-11-22 00:10:31 -0500
committerEric S. Raymond2014-11-22 00:10:31 -0500
commitaf46a2a43fab936a43d918fe0572eae51798a332 (patch)
tree0d4c34dbdc7210f57eb1a403c7198059b5347ec5
parent280eb43f6521d7803ecf581982f18be51bd350c5 (diff)
downloademacs-af46a2a43fab936a43d918fe0572eae51798a332.tar.gz
emacs-af46a2a43fab936a43d918fe0572eae51798a332.zip
Rename vc-name to vc-master-rename.
* vc-hooks.el, vc-rcs.el, vc-sccs.el: vc-name -> vc-master-name. This is preaparatory to isolating all the 'master' functions used only by the file-oriented back ends. With this done first, the substantive diffs will be easier to read.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/vc/vc-hooks.el8
-rw-r--r--lisp/vc/vc-rcs.el48
-rw-r--r--lisp/vc/vc-sccs.el44
4 files changed, 57 insertions, 50 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3e9dbfe4fc2..4ff16657e1e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12014-11-22 Eric S. Raymond <esr@snark>
2
3 * vc-hooks.el, vc-rcs.el, vc-sccs.el: vc-name -> vc-master-name.
4 This is preaparatory to isolating all the 'master' functions
5 used only by the file-oriented back ends. With this done first,
6 the substantive diffs will be easier to read.
7
12014-11-21 RĂ¼diger Sonderfeld <ruediger@c-plusplus.net> 82014-11-21 RĂ¼diger Sonderfeld <ruediger@c-plusplus.net>
2 9
3 * play/morse.el (nato-alphabet): Mark URL in docstring in a way 10 * play/morse.el (nato-alphabet): Mark URL in docstring in a way
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index 28fbaae9d1d..b62a64012e9 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -454,18 +454,18 @@ If the argument is a list, the files must all have the same back end."
454 "Return where the repository for the current directory is kept." 454 "Return where the repository for the current directory is kept."
455 (symbol-name (vc-backend file))) 455 (symbol-name (vc-backend file)))
456 456
457(defun vc-name (file) 457(defun vc-master-name (file)
458 "Return the master name of FILE. 458 "Return the master name of FILE.
459If the file is not registered, or the master name is not known, return nil." 459If the file is not registered, or the master name is not known, return nil."
460 ;; TODO: This should ultimately become obsolete, at least up here 460 ;; TODO: This should ultimately become obsolete, at least up here
461 ;; in vc-hooks. 461 ;; in vc-hooks.
462 (or (vc-file-getprop file 'vc-name) 462 (or (vc-file-getprop file 'vc-master-name)
463 ;; force computation of the property by calling 463 ;; force computation of the property by calling
464 ;; vc-BACKEND-registered explicitly 464 ;; vc-BACKEND-registered explicitly
465 (let ((backend (vc-backend file))) 465 (let ((backend (vc-backend file)))
466 (if (and backend 466 (if (and backend
467 (vc-call-backend backend 'registered file)) 467 (vc-call-backend backend 'registered file))
468 (vc-file-getprop file 'vc-name))))) 468 (vc-file-getprop file 'vc-master-name)))))
469 469
470(defun vc-checkout-model (backend files) 470(defun vc-checkout-model (backend files)
471 "Indicate how FILES are checked out. 471 "Indicate how FILES are checked out.
@@ -647,7 +647,7 @@ If FILE is not registered, this function always returns nil."
647 (put backend 'vc-templates-grabbed t)) 647 (put backend 'vc-templates-grabbed t))
648 (let ((result (vc-check-master-templates file (symbol-value sym)))) 648 (let ((result (vc-check-master-templates file (symbol-value sym))))
649 (if (stringp result) 649 (if (stringp result)
650 (vc-file-setprop file 'vc-name result) 650 (vc-file-setprop file 'vc-master-name result)
651 nil)))) ; Not registered 651 nil)))) ; Not registered
652 652
653(defun vc-possible-master (s dirname basename) 653(defun vc-possible-master (s dirname basename)
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el
index 2d713c9a70c..0b839a622e1 100644
--- a/lisp/vc/vc-rcs.el
+++ b/lisp/vc/vc-rcs.el
@@ -238,11 +238,11 @@ When VERSION is given, perform check for that version."
238 (if (vc-rcs-trunk-p version) 238 (if (vc-rcs-trunk-p version)
239 (progn 239 (progn
240 ;; Compare VERSION to the head version number. 240 ;; Compare VERSION to the head version number.
241 (vc-insert-file (vc-name file) "^[0-9]") 241 (vc-insert-file (vc-master-name file) "^[0-9]")
242 (vc-parse-buffer "^head[ \t\n]+\\([^;]+\\);" 1)) 242 (vc-parse-buffer "^head[ \t\n]+\\([^;]+\\);" 1))
243 ;; If we are not on the trunk, we need to examine the 243 ;; If we are not on the trunk, we need to examine the
244 ;; whole current branch. 244 ;; whole current branch.
245 (vc-insert-file (vc-name file) "^desc") 245 (vc-insert-file (vc-master-name file) "^desc")
246 (vc-rcs-find-most-recent-rev (vc-branch-part version)))))) 246 (vc-rcs-find-most-recent-rev (vc-branch-part version))))))
247 247
248(defun vc-rcs-workfile-unchanged-p (file) 248(defun vc-rcs-workfile-unchanged-p (file)
@@ -309,9 +309,9 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
309 (match-string 1)))) 309 (match-string 1))))
310 ;; if we couldn't find the master name, 310 ;; if we couldn't find the master name,
311 ;; run vc-rcs-registered to get it 311 ;; run vc-rcs-registered to get it
312 ;; (will be stored into the vc-name property) 312 ;; (will be stored into the vc-master-name property)
313 (vc-rcs-registered file) 313 (vc-rcs-registered file)
314 (vc-file-setprop file 'vc-name 314 (vc-file-setprop file 'vc-master-name
315 (if (file-name-absolute-p name) 315 (if (file-name-absolute-p name)
316 name 316 name
317 (expand-file-name 317 (expand-file-name
@@ -343,7 +343,7 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
343 "Unregister FILE from RCS. 343 "Unregister FILE from RCS.
344If this leaves the RCS subdirectory empty, ask the user 344If this leaves the RCS subdirectory empty, ask the user
345whether to remove it." 345whether to remove it."
346 (let* ((master (vc-name file)) 346 (let* ((master (vc-master-name file))
347 (dir (file-name-directory master)) 347 (dir (file-name-directory master))
348 (backup-info (find-backup-file-name master))) 348 (backup-info (find-backup-file-name master)))
349 (if (not backup-info) 349 (if (not backup-info)
@@ -379,7 +379,7 @@ whether to remove it."
379 (if old-version 379 (if old-version
380 (setq rev (vc-branch-part old-version)) 380 (setq rev (vc-branch-part old-version))
381 (error "can't find current branch")) 381 (error "can't find current branch"))
382 (apply #'vc-do-command "*vc*" 0 "ci" (vc-name file) 382 (apply #'vc-do-command "*vc*" 0 "ci" (vc-master-name file)
383 ;; if available, use the secure check-in option 383 ;; if available, use the secure check-in option
384 (and (vc-rcs-release-p "5.6.4") "-j") 384 (and (vc-rcs-release-p "5.6.4") "-j")
385 (concat (if vc-keep-workfiles "-u" "-r") rev) 385 (concat (if vc-keep-workfiles "-u" "-r") rev)
@@ -411,12 +411,12 @@ whether to remove it."
411 (if (not (vc-rcs-release-p "5.6.2")) 411 (if (not (vc-rcs-release-p "5.6.2"))
412 ;; exit status of 1 is also accepted. 412 ;; exit status of 1 is also accepted.
413 ;; It means that the lock was removed before. 413 ;; It means that the lock was removed before.
414 (vc-do-command "*vc*" 1 "rcs" (vc-name file) 414 (vc-do-command "*vc*" 1 "rcs" (vc-master-name file)
415 (concat "-u" old-version))))))))) 415 (concat "-u" old-version)))))))))
416 416
417(defun vc-rcs-find-revision (file rev buffer) 417(defun vc-rcs-find-revision (file rev buffer)
418 (apply #'vc-do-command 418 (apply #'vc-do-command
419 (or buffer "*vc*") 0 "co" (vc-name file) 419 (or buffer "*vc*") 0 "co" (vc-master-name file)
420 "-q" ;; suppress diagnostic output 420 "-q" ;; suppress diagnostic output
421 (concat "-p" rev) 421 (concat "-p" rev)
422 (vc-switches 'RCS 'checkout))) 422 (vc-switches 'RCS 'checkout)))
@@ -448,7 +448,7 @@ attempt the checkout for all registered files beneath it."
448 (vc-rcs-set-default-branch file nil)) 448 (vc-rcs-set-default-branch file nil))
449 ;; now do the checkout 449 ;; now do the checkout
450 (apply #'vc-do-command 450 (apply #'vc-do-command
451 "*vc*" 0 "co" (vc-name file) 451 "*vc*" 0 "co" (vc-master-name file)
452 ;; If locking is not strict, force to overwrite 452 ;; If locking is not strict, force to overwrite
453 ;; the writable workfile. 453 ;; the writable workfile.
454 (if (eq (vc-rcs-checkout-model (list file)) 'implicit) "-f") 454 (if (eq (vc-rcs-checkout-model (list file)) 'implicit) "-f")
@@ -501,7 +501,7 @@ expanded to all registered subfiles in them."
501 discard file))) 501 discard file)))
502 (error "Aborted")) 502 (error "Aborted"))
503 (message "Removing revision %s from %s." discard file) 503 (message "Removing revision %s from %s." discard file)
504 (vc-do-command "*vc*" 0 "rcs" (vc-name file) (concat "-o" discard)) 504 (vc-do-command "*vc*" 0 "rcs" (vc-master-name file) (concat "-o" discard))
505 ;; Check out the most recent remaining version. If it 505 ;; Check out the most recent remaining version. If it
506 ;; fails, because the whole branch got deleted, do a 506 ;; fails, because the whole branch got deleted, do a
507 ;; double-take and check out the version where the branch 507 ;; double-take and check out the version where the branch
@@ -509,7 +509,7 @@ expanded to all registered subfiles in them."
509 (while (not done) 509 (while (not done)
510 (condition-case err 510 (condition-case err
511 (progn 511 (progn
512 (vc-do-command "*vc*" 0 "co" (vc-name file) "-f" 512 (vc-do-command "*vc*" 0 "co" (vc-master-name file) "-f"
513 (concat "-u" previous)) 513 (concat "-u" previous))
514 (setq done t)) 514 (setq done t))
515 (error (set-buffer "*vc*") 515 (error (set-buffer "*vc*")
@@ -529,14 +529,14 @@ expanded to all registered subfiles in them."
529revert all registered files beneath it." 529revert all registered files beneath it."
530 (if (file-directory-p file) 530 (if (file-directory-p file)
531 (mapc 'vc-rcs-revert (vc-expand-dirs (list file))) 531 (mapc 'vc-rcs-revert (vc-expand-dirs (list file)))
532 (vc-do-command "*vc*" 0 "co" (vc-name file) "-f" 532 (vc-do-command "*vc*" 0 "co" (vc-master-name file) "-f"
533 (concat (if (eq (vc-state file) 'edited) "-u" "-r") 533 (concat (if (eq (vc-state file) 'edited) "-u" "-r")
534 (vc-working-revision file))))) 534 (vc-working-revision file)))))
535 535
536(defun vc-rcs-merge (file first-version &optional second-version) 536(defun vc-rcs-merge (file first-version &optional second-version)
537 "Merge changes into current working copy of FILE. 537 "Merge changes into current working copy of FILE.
538The changes are between FIRST-VERSION and SECOND-VERSION." 538The changes are between FIRST-VERSION and SECOND-VERSION."
539 (vc-do-command "*vc*" 1 "rcsmerge" (vc-name file) 539 (vc-do-command "*vc*" 1 "rcsmerge" (vc-master-name file)
540 "-kk" ; ignore keyword conflicts 540 "-kk" ; ignore keyword conflicts
541 (concat "-r" first-version) 541 (concat "-r" first-version)
542 (if second-version (concat "-r" second-version)))) 542 (if second-version (concat "-r" second-version))))
@@ -547,16 +547,16 @@ If FILE is a directory, steal the lock on all registered files beneath it.
547Needs RCS 5.6.2 or later for -M." 547Needs RCS 5.6.2 or later for -M."
548 (if (file-directory-p file) 548 (if (file-directory-p file)
549 (mapc 'vc-rcs-steal-lock (vc-expand-dirs (list file))) 549 (mapc 'vc-rcs-steal-lock (vc-expand-dirs (list file)))
550 (vc-do-command "*vc*" 0 "rcs" (vc-name file) "-M" (concat "-u" rev)) 550 (vc-do-command "*vc*" 0 "rcs" (vc-master-name file) "-M" (concat "-u" rev))
551 ;; Do a real checkout after stealing the lock, so that we see 551 ;; Do a real checkout after stealing the lock, so that we see
552 ;; expanded headers. 552 ;; expanded headers.
553 (vc-do-command "*vc*" 0 "co" (vc-name file) "-f" (concat "-l" rev)))) 553 (vc-do-command "*vc*" 0 "co" (vc-master-name file) "-f" (concat "-l" rev))))
554 554
555(defun vc-rcs-modify-change-comment (files rev comment) 555(defun vc-rcs-modify-change-comment (files rev comment)
556 "Modify the change comments change on FILES on a specified REV. If FILE is a 556 "Modify the change comments change on FILES on a specified REV. If FILE is a
557directory the operation is applied to all registered files beneath it." 557directory the operation is applied to all registered files beneath it."
558 (dolist (file (vc-expand-dirs files)) 558 (dolist (file (vc-expand-dirs files))
559 (vc-do-command "*vc*" 0 "rcs" (vc-name file) 559 (vc-do-command "*vc*" 0 "rcs" (vc-master-name file)
560 (concat "-m" rev ":" comment)))) 560 (concat "-m" rev ":" comment))))
561 561
562 562
@@ -582,7 +582,7 @@ Remaining arguments are ignored.
582If FILE is a directory the operation is applied to all registered 582If FILE is a directory the operation is applied to all registered
583files beneath it." 583files beneath it."
584 (vc-do-command (or buffer "*vc*") 0 "rlog" 584 (vc-do-command (or buffer "*vc*") 0 "rlog"
585 (mapcar 'vc-name (vc-expand-dirs files))) 585 (mapcar 'vc-master-name (vc-expand-dirs files)))
586 (with-current-buffer (or buffer "*vc*") 586 (with-current-buffer (or buffer "*vc*")
587 (vc-rcs-print-log-cleanup)) 587 (vc-rcs-print-log-cleanup))
588 (when limit 'limit-unsupported)) 588 (when limit 'limit-unsupported))
@@ -845,7 +845,7 @@ systime, or nil if there is none. Also, reposition point."
845 (vc-file-tree-walk 845 (vc-file-tree-walk
846 dir 846 dir
847 (lambda (f) 847 (lambda (f)
848 (vc-do-command "*vc*" 0 "rcs" (vc-name f) (concat "-n" name ":"))))))) 848 (vc-do-command "*vc*" 0 "rcs" (vc-master-name f) (concat "-n" name ":")))))))
849 849
850 850
851;;; 851;;;
@@ -978,7 +978,7 @@ Uses `rcs2log' which only works for RCS and CVS."
978 978
979(defun vc-rcs-rename-file (old new) 979(defun vc-rcs-rename-file (old new)
980 ;; Just move the master file (using vc-rcs-master-templates). 980 ;; Just move the master file (using vc-rcs-master-templates).
981 (vc-rename-master (vc-name old) new vc-rcs-master-templates)) 981 (vc-rename-master (vc-master-name old) new vc-rcs-master-templates))
982 982
983(defun vc-rcs-find-file-hook () 983(defun vc-rcs-find-file-hook ()
984 ;; If the file is locked by some other user, make 984 ;; If the file is locked by some other user, make
@@ -997,7 +997,7 @@ Uses `rcs2log' which only works for RCS and CVS."
997This likely means that FILE has been changed with respect 997This likely means that FILE has been changed with respect
998to its master version." 998to its master version."
999 (let ((file-time (nth 5 (file-attributes file))) 999 (let ((file-time (nth 5 (file-attributes file)))
1000 (master-time (nth 5 (file-attributes (vc-name file))))) 1000 (master-time (nth 5 (file-attributes (vc-master-name file)))))
1001 (or (> (nth 0 file-time) (nth 0 master-time)) 1001 (or (> (nth 0 file-time) (nth 0 master-time))
1002 (and (= (nth 0 file-time) (nth 0 master-time)) 1002 (and (= (nth 0 file-time) (nth 0 master-time))
1003 (> (nth 1 file-time) (nth 1 master-time)))))) 1003 (> (nth 1 file-time) (nth 1 master-time))))))
@@ -1024,10 +1024,10 @@ This function sets the properties `vc-working-revision' and
1024`vc-checkout-model' to their correct values, based on the master 1024`vc-checkout-model' to their correct values, based on the master
1025file." 1025file."
1026 (with-temp-buffer 1026 (with-temp-buffer
1027 (if (or (not (vc-insert-file (vc-name file) "^[0-9]")) 1027 (if (or (not (vc-insert-file (vc-master-name file) "^[0-9]"))
1028 (progn (goto-char (point-min)) 1028 (progn (goto-char (point-min))
1029 (not (looking-at "^head[ \t\n]+[^;]+;$")))) 1029 (not (looking-at "^head[ \t\n]+[^;]+;$"))))
1030 (error "File %s is not an RCS master file" (vc-name file))) 1030 (error "File %s is not an RCS master file" (vc-master-name file)))
1031 (let ((workfile-is-latest nil) 1031 (let ((workfile-is-latest nil)
1032 (default-branch (vc-parse-buffer "^branch[ \t\n]+\\([^;]*\\);" 1))) 1032 (default-branch (vc-parse-buffer "^branch[ \t\n]+\\([^;]*\\);" 1)))
1033 (vc-file-setprop file 'vc-rcs-default-branch default-branch) 1033 (vc-file-setprop file 'vc-rcs-default-branch default-branch)
@@ -1047,7 +1047,7 @@ file."
1047 default-branch) 1047 default-branch)
1048 (setq working-revision default-branch)) 1048 (setq working-revision default-branch))
1049 ;; else, search for the head of the default branch 1049 ;; else, search for the head of the default branch
1050 (t (vc-insert-file (vc-name file) "^desc") 1050 (t (vc-insert-file (vc-master-name file) "^desc")
1051 (setq working-revision 1051 (setq working-revision
1052 (vc-rcs-find-most-recent-rev default-branch)) 1052 (vc-rcs-find-most-recent-rev default-branch))
1053 (setq workfile-is-latest t))) 1053 (setq workfile-is-latest t)))
@@ -1238,7 +1238,7 @@ variable `vc-rcs-release' is set to the returned value."
1238 (set-file-modes file (logior (file-modes file) 128))) 1238 (set-file-modes file (logior (file-modes file) 128)))
1239 1239
1240(defun vc-rcs-set-default-branch (file branch) 1240(defun vc-rcs-set-default-branch (file branch)
1241 (vc-do-command "*vc*" 0 "rcs" (vc-name file) (concat "-b" branch)) 1241 (vc-do-command "*vc*" 0 "rcs" (vc-master-name file) (concat "-b" branch))
1242 (vc-file-setprop file 'vc-rcs-default-branch branch)) 1242 (vc-file-setprop file 'vc-rcs-default-branch branch))
1243 1243
1244(defun vc-rcs-parse (&optional buffer) 1244(defun vc-rcs-parse (&optional buffer)
diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el
index f1e437b1d9f..780efc48e96 100644
--- a/lisp/vc/vc-sccs.el
+++ b/lisp/vc/vc-sccs.el
@@ -181,7 +181,7 @@ For a description of possible values, see `vc-check-master-templates'."
181 ;; To find this number, search the entire delta table, 181 ;; To find this number, search the entire delta table,
182 ;; rather than just the first entry, because the 182 ;; rather than just the first entry, because the
183 ;; first entry might be a deleted ("R") revision. 183 ;; first entry might be a deleted ("R") revision.
184 (vc-insert-file (vc-name file) "^\001e\n\001[^s]") 184 (vc-insert-file (vc-master-name file) "^\001e\n\001[^s]")
185 (vc-parse-buffer "^\001d D \\([^ ]+\\)" 1))) 185 (vc-parse-buffer "^\001d D \\([^ ]+\\)" 1)))
186 186
187;; Cf vc-sccs-find-revision. 187;; Cf vc-sccs-find-revision.
@@ -189,7 +189,7 @@ For a description of possible values, see `vc-check-master-templates'."
189 "Write the SCCS version of input file FILE to output file OUTFILE. 189 "Write the SCCS version of input file FILE to output file OUTFILE.
190Optional string REV is a revision." 190Optional string REV is a revision."
191 (with-temp-buffer 191 (with-temp-buffer
192 (apply 'vc-sccs-do-command t 0 "get" (vc-name file) 192 (apply 'vc-sccs-do-command t 0 "get" (vc-master-name file)
193 (append '("-s" "-p" "-k") ; -k: no keyword expansion 193 (append '("-s" "-p" "-k") ; -k: no keyword expansion
194 (if rev (list (concat "-r" rev))))) 194 (if rev (list (concat "-r" rev)))))
195 (write-region nil nil outfile nil 'silent))) 195 (write-region nil nil outfile nil 'silent)))
@@ -233,10 +233,10 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
233 (let* ((dirname (or (file-name-directory file) "")) 233 (let* ((dirname (or (file-name-directory file) ""))
234 (basename (file-name-nondirectory file)) 234 (basename (file-name-nondirectory file))
235 (project-file (vc-sccs-search-project-dir dirname basename))) 235 (project-file (vc-sccs-search-project-dir dirname basename)))
236 (let ((vc-name 236 (let ((vc-master-name
237 (or project-file 237 (or project-file
238 (format (car vc-sccs-master-templates) dirname basename)))) 238 (format (car vc-sccs-master-templates) dirname basename))))
239 (apply 'vc-sccs-do-command nil 0 "admin" vc-name 239 (apply 'vc-sccs-do-command nil 0 "admin" vc-master-name
240 (and rev (not (string= rev "")) (concat "-r" rev)) 240 (and rev (not (string= rev "")) (concat "-r" rev))
241 "-fb" 241 "-fb"
242 (concat "-i" (file-relative-name file)) 242 (concat "-i" (file-relative-name file))
@@ -244,7 +244,7 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
244 (vc-switches 'SCCS 'register))) 244 (vc-switches 'SCCS 'register)))
245 (delete-file file) 245 (delete-file file)
246 (if vc-keep-workfiles 246 (if vc-keep-workfiles
247 (vc-sccs-do-command nil 0 "get" (vc-name file)))))) 247 (vc-sccs-do-command nil 0 "get" (vc-master-name file))))))
248 248
249(defun vc-sccs-responsible-p (file) 249(defun vc-sccs-responsible-p (file)
250 "Return non-nil if SCCS thinks it would be responsible for registering FILE." 250 "Return non-nil if SCCS thinks it would be responsible for registering FILE."
@@ -256,15 +256,15 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
256(defun vc-sccs-checkin (files comment) 256(defun vc-sccs-checkin (files comment)
257 "SCCS-specific version of `vc-backend-checkin'." 257 "SCCS-specific version of `vc-backend-checkin'."
258 (dolist (file (vc-expand-dirs files)) 258 (dolist (file (vc-expand-dirs files))
259 (apply 'vc-sccs-do-command nil 0 "delta" (vc-name file) 259 (apply 'vc-sccs-do-command nil 0 "delta" (vc-master-name file)
260 (concat "-y" comment) 260 (concat "-y" comment)
261 (vc-switches 'SCCS 'checkin)) 261 (vc-switches 'SCCS 'checkin))
262 (if vc-keep-workfiles 262 (if vc-keep-workfiles
263 (vc-sccs-do-command nil 0 "get" (vc-name file))))) 263 (vc-sccs-do-command nil 0 "get" (vc-master-name file)))))
264 264
265(defun vc-sccs-find-revision (file rev buffer) 265(defun vc-sccs-find-revision (file rev buffer)
266 (apply 'vc-sccs-do-command 266 (apply 'vc-sccs-do-command
267 buffer 0 "get" (vc-name file) 267 buffer 0 "get" (vc-master-name file)
268 "-s" ;; suppress diagnostic output 268 "-s" ;; suppress diagnostic output
269 "-p" 269 "-p"
270 (and rev 270 (and rev
@@ -298,7 +298,7 @@ locked. REV is the revision to check out."
298 (and rev (or (string= rev "") 298 (and rev (or (string= rev "")
299 (not (stringp rev))) 299 (not (stringp rev)))
300 (setq rev nil)) 300 (setq rev nil))
301 (apply 'vc-sccs-do-command nil 0 "get" (vc-name file) 301 (apply 'vc-sccs-do-command nil 0 "get" (vc-master-name file)
302 "-e" 302 "-e"
303 (and rev (concat "-r" (vc-sccs-lookup-triple file rev))) 303 (and rev (concat "-r" (vc-sccs-lookup-triple file rev)))
304 switches)))) 304 switches))))
@@ -317,16 +317,16 @@ are expanded to all version-controlled subfiles."
317 (error "Aborted")) 317 (error "Aborted"))
318 (message "Removing revision %s from %s..." discard file) 318 (message "Removing revision %s from %s..." discard file)
319 (vc-sccs-do-command nil 0 "rmdel" 319 (vc-sccs-do-command nil 0 "rmdel"
320 (vc-name file) (concat "-r" discard)) 320 (vc-master-name file) (concat "-r" discard))
321 (vc-sccs-do-command nil 0 "get" (vc-name file) nil)))) 321 (vc-sccs-do-command nil 0 "get" (vc-master-name file) nil))))
322 322
323(defun vc-sccs-revert (file &optional _contents-done) 323(defun vc-sccs-revert (file &optional _contents-done)
324 "Revert FILE to the version it was based on. If FILE is a directory, 324 "Revert FILE to the version it was based on. If FILE is a directory,
325revert all subfiles." 325revert all subfiles."
326 (if (file-directory-p file) 326 (if (file-directory-p file)
327 (mapc 'vc-sccs-revert (vc-expand-dirs (list file))) 327 (mapc 'vc-sccs-revert (vc-expand-dirs (list file)))
328 (vc-sccs-do-command nil 0 "unget" (vc-name file)) 328 (vc-sccs-do-command nil 0 "unget" (vc-master-name file))
329 (vc-sccs-do-command nil 0 "get" (vc-name file)) 329 (vc-sccs-do-command nil 0 "get" (vc-master-name file))
330 ;; Checking out explicit revisions is not supported under SCCS, yet. 330 ;; Checking out explicit revisions is not supported under SCCS, yet.
331 ;; We always "revert" to the latest revision; therefore 331 ;; We always "revert" to the latest revision; therefore
332 ;; vc-working-revision is cleared here so that it gets recomputed. 332 ;; vc-working-revision is cleared here so that it gets recomputed.
@@ -337,14 +337,14 @@ revert all subfiles."
337 (if (file-directory-p file) 337 (if (file-directory-p file)
338 (mapc 'vc-sccs-steal-lock (vc-expand-dirs (list file))) 338 (mapc 'vc-sccs-steal-lock (vc-expand-dirs (list file)))
339 (vc-sccs-do-command nil 0 "unget" 339 (vc-sccs-do-command nil 0 "unget"
340 (vc-name file) "-n" (if rev (concat "-r" rev))) 340 (vc-master-name file) "-n" (if rev (concat "-r" rev)))
341 (vc-sccs-do-command nil 0 "get" 341 (vc-sccs-do-command nil 0 "get"
342 (vc-name file) "-g" (if rev (concat "-r" rev))))) 342 (vc-master-name file) "-g" (if rev (concat "-r" rev)))))
343 343
344(defun vc-sccs-modify-change-comment (files rev comment) 344(defun vc-sccs-modify-change-comment (files rev comment)
345 "Modify (actually, append to) the change comments for FILES on a specified REV." 345 "Modify (actually, append to) the change comments for FILES on a specified REV."
346 (dolist (file (vc-expand-dirs files)) 346 (dolist (file (vc-expand-dirs files))
347 (vc-sccs-do-command nil 0 "cdc" (vc-name file) 347 (vc-sccs-do-command nil 0 "cdc" (vc-master-name file)
348 (concat "-y" comment) (concat "-r" rev)))) 348 (concat "-y" comment) (concat "-r" rev))))
349 349
350 350
@@ -356,7 +356,7 @@ revert all subfiles."
356 "Print commit log associated with FILES into specified BUFFER. 356 "Print commit log associated with FILES into specified BUFFER.
357Remaining arguments are ignored." 357Remaining arguments are ignored."
358 (setq files (vc-expand-dirs files)) 358 (setq files (vc-expand-dirs files))
359 (vc-sccs-do-command buffer 0 "prs" (mapcar 'vc-name files)) 359 (vc-sccs-do-command buffer 0 "prs" (mapcar 'vc-master-name files))
360 (when limit 'limit-unsupported)) 360 (when limit 'limit-unsupported))
361 361
362(autoload 'vc-setup-buffer "vc-dispatcher") 362(autoload 'vc-setup-buffer "vc-dispatcher")
@@ -475,12 +475,12 @@ Remaining arguments are ignored."
475 475
476(defun vc-sccs-rename-file (old new) 476(defun vc-sccs-rename-file (old new)
477 ;; Move the master file (using vc-rcs-master-templates). 477 ;; Move the master file (using vc-rcs-master-templates).
478 (vc-rename-master (vc-name old) new vc-sccs-master-templates) 478 (vc-rename-master (vc-master-name old) new vc-sccs-master-templates)
479 ;; Update the tag file. 479 ;; Update the tag file.
480 (with-current-buffer 480 (with-current-buffer
481 (find-file-noselect 481 (find-file-noselect
482 (expand-file-name vc-sccs-name-assoc-file 482 (expand-file-name vc-sccs-name-assoc-file
483 (file-name-directory (vc-name old)))) 483 (file-name-directory (vc-master-name old))))
484 (goto-char (point-min)) 484 (goto-char (point-min))
485 ;; (replace-regexp (concat ":" (regexp-quote old) "$") (concat ":" new)) 485 ;; (replace-regexp (concat ":" (regexp-quote old) "$") (concat ":" new))
486 (while (re-search-forward (concat ":" (regexp-quote old) "$") nil t) 486 (while (re-search-forward (concat ":" (regexp-quote old) "$") nil t)
@@ -524,7 +524,7 @@ find any project directory."
524 524
525(defun vc-sccs-lock-file (file) 525(defun vc-sccs-lock-file (file)
526 "Generate lock file name corresponding to FILE." 526 "Generate lock file name corresponding to FILE."
527 (let ((master (vc-name file))) 527 (let ((master (vc-master-name file)))
528 (and 528 (and
529 master 529 master
530 (string-match "\\(.*/\\)\\(s\\.\\)\\(.*\\)" master) 530 (string-match "\\(.*/\\)\\(s\\.\\)\\(.*\\)" master)
@@ -546,7 +546,7 @@ The result is a list of the form ((REVISION . USER) (REVISION . USER) ...)."
546 (with-current-buffer 546 (with-current-buffer
547 (find-file-noselect 547 (find-file-noselect
548 (expand-file-name vc-sccs-name-assoc-file 548 (expand-file-name vc-sccs-name-assoc-file
549 (file-name-directory (vc-name file)))) 549 (file-name-directory (vc-master-name file))))
550 (goto-char (point-max)) 550 (goto-char (point-max))
551 (insert name "\t:\t" file "\t" rev "\n") 551 (insert name "\t:\t" file "\t" rev "\n")
552 (basic-save-buffer) 552 (basic-save-buffer)
@@ -562,7 +562,7 @@ If NAME is nil or a revision number string it's just passed through."
562 (with-temp-buffer 562 (with-temp-buffer
563 (vc-insert-file 563 (vc-insert-file
564 (expand-file-name vc-sccs-name-assoc-file 564 (expand-file-name vc-sccs-name-assoc-file
565 (file-name-directory (vc-name file)))) 565 (file-name-directory (vc-master-name file))))
566 (vc-parse-buffer (concat name "\t:\t" file "\t\\(.+\\)") 1)))) 566 (vc-parse-buffer (concat name "\t:\t" file "\t\\(.+\\)") 1))))
567 567
568(provide 'vc-sccs) 568(provide 'vc-sccs)