diff options
| author | Dan Nicolaescu | 2008-01-18 23:45:04 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2008-01-18 23:45:04 +0000 |
| commit | f8e89f1963db357d4572f0411cd618d32a077fe8 (patch) | |
| tree | 40791cd749621eae91f0c4d544ec5facd49fe38b | |
| parent | 5ab612e823bb32aed3514c26b58e5aa7c0fab136 (diff) | |
| download | emacs-f8e89f1963db357d4572f0411cd618d32a077fe8.tar.gz emacs-f8e89f1963db357d4572f0411cd618d32a077fe8.zip | |
* vc-svn.el (vc-svn-dir-status): New function.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/vc-svn.el | 23 |
2 files changed, 27 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a629893a38d..4f1526e0bc3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2008-01-18 Tom Tromey <tromey@redhat.com> | ||
| 2 | |||
| 3 | * vc-svn.el (vc-svn-dir-status): New function. | ||
| 4 | |||
| 1 | 2008-01-18 Dan Nicolaescu <dann@ics.uci.edu> | 5 | 2008-01-18 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 6 | ||
| 3 | * vc.el: Make vc-status asynchronous. | 7 | * 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." | |||
| 158 | (vc-svn-command t 0 nil "status" (if localp "-v" "-u")) | 158 | (vc-svn-command t 0 nil "status" (if localp "-v" "-u")) |
| 159 | (vc-svn-parse-status)))) | 159 | (vc-svn-parse-status)))) |
| 160 | 160 | ||
| 161 | (defun vc-svn-dir-status (dir) | ||
| 162 | "Return a list of conses (FILE . STATE) for DIR." | ||
| 163 | (with-temp-buffer | ||
| 164 | (let ((default-directory (file-name-as-directory dir)) | ||
| 165 | (state-map '((?A . added) | ||
| 166 | (?C . edited) | ||
| 167 | (?D . removed) | ||
| 168 | (?I . ignored) | ||
| 169 | (?M . edited) | ||
| 170 | (?R . removed) | ||
| 171 | (?? . unregistered) | ||
| 172 | ;; This is what vc-svn-parse-status does. | ||
| 173 | (?~ . edited))) | ||
| 174 | result) | ||
| 175 | (vc-svn-command t 0 nil "status") | ||
| 176 | (goto-char (point-min)) | ||
| 177 | (while (re-search-forward "^\\(.\\)..... \\(.*\\)$" nil t) | ||
| 178 | (let ((state (cdr (assq (aref (match-string 1) 0) state-map))) | ||
| 179 | (filename (match-string 2))) | ||
| 180 | (when state | ||
| 181 | (setq result (cons (cons filename state) result))))) | ||
| 182 | result))) | ||
| 183 | |||
| 161 | (defun vc-svn-working-revision (file) | 184 | (defun vc-svn-working-revision (file) |
| 162 | "SVN-specific version of `vc-working-revision'." | 185 | "SVN-specific version of `vc-working-revision'." |
| 163 | ;; There is no need to consult RCS headers under SVN, because we | 186 | ;; There is no need to consult RCS headers under SVN, because we |