Function: cvs-mode-undo
cvs-mode-undo is an interactive and byte-compiled function defined in
pcvs.el.gz.
Signature
(cvs-mode-undo FLAGS)
Documentation
Undo local changes to all marked files.
The file is removed and cvs update FILE is run.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/pcvs.el.gz
(defun-cvs-mode (cvs-mode-undo . SIMPLE) (flags)
"Undo local changes to all marked files.
The file is removed and `cvs update FILE' is run."
;;"With prefix argument, prompt for cvs FLAGS."
(interactive (list nil));; (cvs-flags-query 'cvs-undo-flags "undo flags")
(if current-prefix-arg (call-interactively 'cvs-mode-revert-to-rev)
(let* ((fis (cvs-do-removal 'undo "update" 'all))
(removedp (lambda (fi)
(or (eq (cvs-fileinfo->type fi) 'REMOVED)
(and (eq (cvs-fileinfo->type fi) 'CONFLICT)
(eq (cvs-fileinfo->subtype fi) 'REMOVED)))))
(fis-split (cvs-partition removedp fis))
(fis-removed (car fis-split))
(fis-other (cdr fis-split)))
(if (null fis-other)
(when fis-removed (cvs-mode-run "add" nil fis-removed))
(cvs-mode-run "update" flags fis-other
:postproc
(when fis-removed
(let ((buf (current-buffer)))
(lambda ()
(with-current-buffer buf
(cvs-mode-run "add" nil fis-removed))))))))))