diff options
| author | Dan Nicolaescu <dann@ics.uci.edu> | 2008-01-18 23:45:04 +0000 | 
|---|---|---|
| committer | Dan Nicolaescu <dann@ics.uci.edu> | 2008-01-18 23:45:04 +0000 | 
| commit | f8e89f1963db357d4572f0411cd618d32a077fe8 (patch) | |
| tree | 40791cd749621eae91f0c4d544ec5facd49fe38b /lisp/vc-svn.el | |
| parent | 5ab612e823bb32aed3514c26b58e5aa7c0fab136 (diff) | |
| download | emacs-f8e89f1963db357d4572f0411cd618d32a077fe8.tar.gz | |
* vc-svn.el (vc-svn-dir-status): New function.
Diffstat (limited to 'lisp/vc-svn.el')
| -rw-r--r-- | lisp/vc-svn.el | 23 | 
1 files changed, 23 insertions, 0 deletions
| 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 | 
