comparison lisp/vc-rcs.el @ 94835:0f7a18ff94d6

* vc-sccs.el (vc-sccs-dir-status): * vc-rcs.el (vc-rcs-dir-status): Avoid using results from multiple backends and returning up to date files.
author Dan Nicolaescu <dann@ics.uci.edu>
date Sat, 10 May 2008 03:58:11 +0000
parents 76b523d99056
children 5e64dca662f0
comparison
equal deleted inserted replaced
94834:8dbc13404a47 94835:0f7a18ff94d6
186 ;; expensive state computation. 186 ;; expensive state computation.
187 (vc-rcs-state file)))) 187 (vc-rcs-state file))))
188 (vc-rcs-state file))))) 188 (vc-rcs-state file)))))
189 189
190 (defun vc-rcs-dir-status (dir update-function) 190 (defun vc-rcs-dir-status (dir update-function)
191 ;; Doing individual vc-state calls is painful but tgere 191 ;; FIXME: this function should be rewritten or `vc-expand-dirs'
192 ;; is no better way in RCS-land. 192 ;; should be changed to take a backend parameter. Using
193 ;; `vc-expand-dirs' is not TRTD because it returns files from
194 ;; multiple backends. It should also return 'unregistered files.
195
196 ;; Doing individual vc-state calls is painful but there
197 ;; is no better way in RCS-land.
193 (let ((flist (vc-expand-dirs (list dir))) 198 (let ((flist (vc-expand-dirs (list dir)))
194 (result nil)) 199 (result nil))
195 (dolist (file flist) 200 (dolist (file flist)
196 (let ((state (vc-state file)) 201 (let ((state (vc-state file))
197 (frel (file-relative-name file))) 202 (frel (file-relative-name file)))
198 (push (list frel state) result))) 203 (when (and (eq (vc-backend file) 'RCS)
204 (not (eq state 'up-to-date)))
205 (push (list frel state) result))))
199 (funcall update-function result))) 206 (funcall update-function result)))
200 207
201 (defun vc-rcs-working-revision (file) 208 (defun vc-rcs-working-revision (file)
202 "RCS-specific version of `vc-working-revision'." 209 "RCS-specific version of `vc-working-revision'."
203 (or (and vc-consult-headers 210 (or (and vc-consult-headers