Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
045e1aa5
Commit
045e1aa5
authored
Oct 03, 2000
by
André Spiegel
Browse files
(vc-revert-file): New function.
(vc-revert-buffer): Delegate some of the work to it.
parent
1be14568
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
lisp/vc.el
lisp/vc.el
+14
-6
No files found.
lisp/vc.el
View file @
045e1aa5
...
...
@@ -5,6 +5,8 @@
;; Author: FSF (see below for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
;; $Id$
;; This file is part of GNU Emacs.
;; GNU Emacs is free software; you can redistribute it and/or modify
...
...
@@ -2177,14 +2179,20 @@ changes found in the master file; use \\[universal-argument] \\[vc-next-action]
(
set-buffer
obuf
)
;; Do the reverting
(
message
"Reverting %s..."
file
)
(with-vc-properties
file
(vc-call revert file)
`((vc-state up-to-date)
(vc-checkout-time ,(nth 5 (file-attributes file)))))
(vc-resynch-buffer file t t)
(
vc-revert-file
file
)
(
message
"Reverting %s...done"
file
)))
(
defun
vc-revert-file
(
file
)
"Revert FILE back to the version it was based on."
;; TODO: With local version caching, this function will get the
;; base version locally and not from the server.
(
with-vc-properties
file
(
vc-call
revert
file
)
`
((
vc-state
up-to-date
)
(
vc-checkout-time
,
(
nth
5
(
file-attributes
file
)))))
(
vc-resynch-buffer
file
t
t
))
;;;###autoload
(
defun
vc-cancel-version
(
norevert
)
"Get rid of most recently checked in version of this file.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment