# HG changeset patch # User Dan Nicolaescu # Date 1212247438 0 # Node ID 3a41427d46d96f27688db27569f1063a8a14cec8 # Parent dda7f7cce33d507223ccef122f36f4cb9e7fe5da (vc-cvs-after-dir-status): Support spaces in file names and improve support for unregistered files. diff -r dda7f7cce33d -r 3a41427d46d9 lisp/ChangeLog --- a/lisp/ChangeLog Sat May 31 10:53:54 2008 +0000 +++ b/lisp/ChangeLog Sat May 31 15:23:58 2008 +0000 @@ -1,3 +1,8 @@ +2008-05-31 Dan Nicolaescu + + * vc-cvs.el (vc-cvs-after-dir-status): Support spaces in file + names and improve support for unregistered files. + 2008-05-31 Glenn Morris * Makefile.in (compile-last): Replace tr in `els' assignment with sed. diff -r dda7f7cce33d -r 3a41427d46d9 lisp/vc-cvs.el --- a/lisp/vc-cvs.el Sat May 31 10:53:54 2008 +0000 +++ b/lisp/vc-cvs.el Sat May 31 15:23:58 2008 +0000 @@ -842,7 +842,7 @@ (re-search-forward "\\(^=+\n\\([^=c?\n].*\n\\|\n\\)+\\)\\|\\(\\(^?? .*\n\\)+\\)\\|\\(^cvs status: Examining .*\n\\)" nil t) - ;; XXX: get rid of narrowing here. + ;; FIXME: get rid of narrowing here. (narrow-to-region (match-beginning 0) (match-end 0)) (goto-char (point-min)) ;; The subdir @@ -855,29 +855,25 @@ (push (list file 'unregistered) result) (forward-line 1)) ;; A file entry. - (when (re-search-forward "^File: " nil t) - (when (setq missing (looking-at "no file ")) - (goto-char (match-end 0))) - (cond - ((re-search-forward "\\=\\([^ \t]+\\)" nil t) - (setq file (file-relative-name - (expand-file-name (match-string 1) subdir))) - (if (not (re-search-forward "\\=[ \t]+Status: \\(.*\\)" nil t)) - (push (list file 'unregistered) result) - (setq status-str (match-string 1)) - (setq status - (cond - ((string-match "Up-to-date" status-str) 'up-to-date) - ((string-match "Locally Modified" status-str) 'edited) - ((string-match "Needs Merge" status-str) 'needs-merge) - ((string-match "Needs \\(Checkout\\|Patch\\)" status-str) - (if missing 'missing 'needs-update)) - ((string-match "Locally Added" status-str) 'added) - ((string-match "Locally Removed" status-str) 'removed) - ((string-match "File had conflicts " status-str) 'conflict) - (t 'edited))) - (unless (eq status 'up-to-date) - (push (list file status) result)))))) + (when (re-search-forward "^File: \\(no file \\)?\\(.*[^ \t]\\)[ \t]+Status: \\(.*\\)" nil t) + (setq missing (match-string 1)) + (setq file (file-relative-name + (expand-file-name (match-string 2) subdir))) + (setq status-str (match-string 3)) + (setq status + (cond + ((string-match "Up-to-date" status-str) 'up-to-date) + ((string-match "Locally Modified" status-str) 'edited) + ((string-match "Needs Merge" status-str) 'needs-merge) + ((string-match "Needs \\(Checkout\\|Patch\\)" status-str) + (if missing 'missing 'needs-update)) + ((string-match "Locally Added" status-str) 'added) + ((string-match "Locally Removed" status-str) 'removed) + ((string-match "File had conflicts " status-str) 'conflict) + ((string-match "Unknown" 'unregistered)) + (t 'edited))) + (unless (eq status 'up-to-date) + (push (list file status) result))) (goto-char (point-max)) (widen)) (funcall update-function result))