summaryrefslogtreecommitdiff
path: root/lisp/vc-sccs.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2000-09-05 20:08:22 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2000-09-05 20:08:22 +0000
commit52dc7d41074e4b46bb5f7101fe1cd447a48f7eff (patch)
tree58bd45d26cfd516dd41e02d600173754306a1675 /lisp/vc-sccs.el
parentfb4361f6a34221df84d9d1e8440da73c06403d71 (diff)
downloademacs-52dc7d41074e4b46bb5f7101fe1cd447a48f7eff.tar.gz
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
* vc.el: (toplevel): Don't require `dired' at run-time. (vc-dired-resynch-file): Remove autoload cookie. 2000-09-05 Andre Spiegel <spiegel@gnu.org> * vc.el: Made several backend functions optional. (vc-default-responsible-p): New function. (vc-merge): Use RET for first version to trigger merge-news, not prefix arg. (vc-annotate): Handle backends that do not support annotation. (vc-default-merge-news): Removed. The existence of a merge-news implementation is now checked on caller sites. * vc-hooks.el (vc-default-mode-line-string): Removed CVS special case. * vc-cvs.el (vc-cvs-mode-line-string): New function, handles the special case that has been removed from the default in vc-hooks.el. 2000-09-05 Stefan Monnier <monnier@cs.yale.edu> * vc.el (vc-log-edit): Properly handle the case where FILE is nil. 2000-09-05 Andre Spiegel <spiegel@gnu.org> * vc-hooks.el: Require vc during compilation. (vc-file-setprop): Use `vc-touched-properties' if bound by the new macro `with-vc-properties' in vc.el. (vc-file-getprop): Doc fix. (vc-after-save): Call `vc-dired-resynch-file' only if vc is loaded. * vc.el: Require dired-aux during compilation. (vc-name-assoc-file): Moved to vc-sccs.el. (with-vc-properties): New macro. (vc-checkin, vc-checkout, vc-revert, vc-cancel-version, vc-finish-steal): Use it. (vc-cancel-version): Moved RCS-specific code to vc-rcs.el. The call to the backend-specific function is now supposed to do the checkout, too. (vc-log-edit): Handle FILE being nil and added a FIXME for log-edit. * vc-cvs.el (vc-cvs-checkin, vc-cvs-checkout): Don't bother to set file properties; that gets done in the generic code now. * vc-rcs.el (vc-rcs-uncheck): Renamed to `vc-rcs-cancel-version'. Changed parameter list, added code from vc.el that does the checkout, possibly with a double-take. * vc-sccs.el (vc-sccs-name-assoc-file): Moved here from vc.el. (vc-sccs-add-triple, vc-sccs-rename-file, vc-sccs-lookup-triple): Use the above under the new name. (vc-sccs-uncheck): Renamed to `vc-sccs-cancel-version'. Changed parameter list, added checkout command. (vc-sccs-checkin, vc-sccs-checkout): Don't bother to set file properties; that gets done in the generic code now. 2000-09-05 Stefan Monnier <monnier@cs.yale.edu> * vc.el: Docstring fixes (courtesy of checkdoc). 2000-09-05 Stefan Monnier <monnier@cs.yale.edu> * vc.el (vc-checkout-writable-buffer-hook) (vc-checkout-writable-buffer): Remove. (vc-start-entry): Always call vc-log-edit, never vc-log-mode. (vc-log-mode): Make it into a clean derived major mode. (vc-log-edit): Mark buffer unmodified (as vc-log-mode did) and use vc-log-mode if log-edit is not available. (vc-dired-mode-map): Don't set-keymap-parent yet. (vc-dired-mode): Do set-keymap-parent here. (vc-dired-buffers-for-dir): Nop if dired is not loaded.
Diffstat (limited to 'lisp/vc-sccs.el')
-rw-r--r--lisp/vc-sccs.el34
1 files changed, 17 insertions, 17 deletions
diff --git a/lisp/vc-sccs.el b/lisp/vc-sccs.el
index 9edd1f25267..79936a08c6e 100644
--- a/lisp/vc-sccs.el
+++ b/lisp/vc-sccs.el
@@ -5,7 +5,7 @@
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
-;; $Id: vc-sccs.el,v 1.35 2000/08/13 11:52:19 spiegel Exp $
+;; $Id: vc-sccs.el,v 1.1 2000/09/04 19:48:23 gerd Exp $
;; This file is part of GNU Emacs.
@@ -57,6 +57,8 @@ For a description of possible values, see `vc-check-master-templates'."
:version "20.5"
:group 'vc)
+(defconst vc-sccs-name-assoc-file "VC-names")
+
;;;###autoload
(progn (defun vc-sccs-registered (f) (vc-default-registered 'SCCS f)))
@@ -172,7 +174,7 @@ The result is a list of the form ((VERSION . USER) (VERSION . USER) ...)."
(defun vc-sccs-add-triple (name file rev)
(with-current-buffer
(find-file-noselect
- (expand-file-name vc-name-assoc-file
+ (expand-file-name vc-sccs-name-assoc-file
(file-name-directory (vc-name file))))
(goto-char (point-max))
(insert name "\t:\t" file "\t" rev "\n")
@@ -185,7 +187,7 @@ The result is a list of the form ((VERSION . USER) (VERSION . USER) ...)."
;; Update the snapshot file.
(with-current-buffer
(find-file-noselect
- (expand-file-name vc-name-assoc-file
+ (expand-file-name vc-sccs-name-assoc-file
(file-name-directory (vc-name old))))
(goto-char (point-min))
;; (replace-regexp (concat ":" (regexp-quote old) "$") (concat ":" new))
@@ -203,7 +205,7 @@ If NAME is nil or a version number string it's just passed through."
name
(with-temp-buffer
(vc-insert-file
- (expand-file-name vc-name-assoc-file
+ (expand-file-name vc-sccs-name-assoc-file
(file-name-directory (vc-name file))))
(vc-parse-buffer (concat name "\t:\t" file "\t\\(.+\\)") 1))))
@@ -221,9 +223,15 @@ If NAME is nil or a version number string it's just passed through."
(vc-do-command nil 0 "unget" (vc-name file) "-n" (if rev (concat "-r" rev)))
(vc-do-command nil 0 "get" (vc-name file) "-g" (if rev (concat "-r" rev))))
-(defun vc-sccs-uncheck (file target)
- "Undo the checkin of FILE's revision TARGET."
- (vc-do-command nil 0 "rmdel" (vc-name file) (concat "-r" target)))
+(defun vc-sccs-cancel-version (file writable)
+ "Undo the most recent checkin of FILE.
+WRITABLE 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")))
(defun vc-sccs-revert (file)
"Revert FILE to the version it was based on."
@@ -243,8 +251,6 @@ If NAME is nil or a version number string it's just passed through."
(if rev (concat "-r" rev))
(concat "-y" comment)
switches)
- (vc-file-setprop file 'vc-state 'up-to-date)
- (vc-file-setprop file 'vc-workfile-version nil)
(if vc-keep-workfiles
(vc-do-command nil 0 "get" (vc-name file)))))
@@ -371,14 +377,8 @@ REV is the revision to check out into WORKFILE."
(apply 'vc-do-command nil 0 "get" (vc-name file)
(if writable "-e")
(and rev (concat "-r" (vc-sccs-lookup-triple file rev)))
- switches)
- (vc-file-setprop file 'vc-workfile-version nil))
- (unless workfile
- (if writable
- (vc-file-setprop file 'vc-state 'edited))
- (vc-file-setprop file
- 'vc-checkout-time (nth 5 (file-attributes file))))
- (message "Checking out %s...done" filename))))))
+ switches)))))
+ (message "Checking out %s...done" filename)))
(defun vc-sccs-update-changelog (files)
(error "Sorry, generating ChangeLog entries is not implemented for SCCS."))