Function: log-view-revert-revisions
log-view-revert-revisions is an interactive and byte-compiled function
defined in log-view.el.gz.
Signature
(log-view-revert-revisions DIRECTORY)
Documentation
Make a commit undoing the effects of the revision at point.
When revisions are marked, make such a commit for each of them. When called interactively, prompts for the target working tree in which to make new commits; the current working tree is the default choice. When called from Lisp, DIRECTORY is the root of the target working tree.
This is like log-view-revert-or-delete-revisions except that it only
ever makes new commits undoing the effects of revisions, instead of
considering VCS-specific alternative mechanisms to undo the effects of
revisions.
When reverting a single revision, prompts for editing the log message for the new commit. When reverting multiple revisions, never prompts to edit log messages.
See also vc-revert-revision.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/log-view.el.gz
;; These are left unbound by default. A user who doesn't like the DWIM
;; behavior of `log-view-revert-or-delete-revisions' can unbind that and
;; bind these two commands instead.
(defun log-view-revert-revisions (directory)
"Make a commit undoing the effects of the revision at point.
When revisions are marked, make such a commit for each of them.
When called interactively, prompts for the target working tree in which
to make new commits; the current working tree is the default choice.
When called from Lisp, DIRECTORY is the root of the target working tree.
This is like `log-view-revert-or-delete-revisions' except that it only
ever makes new commits undoing the effects of revisions, instead of
considering VCS-specific alternative mechanisms to undo the effects of
revisions.
When reverting a single revision, prompts for editing the log message
for the new commit.
When reverting multiple revisions, never prompts to edit log messages.
See also `vc-revert-revision'."
(interactive (list (vc--prompt-other-working-tree
(vc-responsible-backend default-directory)
"Revert in working tree"
'allow-empty)))
(log-view--pick-or-revert directory nil t nil 'never))