Function: vc-revert-files

vc-revert-files is a byte-compiled function defined in vc.el.gz.

Signature

(vc-revert-files BACKEND FILES)

Documentation

Revert each of FILES to the repository working version it was based on.

For entries in FILES that are directories, revert all files inside them.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc.el.gz
(defun vc-revert-files (backend files)
  "Revert each of FILES to the repository working version it was based on.
For entries in FILES that are directories, revert all files inside them."
  (when files
    (message "Reverting %s..." (vc-delistify files))
    (if (not (vc-find-backend-function backend 'revert-files))
        (mapc #'vc-revert-file files)
      (with-vc-properties files
                          (vc-call-backend backend 'revert-files files)
                          '((vc-state . up-to-date)))
      (dolist (file files)
        (vc-file-setprop file 'vc-checkout-time
                         (file-attribute-modification-time
                          (file-attributes file)))
        (vc-resynch-buffer file t t)))
    (message "Reverting %s...done" (vc-delistify files))))