From 4b1a01b30ec5742b3b3d47797fee36903a3e0ad8 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Sat, 10 May 2008 03:58:11 +0000 Subject: [PATCH] * 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. --- lisp/ChangeLog | 4 ++++ lisp/vc-rcs.el | 13 ++++++++++--- lisp/vc-sccs.el | 10 ++++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f01d7dc292b..afe82a0f468 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el index 1125dae044d..f0aab4e90aa 100644 --- a/lisp/vc-rcs.el +++ b/lisp/vc-rcs.el @@ -188,14 +188,21 @@ For a description of possible values, see `vc-check-master-templates'." (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 --git a/lisp/vc-sccs.el b/lisp/vc-sccs.el index d6e50defdd8..d4bc33fe9d3 100644 --- a/lisp/vc-sccs.el +++ b/lisp/vc-sccs.el @@ -152,14 +152,20 @@ For a description of possible values, see `vc-check-master-templates'." (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) -- 2.39.5