comparison lisp/pcvs-parse.el @ 56721:fcf62a4ca08d

(cvs-parse-table, cvs-parse-commit): Try to adapt to the newer format of some messages in cvs-1.12.1.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 19 Aug 2004 22:29:06 +0000
parents 695cf19ef79e
children c6d72c23a106 d8411455de48
comparison
equal deleted inserted replaced
56720:7c89be334c1b 56721:fcf62a4ca08d
1 ;;; pcvs-parse.el --- the CVS output parser 1 ;;; pcvs-parse.el --- the CVS output parser
2 2
3 ;; Copyright (C) 1991,92,93,94,95,96,97,98,99,2000,02,2003 3 ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4 ;; Free Software Foundation, Inc. 4 ;; 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
5 5
6 ;; Author: Stefan Monnier <monnier@cs.yale.edu> 6 ;; Author: Stefan Monnier <monnier@cs.yale.edu>
7 ;; Keywords: pcl-cvs 7 ;; Keywords: pcl-cvs
8 8
9 ;; This file is part of GNU Emacs. 9 ;; This file is part of GNU Emacs.
368 ;; Cvs waits for a lock. Ignored: already handled by the process filter 368 ;; Cvs waits for a lock. Ignored: already handled by the process filter
369 (cvs-match "\\[..:..:..\\] \\(waiting for\\|obtained\\) .*lock in .*$") 369 (cvs-match "\\[..:..:..\\] \\(waiting for\\|obtained\\) .*lock in .*$")
370 ;; File you removed still exists. Ignore (will be noted as removed). 370 ;; File you removed still exists. Ignore (will be noted as removed).
371 (cvs-match ".* should be removed and is still there$") 371 (cvs-match ".* should be removed and is still there$")
372 ;; just a note 372 ;; just a note
373 (cvs-match "use '.+ commit' to \\sw+ th\\sw+ files? permanently$") 373 (cvs-match "use ['`].+ commit' to \\sw+ th\\sw+ files? permanently$")
374 ;; [add,status] followed by a more complete status description anyway 374 ;; [add,status] followed by a more complete status description anyway
375 (and (cvs-match "nothing known about \\(.*\\)$" (path 1)) 375 (and (cvs-match "nothing known about \\(.*\\)$" (path 1))
376 (cvs-parsed-fileinfo 'DEAD path 'trust)) 376 (cvs-parsed-fileinfo 'DEAD path 'trust))
377 ;; [update] problem with patch 377 ;; [update] problem with patch
378 (cvs-match "checksum failure after patch to .*; will refetch$") 378 (cvs-match "checksum failure after patch to .*; will refetch$")
490 (cvs-parsed-fileinfo type path nil 490 (cvs-parsed-fileinfo type path nil
491 :base-rev base-rev 491 :base-rev base-rev
492 :head-rev head-rev)))) 492 :head-rev head-rev))))
493 493
494 (defun cvs-parse-commit () 494 (defun cvs-parse-commit ()
495 (let (path base-rev subtype) 495 (let (path file base-rev subtype)
496 (cvs-or 496 (cvs-or
497 497
498 (and 498 (and
499 (cvs-match "\\(Checking in\\|Removing\\) \\(.*\\);$" (path 2)) 499 (cvs-or
500 (cvs-match ".*,v <-- .*$") 500 (cvs-match "\\(Checking in\\|Removing\\) \\(.*\\);$" (path 2))
501 t)
502 (cvs-match ".*,v <-- \\(.*\\)$" (file 1))
501 (cvs-or 503 (cvs-or
502 ;; deletion 504 ;; deletion
503 (cvs-match "new revision: delete; previous revision: \\([0-9.]*\\)$" 505 (cvs-match "new revision: delete; previous revision: \\([0-9.]*\\)$"
504 (subtype 'REMOVED) (base-rev 1)) 506 (subtype 'REMOVED) (base-rev 1))
505 ;; addition 507 ;; addition
506 (cvs-match "initial revision: \\([0-9.]*\\)$" 508 (cvs-match "initial revision: \\([0-9.]*\\)$"
507 (subtype 'ADDED) (base-rev 1)) 509 (subtype 'ADDED) (base-rev 1))
508 ;; update 510 ;; update
509 (cvs-match "new revision: \\([0-9.]*\\); previous revision: .*$" 511 (cvs-match "new revision: \\([0-9.]*\\); previous revision: .*$"
510 (subtype 'COMMITTED) (base-rev 1))) 512 (subtype 'COMMITTED) (base-rev 1)))
511 (cvs-match "done$") 513 (cvs-or (cvs-match "done$") t)
512 (progn 514 (progn
513 ;; Try to remove the temp files used by VC. 515 ;; Try to remove the temp files used by VC.
514 (vc-delete-automatic-version-backups (expand-file-name path)) 516 (vc-delete-automatic-version-backups (expand-file-name path))
515 ;; it's important here not to rely on the default directory management 517 ;; it's important here not to rely on the default directory management
516 ;; because `cvs commit' might begin by a series of Examining messages 518 ;; because `cvs commit' might begin by a series of Examining messages
517 ;; so the processing of the actual checkin messages might begin with 519 ;; so the processing of the actual checkin messages might begin with
518 ;; a `current-dir' set to something different from "" 520 ;; a `current-dir' set to something different from ""
519 (cvs-parsed-fileinfo (cons 'UP-TO-DATE subtype) path 'trust 521 (cvs-parsed-fileinfo (cons 'UP-TO-DATE subtype)
522 (or path file) (if path 'trust)
520 :base-rev base-rev))) 523 :base-rev base-rev)))
521 524
522 ;; useless message added before the actual addition: ignored 525 ;; useless message added before the actual addition: ignored
523 (cvs-match "RCS file: .*\ndone$")))) 526 (cvs-match "RCS file: .*\ndone$"))))
524 527
525 528
526 (provide 'pcvs-parse) 529 (provide 'pcvs-parse)
527 530
528 ;;; arch-tag: 35418375-1a23-40a0-957d-96b0262f91d6 531 ;; arch-tag: 35418375-1a23-40a0-957d-96b0262f91d6
529 ;;; pcvs-parse.el ends here 532 ;;; pcvs-parse.el ends here