Function: vc-delete-revisions-from-end
vc-delete-revisions-from-end is an autoloaded, interactive and
byte-compiled function defined in vc.el.gz.
Signature
(vc-delete-revisions-from-end REV &optional DISCARD BACKEND)
Documentation
Delete revisions newer than REV.
REV must be on the current branch. The newer revisions are deleted from the revision history and the changes made by those revisions to files in the working tree are undone. When called interactively, prompts for REV. If the are uncommitted changes, prompts to discard them. With a prefix argument (when called from Lisp, with optional argument DISCARD non-nil), discard any uncommitted changes without prompting. BACKEND is the VC backend.
To delete revisions from the revision history without undoing the
changes in the working tree, see vc-uncommit-revisions-from-end.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc.el.gz
;;;###autoload
(defun vc-delete-revisions-from-end (rev &optional discard backend)
"Delete revisions newer than REV.
REV must be on the current branch. The newer revisions are deleted from
the revision history and the changes made by those revisions to files in
the working tree are undone.
When called interactively, prompts for REV.
If the are uncommitted changes, prompts to discard them.
With a prefix argument (when called from Lisp, with optional argument
DISCARD non-nil), discard any uncommitted changes without prompting.
BACKEND is the VC backend.
To delete revisions from the revision history without undoing the
changes in the working tree, see `vc-uncommit-revisions-from-end'."
(interactive (list
(vc-read-revision "Delete revisions newer than revision: ")
current-prefix-arg))
(vc--remove-revisions-from-end rev (if discard 'discard t) nil backend))