Mercurial > emacs
diff lisp/vc-sccs.el @ 31404:f2ab9420390f
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.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 05 Sep 2000 20:08:22 +0000 |
parents | b1e1a94dfc0a |
children | 1cfec89307a6 |
line wrap: on
line diff
--- a/lisp/vc-sccs.el Tue Sep 05 18:18:32 2000 +0000 +++ b/lisp/vc-sccs.el Tue Sep 05 20:08:22 2000 +0000 @@ -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 @@ :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 @@ (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 @@ ;; 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 @@ 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 @@ (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 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 @@ (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."))