1 |
;;; pcvs-parse.el --- the CVS output parser |
;;; pcvs-parse.el --- the CVS output parser |
2 |
|
|
3 |
;; Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. |
;; Copyright (C) 1991,92,93,94,95,96,97,98,99,2000,2002 |
4 |
|
;; Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Author: Stefan Monnier <monnier@cs.yale.edu> |
;; Author: Stefan Monnier <monnier@cs.yale.edu> |
7 |
;; Keywords: pcl-cvs |
;; Keywords: pcl-cvs |
202 |
"Table of message objects for `cvs-parse-process'." |
"Table of message objects for `cvs-parse-process'." |
203 |
(let (c file dir path type base-rev subtype) |
(let (c file dir path type base-rev subtype) |
204 |
(cvs-or |
(cvs-or |
205 |
|
|
206 |
(cvs-parse-status) |
(cvs-parse-status) |
207 |
(cvs-parse-merge) |
(cvs-parse-merge) |
208 |
(cvs-parse-commit) |
(cvs-parse-commit) |
211 |
;; such duplicate info and luckily the second info is the one we want. |
;; such duplicate info and luckily the second info is the one we want. |
212 |
;; (and (cvs-match "M \\(.*\\)$" (path 1)) |
;; (and (cvs-match "M \\(.*\\)$" (path 1)) |
213 |
;; (cvs-parse-merge path)) |
;; (cvs-parse-merge path)) |
214 |
|
|
215 |
;; Normal file state indicator. |
;; Normal file state indicator. |
216 |
(and |
(and |
217 |
(cvs-match "\\([MARCUPNJ?]\\) \\(.*\\)$" (c 1) (path 2)) |
(cvs-match "\\([MARCUPNJ?]\\) \\(.*\\)$" (c 1) (path 2)) |
266 |
;; [-n update] A new (or pruned) directory appeared but isn't traversed |
;; [-n update] A new (or pruned) directory appeared but isn't traversed |
267 |
(and |
(and |
268 |
(cvs-match "New directory `\\(.*\\)' -- ignored$" (dir 1)) |
(cvs-match "New directory `\\(.*\\)' -- ignored$" (dir 1)) |
269 |
(cvs-parsed-fileinfo 'MESSAGE " " (file-name-as-directory dir))) |
;; (cvs-parsed-fileinfo 'MESSAGE " " (file-name-as-directory dir)) |
270 |
|
(cvs-parsed-fileinfo '(NEED-UPDATE . NEW-DIR) dir)) |
271 |
|
|
272 |
;; File removed, since it is removed (by third party) in repository. |
;; File removed, since it is removed (by third party) in repository. |
273 |
(and |
(and |
274 |
(cvs-or |
(cvs-or |
275 |
(cvs-match "warning: \\(.*\\) is not (any longer) pertinent$" (file 1)) |
(cvs-match "warning: \\(.*\\) is not (any longer) pertinent$" (file 1)) |
276 |
(cvs-match "\\(.*\\) is no longer in the repository$" (file 1))) |
(cvs-match "\\(.*\\) is no longer in the repository$" (file 1))) |
277 |
(cvs-parsed-fileinfo 'DEAD file)) |
(cvs-parsed-fileinfo |
278 |
|
(if dont-change-disc '(NEED-UPDATE . REMOVED) 'DEAD) file)) |
279 |
|
|
280 |
;; [add] |
;; [add] |
281 |
(and |
(and |
288 |
(and |
(and |
289 |
(cvs-match "\\(.*\\), version \\(.*\\), resurrected$" |
(cvs-match "\\(.*\\), version \\(.*\\), resurrected$" |
290 |
(path 1) (base-rev 2)) |
(path 1) (base-rev 2)) |
291 |
|
;; FIXME: resurrection only brings back the original version, |
292 |
|
;; not the latest on the branch, so `up-to-date' is not always |
293 |
|
;; what we want. |
294 |
(cvs-parsed-fileinfo '(UP-TO-DATE . RESURRECTED) path nil |
(cvs-parsed-fileinfo '(UP-TO-DATE . RESURRECTED) path nil |
295 |
:base-rev base-rev)) |
:base-rev base-rev)) |
296 |
|
|
312 |
'MISSING |
'MISSING |
313 |
'(UP-TO-DATE . UPDATED)) |
'(UP-TO-DATE . UPDATED)) |
314 |
path)) |
path)) |
315 |
|
|
316 |
;; Mode conflicts (rather than contents) |
;; Mode conflicts (rather than contents) |
317 |
(and |
(and |
318 |
(cvs-match "conflict: ") |
(cvs-match "conflict: ") |
334 |
(cvs-match "sticky tag .* for file `\\(.*\\)' is not a branch$" |
(cvs-match "sticky tag .* for file `\\(.*\\)' is not a branch$" |
335 |
(file 1))) |
(file 1))) |
336 |
(cvs-parsed-fileinfo 'MESSAGE file)) |
(cvs-parsed-fileinfo 'MESSAGE file)) |
337 |
|
|
338 |
;; File unknown. |
;; File unknown. |
339 |
(and (cvs-match "use `.+ add' to create an entry for \\(.*\\)$" (path 1)) |
(and (cvs-match "use `.+ add' to create an entry for \\(.*\\)$" (path 1)) |
340 |
(cvs-parsed-fileinfo 'UNKNOWN path)) |
(cvs-parsed-fileinfo 'UNKNOWN path)) |
352 |
'MESSAGE "" " " |
'MESSAGE "" " " |
353 |
"*** Add (setq cvs-execute-single-dir t) to your .emacs *** |
"*** Add (setq cvs-execute-single-dir t) to your .emacs *** |
354 |
See the FAQ file or the variable's documentation for more info.")) |
See the FAQ file or the variable's documentation for more info.")) |
355 |
|
|
356 |
;; Cvs waits for a lock. Ignored: already handled by the process filter |
;; Cvs waits for a lock. Ignored: already handled by the process filter |
357 |
(cvs-match "\\[..:..:..\\] \\(waiting for\\|obtained\\) .*lock in .*$") |
(cvs-match "\\[..:..:..\\] \\(waiting for\\|obtained\\) .*lock in .*$") |
358 |
;; File you removed still exists. Ignore (will be noted as removed). |
;; File you removed still exists. Ignore (will be noted as removed). |
360 |
;; just a note |
;; just a note |
361 |
(cvs-match "use '.+ commit' to \\sw+ th\\sw+ files? permanently$") |
(cvs-match "use '.+ commit' to \\sw+ th\\sw+ files? permanently$") |
362 |
;; [add,status] followed by a more complete status description anyway |
;; [add,status] followed by a more complete status description anyway |
363 |
(cvs-match "nothing known about .*$") |
(and (cvs-match "nothing known about \\(.*\\)$" (path 1)) |
364 |
|
(cvs-parsed-fileinfo 'DEAD path 'trust)) |
365 |
;; [update] problem with patch |
;; [update] problem with patch |
366 |
(cvs-match "checksum failure after patch to .*; will refetch$") |
(cvs-match "checksum failure after patch to .*; will refetch$") |
367 |
(cvs-match "refetching unpatchable files$") |
(cvs-match "refetching unpatchable files$") |
369 |
(cvs-match "Rebuilding administrative file database$") |
(cvs-match "Rebuilding administrative file database$") |
370 |
;; ??? |
;; ??? |
371 |
(cvs-match "--> Using per-directory sticky tag `.*'") |
(cvs-match "--> Using per-directory sticky tag `.*'") |
372 |
|
|
373 |
;; CVS is running a *info program. |
;; CVS is running a *info program. |
374 |
(and |
(and |
375 |
(cvs-match "Executing.*$") |
(cvs-match "Executing.*$") |
381 |
(and |
(and |
382 |
(cvs-match "cvs[.ex]* \\[[a-z]+ aborted\\]:.*$") |
(cvs-match "cvs[.ex]* \\[[a-z]+ aborted\\]:.*$") |
383 |
(cvs-parsed-fileinfo 'MESSAGE "")) |
(cvs-parsed-fileinfo 'MESSAGE "")) |
384 |
|
|
385 |
;; sadly you can't do much with these since the path is in the repository |
;; sadly you can't do much with these since the path is in the repository |
386 |
(cvs-match "Directory .* added to the repository$") |
(cvs-match "Directory .* added to the repository$") |
387 |
))) |
))) |
449 |
(cvs-match "Locally Removed$" (type 'REMOVED)) |
(cvs-match "Locally Removed$" (type 'REMOVED)) |
450 |
(cvs-match "Locally Modified$" (type 'MODIFIED)) |
(cvs-match "Locally Modified$" (type 'MODIFIED)) |
451 |
(cvs-match "Needs Merge$" (type 'NEED-MERGE)) |
(cvs-match "Needs Merge$" (type 'NEED-MERGE)) |
452 |
|
(cvs-match "Entry Invalid" (type '(NEED-MERGE . REMOVED))) |
453 |
(cvs-match "Unknown$" (type 'UNKNOWN))) |
(cvs-match "Unknown$" (type 'UNKNOWN))) |
454 |
(cvs-match "$") |
(cvs-match "$") |
455 |
(cvs-or |
(cvs-or |
503 |
;; a `current-dir' set to something different from "" |
;; a `current-dir' set to something different from "" |
504 |
(cvs-parsed-fileinfo (cons 'UP-TO-DATE subtype) path 'trust |
(cvs-parsed-fileinfo (cons 'UP-TO-DATE subtype) path 'trust |
505 |
:base-rev base-rev))) |
:base-rev base-rev))) |
506 |
|
|
507 |
;; useless message added before the actual addition: ignored |
;; useless message added before the actual addition: ignored |
508 |
(cvs-match "RCS file: .*\ndone$")))) |
(cvs-match "RCS file: .*\ndone$")))) |
509 |
|
|