VC: Allow `vc-default-revert' (and CVS) to revert a missing file
* lisp/vc/vc.el (vc-default-revert): Fix reverting a missing file case by not trying to create a backup through `copy-file'. Notably impacts CVS, where `vc-cvs-revert' calls `vc-default-revert'.
This commit is contained in:
parent
648f58294b
commit
9a2c723f1b
1 changed files with 2 additions and 1 deletions
|
@ -3604,7 +3604,8 @@ to provide the `find-revision' operation instead."
|
|||
(file-buffer (or (get-file-buffer file) (current-buffer))))
|
||||
(message "Checking out %s..." file)
|
||||
(let ((failed t)
|
||||
(backup-name (car (find-backup-file-name file))))
|
||||
(backup-name (when (file-exists-p file)
|
||||
(car (find-backup-file-name file)))))
|
||||
(when backup-name
|
||||
(copy-file file backup-name 'ok-if-already-exists 'keep-date)
|
||||
(unless (file-writable-p file)
|
||||
|
|
Loading…
Add table
Reference in a new issue