From f8e89f1963db357d4572f0411cd618d32a077fe8 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Fri, 18 Jan 2008 23:45:04 +0000 Subject: [PATCH] * vc-svn.el (vc-svn-dir-status): New function. --- lisp/ChangeLog | 4 ++++ lisp/vc-svn.el | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a629893a38d..4f1526e0bc3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2008-01-18 Tom Tromey + + * vc-svn.el (vc-svn-dir-status): New function. + 2008-01-18 Dan Nicolaescu * vc.el: Make vc-status asynchronous. diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index e463e138490..b8d04d67c70 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el @@ -158,6 +158,29 @@ If you want to force an empty list of arguments, use t." (vc-svn-command t 0 nil "status" (if localp "-v" "-u")) (vc-svn-parse-status)))) +(defun vc-svn-dir-status (dir) + "Return a list of conses (FILE . STATE) for DIR." + (with-temp-buffer + (let ((default-directory (file-name-as-directory dir)) + (state-map '((?A . added) + (?C . edited) + (?D . removed) + (?I . ignored) + (?M . edited) + (?R . removed) + (?? . unregistered) + ;; This is what vc-svn-parse-status does. + (?~ . edited))) + result) + (vc-svn-command t 0 nil "status") + (goto-char (point-min)) + (while (re-search-forward "^\\(.\\)..... \\(.*\\)$" nil t) + (let ((state (cdr (assq (aref (match-string 1) 0) state-map))) + (filename (match-string 2))) + (when state + (setq result (cons (cons filename state) result))))) + result))) + (defun vc-svn-working-revision (file) "SVN-specific version of `vc-working-revision'." ;; There is no need to consult RCS headers under SVN, because we -- 2.39.2