# HG changeset patch # User Dan Nicolaescu # Date 1210391891 0 # Node ID 0f7a18ff94d6526b012ac20337f3954a47bb9181 # Parent 8dbc13404a475ff0e43239ed4ef287191622c785 * 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. diff -r 8dbc13404a47 -r 0f7a18ff94d6 lisp/ChangeLog --- a/lisp/ChangeLog Sat May 10 03:55:00 2008 +0000 +++ b/lisp/ChangeLog Sat May 10 03:58:11 2008 +0000 @@ -1,5 +1,9 @@ 2008-05-10 Dan Nicolaescu + * 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. + * vc-hooks.el (vc-prefix-map): Remove duplicate binding. 2008-05-09 Eric S. Raymond diff -r 8dbc13404a47 -r 0f7a18ff94d6 lisp/vc-rcs.el --- a/lisp/vc-rcs.el Sat May 10 03:55:00 2008 +0000 +++ b/lisp/vc-rcs.el Sat May 10 03:58:11 2008 +0000 @@ -188,14 +188,21 @@ (vc-rcs-state file))))) (defun vc-rcs-dir-status (dir update-function) - ;; Doing individual vc-state calls is painful but tgere - ;; is no better way in RCS-land. + ;; FIXME: this function should be rewritten or `vc-expand-dirs' + ;; should be changed to take a backend parameter. Using + ;; `vc-expand-dirs' is not TRTD because it returns files from + ;; multiple backends. It should also return 'unregistered files. + + ;; Doing individual vc-state calls is painful but there + ;; is no better way in RCS-land. (let ((flist (vc-expand-dirs (list dir))) (result nil)) (dolist (file flist) (let ((state (vc-state file)) (frel (file-relative-name file))) - (push (list frel state) result))) + (when (and (eq (vc-backend file) 'RCS) + (not (eq state 'up-to-date))) + (push (list frel state) result)))) (funcall update-function result))) (defun vc-rcs-working-revision (file) diff -r 8dbc13404a47 -r 0f7a18ff94d6 lisp/vc-sccs.el --- a/lisp/vc-sccs.el Sat May 10 03:55:00 2008 +0000 +++ b/lisp/vc-sccs.el Sat May 10 03:58:11 2008 +0000 @@ -152,14 +152,20 @@ (vc-sccs-state file))) (defun vc-sccs-dir-status (dir update-function) - ;; Doing lots of individual VC-state calls is painful, but + ;; FIXME: this function should be rewritten, using `vc-expand-dirs' + ;; is not TRTD because it returns files from multiple backends. + ;; It should also return 'unregistered files. + + ;; Doing lots of individual VC-state calls is painful, but ;; there is no better option in SCCS-land. (let ((flist (vc-expand-dirs (list dir))) (result nil)) (dolist (file flist) (let ((state (vc-state file)) (frel (file-relative-name file))) - (push (list frel state) result))) + (when (and (eq (vc-backend file) 'SCCS) + (not (eq state 'up-to-date))) + (push (list frel state) result)))) (funcall update-function result))) (defun vc-sccs-working-revision (file)