mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
vc-next-action: Offer to delete missing files
* lisp/vc/vc.el (vc-next-action): Call vc-delete-file on a set of missing files, to move them to the 'removed' state, instead of just erroring out.
This commit is contained in:
parent
ff8c0648fb
commit
9b4fec7a97
1 changed files with 4 additions and 5 deletions
|
|
@ -1426,9 +1426,8 @@ To apply VC operations to multiple files, the files must be in similar VC states
|
|||
(defun vc-next-action (verbose)
|
||||
"Do the next logical version control operation on the current fileset.
|
||||
This requires that all files in the current VC fileset be in the
|
||||
same state. If they are not, signal an error. Also signal an error if
|
||||
files in the fileset are missing (removed, but tracked by version control),
|
||||
or are ignored by the version control system.
|
||||
sufficiently similar states. If they are not, signal an error.
|
||||
Also signal an error if files in the fileset are ignored by the VCS.
|
||||
|
||||
For modern merging-based version control systems:
|
||||
If every file in the fileset is not registered for version
|
||||
|
|
@ -1489,8 +1488,6 @@ from which to check out the file(s)."
|
|||
|
||||
;; Do the right thing.
|
||||
(cond
|
||||
((eq state 'missing)
|
||||
(error "Fileset files are missing, so cannot be operated on"))
|
||||
((eq state 'ignored)
|
||||
(error "Fileset files are ignored by the version-control system"))
|
||||
;; Fileset comes from a diff-mode buffer, see
|
||||
|
|
@ -1503,6 +1500,8 @@ from which to check out the file(s)."
|
|||
(vc-register (cons backend (cdr vc-fileset)))))
|
||||
(t
|
||||
(vc-register vc-fileset))))
|
||||
((eq state 'missing)
|
||||
(mapc #'vc-delete-file files))
|
||||
;; Files are up-to-date, or need a merge and user specified a revision
|
||||
((or (eq state 'up-to-date) (and verbose (eq state 'needs-update)))
|
||||
(cond
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue