2014-12-02 Eric S. Raymond <esr@snark.thyrsus.com>
+ * vc.el, all backends: API simplification: Remove 4th
+ 'default-state' argument from vc-dir-status files and its backend
+ methods - no backend method ever set it. It was used only in the
+ fallback method to to set a default of 'up-to-date, though a
+ convoluted call chain obscured this.
+
* vc-hooks.el: Bind vc-delete-file to Ctrl-x v delete.
* vc.el (vc-expand-dirs): Now takes a second BACKEND argument,
global.
* vc-bzr.el: Restore vc-bzr-state-heuristic as a private method.
- VC randomly/unpredictable fails without it; cause not yet established.
+ VC randomly/unpredictably fails without it; cause not yet established.
2014-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
;; frob the results accordingly.
(file-relative-name dir (vc-bzr-root dir)))))
-(defun vc-bzr-dir-status-files (dir files _default-state update-function)
+(defun vc-bzr-dir-status-files (dir files update-function)
"Return a list of conses (file . state) for DIR."
(apply 'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files)
(vc-run-delayed
(vc-run-delayed
(vc-cvs-after-dir-status update-function)))))
-(defun vc-cvs-dir-status-files (dir files _default-state update-function)
+(defun vc-cvs-dir-status-files (dir files update-function)
"Create a list of conses (file . state) for DIR."
(apply 'vc-cvs-command (current-buffer) 'async dir "-f" "status" files)
(vc-run-delayed
(vc-call-backend backend 'dir-extra-headers dir)
"\n"))
-(defun vc-dir-refresh-files (files default-state)
- "Refresh some files in the *VC-dir* buffer."
+(defun vc-dir-refresh-files (files)
+ "Refresh some fies in the *VC-dir* buffer."
(let ((def-dir default-directory)
(backend vc-dir-backend))
(vc-set-mode-line-busy-indicator)
(setq default-directory def-dir)
(erase-buffer)
(vc-call-backend
- backend 'dir-status-files def-dir files default-state
+ backend 'dir-status-files def-dir files
(lambda (entries &optional more-to-come)
;; ENTRIES is a list of (FILE VC_STATE EXTRA) items.
;; If MORE-TO-COME is true, then more updates will come from
vc-ewoc 'vc-dir-fileinfo->needs-update)))
(if remaining
(vc-dir-refresh-files
- (mapcar 'vc-dir-fileinfo->name remaining)
- 'up-to-date)
+ (mapcar 'vc-dir-fileinfo->name remaining))
(setq mode-line-process nil))))))))))))
(defun vc-dir-show-fileentry (file)
;; * registered (file) OK
;; * state (file) OK
;; * dir-status (dir update-function) OK
-;; - dir-status-files (dir files ds uf) NOT NEEDED
+;; - dir-status-files (dir files uf) NOT NEEDED
;; * working-revision (file) OK
;; - latest-on-branch-p (file) NOT NEEDED
;; * checkout-model (files) OK
;; - how to support vc-dir on a subdir of the project tree
(vc-git-dir-status-goto-stage 'update-index nil update-function))
-(defun vc-git-dir-status-files (_dir files _default-state update-function)
+(defun vc-git-dir-status-files (_dir files update-function)
"Return a list of (FILE STATE EXTRA) entries for FILES in DIR."
(vc-git-dir-status-goto-stage 'update-index files update-function))
;; * registered (file) OK
;; * state (file) OK
;; - dir-status (dir update-function) OK
-;; - dir-status-files (dir files ds uf) OK
+;; - dir-status-files (dir files uf) OK
;; - dir-extra-headers (dir) OK
;; - dir-printer (fileinfo) OK
;; * working-revision (file) OK
(vc-run-delayed
(vc-hg-after-dir-status update-function)))
-(defun vc-hg-dir-status-files (dir files _default-state update-function)
+(defun vc-hg-dir-status-files (dir files update-function)
(apply 'vc-hg-command (current-buffer) 'async dir "status" "-mardui" "-C" files)
(vc-run-delayed
(vc-hg-after-dir-status update-function)))
;; * registered (file) OK
;; * state (file) OK
;; * dir-status (dir update-function) OK
-;; - dir-status-files (dir files ds uf) ??
+;; - dir-status-files (dir files uf) ??
;; - dir-extra-headers (dir) NOT NEEDED
;; - dir-printer (fileinfo) ??
;; * working-revision (file) OK
(vc-svn-command (current-buffer) 'async nil "status" "-u")
(vc-run-delayed (vc-svn-after-dir-status callback)))
-(defun vc-svn-dir-status-files (_dir files _default-state callback)
+(defun vc-svn-dir-status-files (_dir files callback)
(apply 'vc-svn-command (current-buffer) 'async nil "status" files)
(vc-run-delayed
(vc-svn-after-dir-status callback)))
;; the following functions might be needed: `dir-extra-headers',
;; `dir-printer', `extra-dir-menu' and `dir-status-files'.
;;
-;; - dir-status-files (dir files default-state update-function)
+;; - dir-status-files (dir files update-function)
;;
;; This function is identical to dir-status except that it should
;; only report status for the specified FILES. Also it needs to
;; report on all requested files, including up-to-date or ignored
;; files. If not provided, the default is to consider that the files
-;; are in DEFAULT-STATE.
+;; are in 'up-to-date state.
;;
;; - dir-extra-headers (dir)
;;
;; (This fixes a layer violation that produced bad behavior under
;; SVN.)
;;
+;; - INCOMPATIBLE CHANGE: The old fourth 'default-state' argument of
+;; vc-dir-status-files is gone; none of the back ends actually used it.
+;;
;; - vc-state-heuristic is no longer a public method (the CVS backend
;; retains it as a private one).
;;
(defalias 'vc-default-revision-completion-table 'ignore)
(defalias 'vc-default-mark-resolved 'ignore)
-(defun vc-default-dir-status-files (_backend _dir files default-state update-function)
+(defun vc-default-dir-status-files (_backend _dir files update-function)
(funcall update-function
- (mapcar (lambda (file) (list file default-state)) files)))
+ (mapcar (lambda (file) (list file 'up-to-date)) files)))
(defun vc-check-headers ()
"Check if the current file has any headers in it."