comparison lisp/vc-svn.el @ 102974:04e540897dd1

(vc-svn-after-dir-status): Fix regexp to allow for file names with leading spaces. Ignore "." if it appears as a filename.
author Dan Nicolaescu <dann@ics.uci.edu>
date Wed, 15 Apr 2009 00:32:47 +0000
parents 4eaca528c43f
children 276b0724ed86
comparison
equal deleted inserted replaced
102973:9980dd970cf9 102974:04e540897dd1
162 (?M . edited) 162 (?M . edited)
163 (?R . removed) 163 (?R . removed)
164 (?? . unregistered) 164 (?? . unregistered)
165 ;; This is what vc-svn-parse-status does. 165 ;; This is what vc-svn-parse-status does.
166 (?~ . edited))) 166 (?~ . edited)))
167 (re (if remote "^\\(.\\)..... \\([ *]\\) +\\(?:[-0-9]+\\)? +\\(.*\\)$" 167 (re (if remote "^\\(.\\)..... \\([ *]\\) +\\(?:[-0-9]+\\)? \\(.*\\)$"
168 ;; Subexp 2 is a dummy in this case, so the numbers match. 168 ;; Subexp 2 is a dummy in this case, so the numbers match.
169 "^\\(.\\)....\\(.\\) \\(.*\\)$")) 169 "^\\(.\\)....\\(.\\) \\(.*\\)$"))
170 result) 170 result)
171 (goto-char (point-min)) 171 (goto-char (point-min))
172 (while (re-search-forward re nil t) 172 (while (re-search-forward re nil t)
174 (filename (match-string 3))) 174 (filename (match-string 3)))
175 (and remote (string-equal (match-string 2) "*") 175 (and remote (string-equal (match-string 2) "*")
176 ;; FIXME are there other possible combinations? 176 ;; FIXME are there other possible combinations?
177 (cond ((eq state 'edited) (setq state 'needs-merge)) 177 (cond ((eq state 'edited) (setq state 'needs-merge))
178 ((not state) (setq state 'needs-update)))) 178 ((not state) (setq state 'needs-update))))
179 (when state 179 (when (and state (not (string= "." filename)))
180 (setq result (cons (list filename state) result))))) 180 (setq result (cons (list filename state) result)))))
181 (funcall callback result))) 181 (funcall callback result)))
182 182
183 (defun vc-svn-dir-status (dir callback) 183 (defun vc-svn-dir-status (dir callback)
184 "Run 'svn status' for DIR and update BUFFER via CALLBACK. 184 "Run 'svn status' for DIR and update BUFFER via CALLBACK.