summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2014-12-02 08:01:46 -0500
committerEric S. Raymond <esr@thyrsus.com>2014-12-02 08:01:46 -0500
commitd4767877aca091ee1a04608e2b50b346745661d4 (patch)
tree189170facf63e6c9b640cdd1cb657a2afe880ad5
parente6fe301afe4bbc707d2fde44a5250b84418d2b1b (diff)
Eliminate an unuted function argument.
* 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.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/vc/vc-bzr.el2
-rw-r--r--lisp/vc/vc-cvs.el2
-rw-r--r--lisp/vc/vc-dir.el9
-rw-r--r--lisp/vc/vc-git.el4
-rw-r--r--lisp/vc/vc-hg.el4
-rw-r--r--lisp/vc/vc-src.el2
-rw-r--r--lisp/vc/vc-svn.el2
-rw-r--r--lisp/vc/vc.el11
9 files changed, 26 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6ffdd0adc0..8226b3d3c3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,11 @@
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,
@@ -21,7 +27,7 @@
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>
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index de6ae21dbf..a534a1ced3 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -981,7 +981,7 @@ stream. Standard error output is discarded."
;; 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
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index 41c5326146..b07a05c658 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -1084,7 +1084,7 @@ state."
(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
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index a26287aa0f..d97b9cd6a6 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -1014,8 +1014,8 @@ specific headers."
(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)
@@ -1032,7 +1032,7 @@ specific headers."
(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
@@ -1110,8 +1110,7 @@ Throw an error if another update process is in progress."
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)
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 3538f2c382..fad834bcee 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -51,7 +51,7 @@
;; * 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
@@ -481,7 +481,7 @@ or an empty string if none."
;; - 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))
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 35f5354da6..bfd1447aa3 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -44,7 +44,7 @@
;; * 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
@@ -618,7 +618,7 @@ REV is the revision to check out into WORKFILE."
(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)))
diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el
index 9e17d058a9..a2ebeef22b 100644
--- a/lisp/vc/vc-src.el
+++ b/lisp/vc/vc-src.el
@@ -32,7 +32,7 @@
;; * 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
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index 55b8f111e0..8ca8a0978e 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -206,7 +206,7 @@ RESULT is a list of conses (FILE . STATE) for directory DIR."
(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)))
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 1b82bfd939..c4810cf8b8 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -148,13 +148,13 @@
;; 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)
;;
@@ -577,6 +577,9 @@
;; (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).
;;
@@ -2884,9 +2887,9 @@ to provide the `find-revision' operation instead."
(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."