;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
-;; $Id: vc-sccs.el,v 1.4 2000/09/09 00:48:40 monnier Exp $
+;; $Id: vc-sccs.el,v 1.5 2000/11/16 18:14:41 spiegel Exp $
;; This file is part of GNU Emacs.
(vc-insert-file (vc-name file) "^\001e")
(vc-parse-buffer "^\001d D \\([^ ]+\\)" 1)))
-(defun vc-sccs-latest-on-branch-p (file)
- "Return t iff the current workfile version of FILE is latest on its branch."
- ;; Always return t; we do not support previous versions in the workfile
- ;; under SCCS.
- t)
-
(defun vc-sccs-checkout-model (file)
"SCCS-specific version of `vc-checkout-model'."
'locking)
(if vc-keep-workfiles
(vc-do-command nil 0 "get" (vc-name file)))))
-(defun vc-sccs-checkout (file &optional writable rev workfile)
+(defun vc-sccs-checkout (file &optional editable rev workfile)
"Retrieve a copy of a saved version of SCCS controlled FILE into a WORKFILE.
-WRITABLE non-nil means that the file should be writable. REV is the
-revision to check out into WORKFILE."
+EDITABLE non-nil means that the file should be writable and
+locked. REV is the revision to check out into WORKFILE."
(let ((filename (or workfile file))
(file-buffer (get-file-buffer file))
switches)
;; least common denominator approach and use the -p option
;; ala RCS.
(let ((vc-modes (logior (file-modes (vc-name file))
- (if writable 128 0)))
+ (if editable 128 0)))
(failed t))
(unwind-protect
(progn
(apply 'vc-do-command
(current-buffer) 0 "get" (vc-name file)
"-s" ;; suppress diagnostic output
- (if writable "-e")
+ (if editable "-e")
"-p"
(and rev
(concat "-r"
switches)))
(set-file-modes filename
(logior (file-modes (vc-name file))
- (if writable 128 0)))
+ (if editable 128 0)))
(setq failed nil))
(and failed (file-exists-p filename)
(delete-file filename))))
(apply 'vc-do-command nil 0 "get" (vc-name file)
- (if writable "-e")
+ (if editable "-e")
(and rev (concat "-r" (vc-sccs-lookup-triple file rev)))
switches)))))
(message "Checking out %s...done" filename)))
;; vc-workfile-version is cleared here so that it gets recomputed.
(vc-file-setprop file 'vc-workfile-version nil))
-(defun vc-sccs-cancel-version (file writable)
+(defun vc-sccs-cancel-version (file editable)
"Undo the most recent checkin of FILE.
-WRITABLE non-nil means previous version should be locked."
+EDITABLE non-nil means previous version should be locked."
(vc-do-command nil 0 "rmdel"
(vc-name file)
(concat "-r" (vc-workfile-version file)))
(vc-do-command nil 0 "get"
(vc-name file)
- (if writable "-e")))
+ (if editable "-e")))
(defun vc-sccs-steal-lock (file &optional rev)
"Steal the lock on the current workfile for FILE and revision REV."