diff options
| author | Glenn Morris | 2009-10-01 02:23:29 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-10-01 02:23:29 +0000 |
| commit | 9515cdccc0c3ce9b2be52e1614dcd9f8ccc1ed00 (patch) | |
| tree | 11309f886a32d38e6c12d583c68045998c12d0c0 | |
| parent | 57b0083abbeba404b30cdae25e9791fd40bc9691 (diff) | |
| download | emacs-9515cdccc0c3ce9b2be52e1614dcd9f8ccc1ed00.tar.gz emacs-9515cdccc0c3ce9b2be52e1614dcd9f8ccc1ed00.zip | |
(vc-cvs-parse-entry): Be more careful with the match-data. (Bug#4555).
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/vc-cvs.el | 25 |
2 files changed, 16 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index decde262f49..e71b1b2f34d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2009-10-01 Glenn Morris <rgm@gnu.org> | 1 | 2009-10-01 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * vc-cvs.el (vc-cvs-parse-entry): Be more careful with the | ||
| 4 | match-data. (Bug#4555). | ||
| 5 | |||
| 3 | * cedet/semantic/bovine/gcc.el | 6 | * cedet/semantic/bovine/gcc.el |
| 4 | (semantic-c-reset-preprocessor-symbol-map): Fix declaration. | 7 | (semantic-c-reset-preprocessor-symbol-map): Fix declaration. |
| 5 | (semantic-gcc-get-include-paths, semantic-gcc-setup-data): Doc fixes. | 8 | (semantic-gcc-get-include-paths, semantic-gcc-setup-data): Doc fixes. |
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el index 2d433b08e26..1cc971a58af 100644 --- a/lisp/vc-cvs.el +++ b/lisp/vc-cvs.el | |||
| @@ -955,6 +955,7 @@ state." | |||
| 955 | ) | 955 | ) |
| 956 | 956 | ||
| 957 | ;; Based on vc-cvs-dir-state-heuristic from Emacs 22. | 957 | ;; Based on vc-cvs-dir-state-heuristic from Emacs 22. |
| 958 | ;; FIXME does not mention unregistered files. | ||
| 958 | (defun vc-cvs-dir-status-heuristic (dir update-function &optional basedir) | 959 | (defun vc-cvs-dir-status-heuristic (dir update-function &optional basedir) |
| 959 | "Find the CVS state of all files in DIR, using only local information." | 960 | "Find the CVS state of all files in DIR, using only local information." |
| 960 | (let (file basename status result dirlist) | 961 | (let (file basename status result dirlist) |
| @@ -1164,18 +1165,18 @@ is non-nil." | |||
| 1164 | ;; This is intentionally different from the algorithm that CVS uses | 1165 | ;; This is intentionally different from the algorithm that CVS uses |
| 1165 | ;; (which is based on textual comparison), because there can be problems | 1166 | ;; (which is based on textual comparison), because there can be problems |
| 1166 | ;; generating a time string that looks exactly like the one from CVS. | 1167 | ;; generating a time string that looks exactly like the one from CVS. |
| 1167 | (let ((mtime (nth 5 (file-attributes file)))) | 1168 | (let* ((time (match-string 2)) |
| 1168 | (require 'parse-time) | 1169 | (mtime (nth 5 (file-attributes file))) |
| 1169 | (let ((parsed-time | 1170 | (parsed-time (progn (require 'parse-time) |
| 1170 | (parse-time-string (concat (match-string 2) " +0000")))) | 1171 | (parse-time-string (concat time " +0000"))))) |
| 1171 | (cond ((and (not (string-match "\\+" (match-string 2))) | 1172 | (cond ((and (not (string-match "\\+" time)) |
| 1172 | (car parsed-time) | 1173 | (car parsed-time) |
| 1173 | (equal mtime (apply 'encode-time parsed-time))) | 1174 | (equal mtime (apply 'encode-time parsed-time))) |
| 1174 | (vc-file-setprop file 'vc-checkout-time mtime) | 1175 | (vc-file-setprop file 'vc-checkout-time mtime) |
| 1175 | (if set-state (vc-file-setprop file 'vc-state 'up-to-date))) | 1176 | (if set-state (vc-file-setprop file 'vc-state 'up-to-date))) |
| 1176 | (t | 1177 | (t |
| 1177 | (vc-file-setprop file 'vc-checkout-time 0) | 1178 | (vc-file-setprop file 'vc-checkout-time 0) |
| 1178 | (if set-state (vc-file-setprop file 'vc-state 'edited))))))))) | 1179 | (if set-state (vc-file-setprop file 'vc-state 'edited)))))))) |
| 1179 | 1180 | ||
| 1180 | ;; Completion of revision names. | 1181 | ;; Completion of revision names. |
| 1181 | ;; Just so I don't feel like I'm duplicating code from pcl-cvs, I'll use | 1182 | ;; Just so I don't feel like I'm duplicating code from pcl-cvs, I'll use |