(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
;; 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
(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