How can I do a svn revert <file>
from Emacs Version Control?
I've read many parts of the manual, but can't find it.
I would like to do it over a file after opening it with vc-directory
C-x v d, but any other way would be helpful.
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityHow can I do a svn revert <file>
from Emacs Version Control?
I've read many parts of the manual, but can't find it.
I would like to do it over a file after opening it with vc-directory
C-x v d, but any other way would be helpful.
You can use M-x vc-revert
.
or use this function:
(defun revert-svn()
(interactive)
(vc-revert)
(revert-buffer t t))
(global-set-key (kbd "C-x v u") 'revert-svn)
vc-revert
as C-x v u
, and vc-revert-buffer
with no keybinding. Now, I'm not sure what does the vc-revert-buffer
do...
Oct 8, 2015 at 11:42
vc-revert-buffer
is obsolete since 23.1 and the fileset can be just a file.
Oct 8, 2015 at 13:25
As @djangoliv has mentioned, M-x vc-revert
works (C-x v u on Emacs 24.5.1).
When doing it over a file on a *vc-dir*
buffer (opened by vc-directory
command), another buffer with the differences is opened and a prompt message appears in the mini-buffer to confirm it.
Just like this image: