Mercurial > emacs
annotate lisp/vc/pcvs-parse.el @ 111012:2b6e7f137773
Fix the MSDOS build broken by last revisions.
msdos/sed1v2.inp: Use $(..) instead of ${..} in all edit commands.
Needed because of changes in revno 101897.
msdos/sed6.inp (mkinfodir): Edit to avoid Unix shell-isms. Needed
because of changes in revno 101876.
src/unexcoff.c (make_hdr): Fix prototype according to changes in
revno 101757.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 15 Oct 2010 20:45:12 +0200 |
parents | 280c8ae2476d |
children | 1b626601d32d 417b1e4d63cd |
rev | line source |
---|---|
38422
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
37337
diff
changeset
|
1 ;;; pcvs-parse.el --- the CVS output parser |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
2 |
56721
fcf62a4ca08d
(cvs-parse-table, cvs-parse-commit): Try to adapt to
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
3 ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
106815 | 4 ;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
5 |
70292
2b77fa42947f
Update my email address.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
70014
diff
changeset
|
6 ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
7 ;; Keywords: pcl-cvs |
110015
280c8ae2476d
Add "Package:" file headers to denote built-in packages.
Chong Yidong <cyd@stupidchicken.com>
parents:
108970
diff
changeset
|
8 ;; Package: pcvs |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
9 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
10 ;; This file is part of GNU Emacs. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
11 |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
12 ;; GNU Emacs is free software: you can redistribute it and/or modify |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
13 ;; it under the terms of the GNU General Public License as published by |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
14 ;; the Free Software Foundation, either version 3 of the License, or |
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
15 ;; (at your option) any later version. |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
16 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
17 ;; GNU Emacs is distributed in the hope that it will be useful, |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
20 ;; GNU General Public License for more details. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
21 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
22 ;; You should have received a copy of the GNU General Public License |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
24 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
25 ;;; Commentary: |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
26 |
36612
4d41a2e49d39
(cvs-parse-table): Add another ignored message.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
34652
diff
changeset
|
27 ;;; Bugs: |
4d41a2e49d39
(cvs-parse-table): Add another ignored message.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
34652
diff
changeset
|
28 |
4d41a2e49d39
(cvs-parse-table): Add another ignored message.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
34652
diff
changeset
|
29 ;; - when merging a modified file, if the merge says that the file already |
4d41a2e49d39
(cvs-parse-table): Add another ignored message.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
34652
diff
changeset
|
30 ;; contained in the changes, it marks the file as `up-to-date' although |
4d41a2e49d39
(cvs-parse-table): Add another ignored message.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
34652
diff
changeset
|
31 ;; it might still contain further changes. |
4d41a2e49d39
(cvs-parse-table): Add another ignored message.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
34652
diff
changeset
|
32 ;; Example: merging a zero-change commit. |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
33 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
34 ;;; Code: |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
35 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
36 (eval-when-compile (require 'cl)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
37 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
38 (require 'pcvs-util) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
39 (require 'pcvs-info) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
40 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
41 ;; imported from pcvs.el |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
42 (defvar cvs-execute-single-dir) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
43 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
44 ;; parse vars |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
45 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
46 (defcustom cvs-update-prog-output-skip-regexp "$" |
100171 | 47 "A regexp that matches the end of the output from all cvs update programs. |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
48 That is, output from any programs that are run by CVS (by the flag -u |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
49 in the `modules' file - see cvs(5)) when `cvs update' is performed should |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
50 terminate with a line that this regexp matches. It is enough that |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
51 some part of the line is matched. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
52 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
53 The default (a single $) fits programs without output." |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
54 :group 'pcl-cvs |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
55 :type '(regexp :value "$")) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
56 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
57 (defcustom cvs-parse-ignored-messages |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
58 '("Executing ssh-askpass to query the password.*$" |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
59 ".*Remote host denied X11 forwarding.*$") |
100171 | 60 "A list of regexps matching messages that should be ignored by the parser. |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
61 Each regexp should match a whole set of lines and should hence be terminated |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
62 by `$'." |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
63 :group 'pcl-cvs |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
64 :type '(repeat regexp)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
65 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
66 ;; a few more defvars just to shut up the compiler |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
67 (defvar cvs-start) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
68 (defvar cvs-current-dir) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
69 (defvar cvs-current-subdir) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
70 (defvar dont-change-disc) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
71 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
72 ;;;; The parser |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
73 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
74 (defconst cvs-parse-known-commands |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
75 '("status" "add" "commit" "update" "remove" "checkout" "ci") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
76 "List of CVS commands whose output is understood by the parser.") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
77 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
78 (defun cvs-parse-buffer (parse-spec dont-change-disc &optional subdir) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
79 "Parse current buffer according to PARSE-SPEC. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
80 PARSE-SPEC is a function of no argument advancing the point and returning |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
81 either a fileinfo or t (if the matched text should be ignored) or |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
82 nil if it didn't match anything. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
83 DONT-CHANGE-DISC just indicates whether the command was changing the disc |
37337
00d515266792
(cvs-parse-run-table): Remove misleading text.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
36612
diff
changeset
|
84 or not (useful to tell the difference between `cvs-examine' and `cvs-update' |
00d515266792
(cvs-parse-run-table): Remove misleading text.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
36612
diff
changeset
|
85 output. |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
86 The path names should be interpreted as relative to SUBDIR (defaults |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
87 to the `default-directory'). |
37337
00d515266792
(cvs-parse-run-table): Remove misleading text.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
36612
diff
changeset
|
88 Return a list of collected entries, or t if an error occurred." |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
89 (goto-char (point-min)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
90 (let ((fileinfos ()) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
91 (cvs-current-dir "") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
92 (case-fold-search nil) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
93 (cvs-current-subdir (or subdir ""))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
94 (while (not (or (eobp) (eq fileinfos t))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
95 (let ((ret (cvs-parse-run-table parse-spec))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
96 (cond |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
97 ;; it matched a known information message |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
98 ((cvs-fileinfo-p ret) (push ret fileinfos)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
99 ;; it didn't match anything at all (impossible) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
100 ((and (consp ret) (cvs-fileinfo-p (car ret))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
101 (setq fileinfos (append ret fileinfos))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
102 ((null ret) (setq fileinfos t)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
103 ;; it matched something that should be ignored |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
104 (t nil)))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
105 (nreverse fileinfos))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
106 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
107 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
108 ;; All those parsing macros/functions should return a success indicator |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
109 (defsubst cvs-parse-msg () (buffer-substring cvs-start (1- (point)))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
110 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
111 ;;(defsubst COLLECT (exp) (push exp *result*)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
112 ;;(defsubst PROG (e) t) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
113 ;;(defmacro SEQ (&rest seqs) (cons 'and seqs)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
114 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
115 (defmacro cvs-match (re &rest matches) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
116 "Try to match RE and extract submatches. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
117 If RE matches, advance the point until the line after the match and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
118 then assign the variables as specified in MATCHES (via `setq')." |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
119 (cons 'cvs-do-match |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
120 (cons re (mapcar (lambda (match) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
121 `(cons ',(first match) ,(second match))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
122 matches)))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
123 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
124 (defun cvs-do-match (re &rest matches) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
125 "Internal function for the `cvs-match' macro. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
126 Match RE and if successful, execute MATCHES." |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
127 ;; Is it a match? |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
128 (when (looking-at re) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
129 (goto-char (match-end 0)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
130 ;; Skip the newline (unless we already are at the end of the buffer). |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
131 (when (and (eolp) (< (point) (point-max))) (forward-char)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
132 ;; assign the matches |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
133 (dolist (match matches t) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
134 (let ((val (cdr match))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
135 (set (car match) (if (integerp val) (match-string val) val)))))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
136 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
137 (defmacro cvs-or (&rest alts) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
138 "Try each one of the ALTS alternatives until one matches." |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
139 `(let ((-cvs-parse-point (point))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
140 ,(cons 'or |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
141 (mapcar (lambda (es) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
142 `(or ,es (ignore (goto-char -cvs-parse-point)))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
143 alts)))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
144 (def-edebug-spec cvs-or t) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
145 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
146 ;; This is how parser tables should be executed |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
147 (defun cvs-parse-run-table (parse-spec) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
148 "Run PARSE-SPEC and provide sensible default behavior." |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
149 (unless (bolp) (forward-line 1)) ;this should never be needed |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
150 (let ((cvs-start (point))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
151 (cvs-or |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
152 (funcall parse-spec) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
153 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
154 (dolist (re cvs-parse-ignored-messages) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
155 (when (cvs-match re) (return t))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
156 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
157 ;; This is a parse error. Create a message-type fileinfo. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
158 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
159 (cvs-match ".*$") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
160 (cvs-create-fileinfo 'MESSAGE cvs-current-dir " " |
37337
00d515266792
(cvs-parse-run-table): Remove misleading text.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
36612
diff
changeset
|
161 ;; (concat " Unknown msg: '" |
00d515266792
(cvs-parse-run-table): Remove misleading text.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
36612
diff
changeset
|
162 (cvs-parse-msg) ;; "'") |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
163 :subtype 'ERROR))))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
164 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
165 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
166 (defun cvs-parsed-fileinfo (type path &optional directory &rest keys) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
167 "Create a fileinfo. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
168 TYPE can either be a type symbol or a cons of the form (TYPE . SUBTYPE). |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
169 PATH is the filename. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
170 DIRECTORY influences the way PATH is interpreted: |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
171 - if it's a string, it denotes the directory in which PATH (which should then be |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
172 a plain file name with no directory component) resides. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
173 - if it's nil, the PATH should not be trusted: if it has a directory |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
174 component, use it, else, assume it is relative to the current directory. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
175 - else, the PATH should be trusted to be relative to the root |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
176 directory (i.e. if there is no directory component, it means the file |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
177 is inside the main directory). |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
178 The remaining KEYS are passed directly to `cvs-create-fileinfo'." |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
179 (let ((dir directory) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
180 (file path)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
181 ;; only trust the directory if it's a string |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
182 (unless (stringp directory) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
183 ;; else, if the directory is true, the path should be trusted |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
184 (setq dir (or (file-name-directory path) (if directory ""))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
185 (setq file (file-name-nondirectory path))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
186 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
187 (let ((type (if (consp type) (car type) type)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
188 (subtype (if (consp type) (cdr type)))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
189 (when dir (setq cvs-current-dir dir)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
190 (apply 'cvs-create-fileinfo type |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
191 (concat cvs-current-subdir (or dir cvs-current-dir)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
192 file (cvs-parse-msg) :subtype subtype keys)))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
193 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
194 ;;;; CVS Process Parser Tables: |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
195 ;;;; |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
196 ;;;; The table for status and update could actually be merged since they |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
197 ;;;; don't conflict. But they don't overlap much either. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
198 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
199 (defun cvs-parse-table () |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
200 "Table of message objects for `cvs-parse-process'." |
50990
b51c3d855e30
(cvs-parse-table): Remove unused var `type'.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50957
diff
changeset
|
201 (let (c file dir path base-rev subtype) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
202 (cvs-or |
49597
e88404e8f2cf
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
47210
diff
changeset
|
203 |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
204 (cvs-parse-status) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
205 (cvs-parse-merge) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
206 (cvs-parse-commit) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
207 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
208 ;; this is not necessary because the fileinfo merging will remove |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
209 ;; such duplicate info and luckily the second info is the one we want. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
210 ;; (and (cvs-match "M \\(.*\\)$" (path 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
211 ;; (cvs-parse-merge path)) |
49597
e88404e8f2cf
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
47210
diff
changeset
|
212 |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
213 ;; Normal file state indicator. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
214 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
215 (cvs-match "\\([MARCUPNJ?]\\) \\(.*\\)$" (c 1) (path 2)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
216 ;; M: The file is modified by the user, and untouched in the repository. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
217 ;; A: The file is "cvs add"ed, but not "cvs ci"ed. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
218 ;; R: The file is "cvs remove"ed, but not "cvs ci"ed. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
219 ;; C: Conflict |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
220 ;; U: The file is copied from the repository. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
221 ;; P: The file was patched from the repository. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
222 ;; ?: Unknown file. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
223 (let ((code (aref c 0))) |
29565
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
224 (cvs-parsed-fileinfo |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
225 (case code |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
226 (?M 'MODIFIED) |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
227 (?A 'ADDED) |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
228 (?R 'REMOVED) |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
229 (?? 'UNKNOWN) |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
230 (?C |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
231 (if (not dont-change-disc) 'CONFLICT |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
232 ;; This is ambiguous. We should look for conflict markers in the |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
233 ;; file to decide between CONFLICT and NEED-MERGE. With CVS-1.10 |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
234 ;; servers, this should not be necessary, because they return |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
235 ;; a complete merge output. |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
236 (with-temp-buffer |
79433
855c06f0c064
(cvs-parse-table): Ignore errors when looking up files
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78542
diff
changeset
|
237 (ignore-errors (insert-file-contents path)) |
29565
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
238 (goto-char (point-min)) |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
239 (if (re-search-forward "^<<<<<<< " nil t) |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
240 'CONFLICT 'NEED-MERGE)))) |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
241 (?J 'NEED-MERGE) ;not supported by standard CVS |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
242 ((?U ?P) |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
243 (if dont-change-disc 'NEED-UPDATE |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
244 (cons 'UP-TO-DATE (if (eq code ?U) 'UPDATED 'PATCHED))))) |
a5845156564d
(cvs-parse-table): Look for conflict markers in the
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28256
diff
changeset
|
245 path 'trust))) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
246 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
247 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
248 (cvs-match "pcl-cvs: descending directory \\(.*\\)$" (dir 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
249 (setq cvs-current-subdir dir)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
250 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
251 ;; A special cvs message |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
252 (and |
43974
36f11755a3d6
(cvs-parse-table): Be a bit more lenient.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
39419
diff
changeset
|
253 (let ((case-fold-search t)) |
36f11755a3d6
(cvs-parse-table): Be a bit more lenient.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
39419
diff
changeset
|
254 (cvs-match "cvs[.a-z]* [a-z]+: ")) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
255 (cvs-or |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
256 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
257 ;; CVS is descending a subdirectory |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
258 ;; (status says `examining' while update says `updating') |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
259 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
260 (cvs-match "\\(Examining\\|Updating\\) \\(.*\\)$" (dir 2)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
261 (let ((dir (if (string= "." dir) "" (file-name-as-directory dir)))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
262 (cvs-parsed-fileinfo 'DIRCHANGE "." dir))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
263 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
264 ;; [-n update] A new (or pruned) directory appeared but isn't traversed |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
265 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
266 (cvs-match "New directory `\\(.*\\)' -- ignored$" (dir 1)) |
47210
47f646d9e151
(cvs-parse-table): Create a `need-update'
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
45998
diff
changeset
|
267 ;; (cvs-parsed-fileinfo 'MESSAGE " " (file-name-as-directory dir)) |
50990
b51c3d855e30
(cvs-parse-table): Remove unused var `type'.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50957
diff
changeset
|
268 ;; These messages either correspond to a true new directory |
b51c3d855e30
(cvs-parse-table): Remove unused var `type'.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50957
diff
changeset
|
269 ;; that an update will bring in, or to a directory that's empty |
b51c3d855e30
(cvs-parse-table): Remove unused var `type'.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50957
diff
changeset
|
270 ;; on the current branch (either because it only exists in other |
b51c3d855e30
(cvs-parse-table): Remove unused var `type'.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50957
diff
changeset
|
271 ;; branches, or because it's been removed). |
b51c3d855e30
(cvs-parse-table): Remove unused var `type'.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50957
diff
changeset
|
272 (if (ignore-errors |
70014
876ca9433460
(cvs-parse-table): Use `with-temp-buffer' to avoid leaving temporary
Romain Francoise <romain@orebokech.com>
parents:
68651
diff
changeset
|
273 (with-temp-buffer |
79433
855c06f0c064
(cvs-parse-table): Ignore errors when looking up files
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78542
diff
changeset
|
274 (ignore-errors |
855c06f0c064
(cvs-parse-table): Ignore errors when looking up files
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78542
diff
changeset
|
275 (insert-file-contents |
855c06f0c064
(cvs-parse-table): Ignore errors when looking up files
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78542
diff
changeset
|
276 (expand-file-name ".cvsignore" (file-name-directory dir)))) |
50990
b51c3d855e30
(cvs-parse-table): Remove unused var `type'.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50957
diff
changeset
|
277 (goto-char (point-min)) |
b51c3d855e30
(cvs-parse-table): Remove unused var `type'.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50957
diff
changeset
|
278 (re-search-forward |
b51c3d855e30
(cvs-parse-table): Remove unused var `type'.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50957
diff
changeset
|
279 (concat "^" (regexp-quote (file-name-nondirectory dir)) "/$") |
b51c3d855e30
(cvs-parse-table): Remove unused var `type'.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50957
diff
changeset
|
280 nil t))) |
b51c3d855e30
(cvs-parse-table): Remove unused var `type'.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50957
diff
changeset
|
281 t ;The user requested to ignore those messages. |
b51c3d855e30
(cvs-parse-table): Remove unused var `type'.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50957
diff
changeset
|
282 (cvs-parsed-fileinfo '(NEED-UPDATE . NEW-DIR) dir t))) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
283 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
284 ;; File removed, since it is removed (by third party) in repository. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
285 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
286 (cvs-or |
78542
889170c201e6
(cvs-parse-table): Handle additional instance of optional quotes
Juanma Barranquero <lekktu@gmail.com>
parents:
78236
diff
changeset
|
287 ;; some cvs versions output quotes around these files |
889170c201e6
(cvs-parse-table): Handle additional instance of optional quotes
Juanma Barranquero <lekktu@gmail.com>
parents:
78236
diff
changeset
|
288 (cvs-match "warning: `\\(.*\\)' is not (any longer) pertinent$" (file 1)) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
289 (cvs-match "warning: \\(.*\\) is not (any longer) pertinent$" (file 1)) |
72430
c5805198a585
(cvs-parse-table): Accept the new `...' format for removed files.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
70292
diff
changeset
|
290 (cvs-match "`\\(.*\\)' is no longer in the repository$" (file 1)) |
c5805198a585
(cvs-parse-table): Accept the new `...' format for removed files.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
70292
diff
changeset
|
291 (cvs-match "\\(.*\\) is no longer in the repository$" (file 1))) |
49689
278d7d142185
(cvs-parse-table): "no longer in repo" does not
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49597
diff
changeset
|
292 (cvs-parsed-fileinfo |
278d7d142185
(cvs-parse-table): "no longer in repo" does not
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
49597
diff
changeset
|
293 (if dont-change-disc '(NEED-UPDATE . REMOVED) 'DEAD) file)) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
294 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
295 ;; [add] |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
296 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
297 (cvs-or |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
298 (cvs-match "scheduling file `\\(.*\\)' for addition.*$" (path 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
299 (cvs-match "re-adding file \\(.*\\) (in place of .*)$" (path 1))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
300 (cvs-parsed-fileinfo 'ADDED path)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
301 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
302 ;; [add] this will also show up as a `U <file>' |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
303 (and |
86562
5253774a34e8
(cvs-parse-table): Adjust regexp for resurrections.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
79433
diff
changeset
|
304 (cvs-match "`?\\(.*?\\)'?, version \\(.*\\), resurrected$" |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
305 (path 1) (base-rev 2)) |
47210
47f646d9e151
(cvs-parse-table): Create a `need-update'
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
45998
diff
changeset
|
306 ;; FIXME: resurrection only brings back the original version, |
47f646d9e151
(cvs-parse-table): Create a `need-update'
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
45998
diff
changeset
|
307 ;; not the latest on the branch, so `up-to-date' is not always |
47f646d9e151
(cvs-parse-table): Create a `need-update'
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
45998
diff
changeset
|
308 ;; what we want. |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
309 (cvs-parsed-fileinfo '(UP-TO-DATE . RESURRECTED) path nil |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
310 :base-rev base-rev)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
311 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
312 ;; [remove] |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
313 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
314 (cvs-match "removed `\\(.*\\)'$" (path 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
315 (cvs-parsed-fileinfo 'DEAD path)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
316 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
317 ;; [remove,merge] |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
318 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
319 (cvs-match "scheduling `\\(.*\\)' for removal$" (file 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
320 (cvs-parsed-fileinfo 'REMOVED file)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
321 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
322 ;; [update] File removed by you, but not cvs rm'd |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
323 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
324 (cvs-match "warning: \\(.*\\) was lost$" (path 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
325 (cvs-match (concat "U " (regexp-quote path) "$")) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
326 (cvs-parsed-fileinfo (if dont-change-disc |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
327 'MISSING |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
328 '(UP-TO-DATE . UPDATED)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
329 path)) |
49597
e88404e8f2cf
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
47210
diff
changeset
|
330 |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
331 ;; Mode conflicts (rather than contents) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
332 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
333 (cvs-match "conflict: ") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
334 (cvs-or |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
335 (cvs-match "removed \\(.*\\) was modified by second party$" |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
336 (path 1) (subtype 'REMOVED)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
337 (cvs-match "\\(.*\\) created independently by second party$" |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
338 (path 1) (subtype 'ADDED)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
339 (cvs-match "\\(.*\\) is modified but no longer in the repository$" |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
340 (path 1) (subtype 'MODIFIED))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
341 (cvs-match (concat "C " (regexp-quote path))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
342 (cvs-parsed-fileinfo (cons 'CONFLICT subtype) path)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
343 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
344 ;; Messages that should be shown to the user |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
345 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
346 (cvs-or |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
347 (cvs-match "move away \\(.*\\); it is in the way$" (file 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
348 (cvs-match "warning: new-born \\(.*\\) has disappeared$" (file 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
349 (cvs-match "sticky tag .* for file `\\(.*\\)' is not a branch$" |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
350 (file 1))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
351 (cvs-parsed-fileinfo 'MESSAGE file)) |
49597
e88404e8f2cf
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
47210
diff
changeset
|
352 |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
353 ;; File unknown. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
354 (and (cvs-match "use `.+ add' to create an entry for \\(.*\\)$" (path 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
355 (cvs-parsed-fileinfo 'UNKNOWN path)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
356 |
28256
06cfa273543d
* pcvs.el: Add a minimal leading commentary.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28088
diff
changeset
|
357 ;; [commit] |
06cfa273543d
* pcvs.el: Add a minimal leading commentary.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28088
diff
changeset
|
358 (and (cvs-match "Up-to-date check failed for `\\(.+\\)'$" (file 1)) |
06cfa273543d
* pcvs.el: Add a minimal leading commentary.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28088
diff
changeset
|
359 (cvs-parsed-fileinfo 'NEED-MERGE file)) |
06cfa273543d
* pcvs.el: Add a minimal leading commentary.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
28088
diff
changeset
|
360 |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
361 ;; We use cvs-execute-multi-dir but cvs can't handle it |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
362 ;; Probably because the cvs-client can but the cvs-server can't |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
363 (and (cvs-match ".* files with '?/'? in their name.*$") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
364 (not cvs-execute-single-dir) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
365 (setq cvs-execute-single-dir t) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
366 (cvs-create-fileinfo |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
367 'MESSAGE "" " " |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
368 "*** Add (setq cvs-execute-single-dir t) to your .emacs *** |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
369 See the FAQ file or the variable's documentation for more info.")) |
49597
e88404e8f2cf
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
47210
diff
changeset
|
370 |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
371 ;; Cvs waits for a lock. Ignored: already handled by the process filter |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
372 (cvs-match "\\[..:..:..\\] \\(waiting for\\|obtained\\) .*lock in .*$") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
373 ;; File you removed still exists. Ignore (will be noted as removed). |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
374 (cvs-match ".* should be removed and is still there$") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
375 ;; just a note |
56721
fcf62a4ca08d
(cvs-parse-table, cvs-parse-commit): Try to adapt to
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
376 (cvs-match "use ['`].+ commit' to \\sw+ th\\sw+ files? permanently$") |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
377 ;; [add,status] followed by a more complete status description anyway |
45998
124e2db60fc7
(cvs-parse-table): Handle `nothing known about' with more care.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
43974
diff
changeset
|
378 (and (cvs-match "nothing known about \\(.*\\)$" (path 1)) |
124e2db60fc7
(cvs-parse-table): Handle `nothing known about' with more care.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
43974
diff
changeset
|
379 (cvs-parsed-fileinfo 'DEAD path 'trust)) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
380 ;; [update] problem with patch |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
381 (cvs-match "checksum failure after patch to .*; will refetch$") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
382 (cvs-match "refetching unpatchable files$") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
383 ;; [commit] |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
384 (cvs-match "Rebuilding administrative file database$") |
36612
4d41a2e49d39
(cvs-parse-table): Add another ignored message.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
34652
diff
changeset
|
385 ;; ??? |
4d41a2e49d39
(cvs-parse-table): Add another ignored message.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
34652
diff
changeset
|
386 (cvs-match "--> Using per-directory sticky tag `.*'") |
49597
e88404e8f2cf
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
47210
diff
changeset
|
387 |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
388 ;; CVS is running a *info program. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
389 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
390 (cvs-match "Executing.*$") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
391 ;; Skip by any output the program may generate to stdout. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
392 ;; Note that pcl-cvs will get seriously confused if the |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
393 ;; program prints anything to stderr. |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
394 (re-search-forward cvs-update-prog-output-skip-regexp)))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
395 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
396 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
397 (cvs-match "cvs[.ex]* \\[[a-z]+ aborted\\]:.*$") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
398 (cvs-parsed-fileinfo 'MESSAGE "")) |
49597
e88404e8f2cf
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
47210
diff
changeset
|
399 |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
400 ;; sadly you can't do much with these since the path is in the repository |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
401 (cvs-match "Directory .* added to the repository$") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
402 ))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
403 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
404 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
405 (defun cvs-parse-merge () |
50990
b51c3d855e30
(cvs-parse-table): Remove unused var `type'.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50957
diff
changeset
|
406 (let (path base-rev head-rev type) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
407 ;; A merge (maybe with a conflict). |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
408 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
409 (cvs-match "RCS file: .*$") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
410 ;; Squirrel away info about the files that were retrieved for merging |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
411 (cvs-match "retrieving revision \\([0-9.]+\\)$" (base-rev 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
412 (cvs-match "retrieving revision \\([0-9.]+\\)$" (head-rev 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
413 (cvs-match "Merging differences between [0-9.]+ and [0-9.]+ into \\(.*\\)$" |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
414 (path 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
415 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
416 ;; eat up potential conflict warnings |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
417 (cvs-or (cvs-match "\\(rcs\\)?merge:?\\( warning\\)?: \\(overlaps\\|conflicts\\) \\(or other problems \\)?during merge$" (type 'CONFLICT)) t) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
418 (cvs-or |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
419 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
420 (cvs-match "cvs[.ex]* [a-z]+: ") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
421 (cvs-or |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
422 (cvs-match "conflicts found in \\(.*\\)$" (path 1) (type 'CONFLICT)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
423 (cvs-match "could not merge .*$") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
424 (cvs-match "restoring \\(.*\\) from backup file .*$" (path 1)))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
425 t) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
426 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
427 ;; Is it a succesful merge? |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
428 ;; Figure out result of merging (ie, was there a conflict?) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
429 (let ((qfile (regexp-quote path))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
430 (cvs-or |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
431 ;; Conflict |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
432 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
433 (cvs-match (concat "C \\(.*" qfile "\\)$") (path 1) (type 'CONFLICT)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
434 ;; C might be followed by a "suprious" U for non-mergeable files |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
435 (cvs-or (cvs-match (concat "U \\(.*" qfile "\\)$")) t)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
436 ;; Successful merge |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
437 (cvs-match (concat "M \\(.*" qfile "\\)$") (path 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
438 ;; The file already contained the modifications |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
439 (cvs-match (concat "^\\(.*" qfile |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
440 "\\) already contains the differences between .*$") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
441 (path 1) (type '(UP-TO-DATE . MERGED))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
442 t) |
36612
4d41a2e49d39
(cvs-parse-table): Add another ignored message.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
34652
diff
changeset
|
443 ;; FIXME: PATH might not be set yet. Sometimes the only path |
4d41a2e49d39
(cvs-parse-table): Add another ignored message.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
34652
diff
changeset
|
444 ;; information is in `RCS file: ...' (yuck!!). |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
445 (cvs-parsed-fileinfo (if dont-change-disc 'NEED-MERGE |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
446 (or type '(MODIFIED . MERGED))) path nil |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
447 :merge (cons base-rev head-rev)))))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
448 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
449 (defun cvs-parse-status () |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
450 (let (nofile path base-rev head-rev type) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
451 (and |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
452 (cvs-match |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
453 "===================================================================$") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
454 (cvs-match "File: \\(no file \\)?\\(.*[^ \t]\\)[ \t]+Status: " |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
455 (nofile 1) (path 2)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
456 (cvs-or |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
457 (cvs-match "Needs \\(Checkout\\|Patch\\)$" |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
458 (type (if nofile 'MISSING 'NEED-UPDATE))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
459 (cvs-match "Up-to-date$" |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
460 (type (if nofile '(UP-TO-DATE . REMOVED) 'UP-TO-DATE))) |
43974
36f11755a3d6
(cvs-parse-table): Be a bit more lenient.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
39419
diff
changeset
|
461 (cvs-match "File had conflicts on merge$" (type 'MODIFIED)) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
462 (cvs-match ".*[Cc]onflict.*$" (type 'CONFLICT)) |
51736
3c7354593959
(cvs-parse-status): Ignore extra fields from CVSNT.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50990
diff
changeset
|
463 (cvs-match "Locally Added$" (type 'ADDED)) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
464 (cvs-match "Locally Removed$" (type 'REMOVED)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
465 (cvs-match "Locally Modified$" (type 'MODIFIED)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
466 (cvs-match "Needs Merge$" (type 'NEED-MERGE)) |
47210
47f646d9e151
(cvs-parse-table): Create a `need-update'
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
45998
diff
changeset
|
467 (cvs-match "Entry Invalid" (type '(NEED-MERGE . REMOVED))) |
51736
3c7354593959
(cvs-parse-status): Ignore extra fields from CVSNT.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50990
diff
changeset
|
468 (cvs-match ".*$" (type 'UNKNOWN))) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
469 (cvs-match "$") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
470 (cvs-or |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
471 (cvs-match " *Version:[ \t]*\\([0-9.]+\\).*$" (base-rev 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
472 ;; NOTE: there's no date on the end of the following for server mode... |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
473 (cvs-match " *Working revision:[ \t]*-?\\([0-9.]+\\).*$" (base-rev 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
474 ;; Let's not get all worked up if the format changes a bit |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
475 (cvs-match " *Working revision:.*$")) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
476 (cvs-or |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
477 (cvs-match " *RCS Version:[ \t]*\\([0-9.]+\\)[ \t]*.*$" (head-rev 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
478 (cvs-match " *Repository revision:[ \t]*\\([0-9.]+\\)[ \t]*\\(.*\\)$" |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
479 (head-rev 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
480 (cvs-match " *Repository revision:.*")) |
51736
3c7354593959
(cvs-parse-status): Ignore extra fields from CVSNT.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50990
diff
changeset
|
481 (cvs-or (cvs-match " *Expansion option:.*") t) ;Optional CVSNT thingie. |
3c7354593959
(cvs-parse-status): Ignore extra fields from CVSNT.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50990
diff
changeset
|
482 (cvs-or (cvs-match " *Commit Identifier:.*") t) ;Optional CVSNT thingie. |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
483 (cvs-or |
51736
3c7354593959
(cvs-parse-status): Ignore extra fields from CVSNT.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50990
diff
changeset
|
484 (and ;; Sometimes those fields are missing. |
3c7354593959
(cvs-parse-status): Ignore extra fields from CVSNT.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50990
diff
changeset
|
485 (cvs-match " *Sticky Tag:[ \t]*\\(.*\\)$") ; FIXME: use it. |
3c7354593959
(cvs-parse-status): Ignore extra fields from CVSNT.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50990
diff
changeset
|
486 (cvs-match " *Sticky Date:[ \t]*\\(.*\\)$") ; FIXME: use it. |
3c7354593959
(cvs-parse-status): Ignore extra fields from CVSNT.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50990
diff
changeset
|
487 (cvs-match " *Sticky Options:[ \t]*\\(.*\\)$")) ; FIXME: use it. |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
488 t) |
51736
3c7354593959
(cvs-parse-status): Ignore extra fields from CVSNT.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50990
diff
changeset
|
489 (cvs-or (cvs-match " *Merge From:.*") t) ;Optional CVSNT thingie. |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
490 (cvs-match "$") |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
491 ;; ignore the tags-listing in the case of `status -v' |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
492 (cvs-or (cvs-match " *Existing Tags:\n\\(\t.*\n\\)*$") t) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
493 (cvs-parsed-fileinfo type path nil |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
494 :base-rev base-rev |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
495 :head-rev head-rev)))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
496 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
497 (defun cvs-parse-commit () |
56721
fcf62a4ca08d
(cvs-parse-table, cvs-parse-commit): Try to adapt to
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
498 (let (path file base-rev subtype) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
499 (cvs-or |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
500 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
501 (and |
56721
fcf62a4ca08d
(cvs-parse-table, cvs-parse-commit): Try to adapt to
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
502 (cvs-or |
fcf62a4ca08d
(cvs-parse-table, cvs-parse-commit): Try to adapt to
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
503 (cvs-match "\\(Checking in\\|Removing\\) \\(.*\\);$" (path 2)) |
fcf62a4ca08d
(cvs-parse-table, cvs-parse-commit): Try to adapt to
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
504 t) |
fcf62a4ca08d
(cvs-parse-table, cvs-parse-commit): Try to adapt to
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
505 (cvs-match ".*,v <-- \\(.*\\)$" (file 1)) |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
506 (cvs-or |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
507 ;; deletion |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
508 (cvs-match "new revision: delete; previous revision: \\([0-9.]*\\)$" |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
509 (subtype 'REMOVED) (base-rev 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
510 ;; addition |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
511 (cvs-match "initial revision: \\([0-9.]*\\)$" |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
512 (subtype 'ADDED) (base-rev 1)) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
513 ;; update |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
514 (cvs-match "new revision: \\([0-9.]*\\); previous revision: .*$" |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
515 (subtype 'COMMITTED) (base-rev 1))) |
56721
fcf62a4ca08d
(cvs-parse-table, cvs-parse-commit): Try to adapt to
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
516 (cvs-or (cvs-match "done$") t) |
57462
c6d72c23a106
(cvs-parse-commit): Fix parsing for new commit message.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
56721
diff
changeset
|
517 ;; In cvs-1.12.9 commit messages have been changed and became |
c6d72c23a106
(cvs-parse-commit): Fix parsing for new commit message.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
56721
diff
changeset
|
518 ;; ambiguous. More specifically, the `path' above is not given. |
c6d72c23a106
(cvs-parse-commit): Fix parsing for new commit message.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
56721
diff
changeset
|
519 ;; We assume here that in future releases the corresponding info will |
c6d72c23a106
(cvs-parse-commit): Fix parsing for new commit message.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
56721
diff
changeset
|
520 ;; be put into `file'. |
39391
81cef0e070fa
(cvs-parse-commit): Remove the temp files used by VC.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
521 (progn |
81cef0e070fa
(cvs-parse-commit): Remove the temp files used by VC.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
522 ;; Try to remove the temp files used by VC. |
57462
c6d72c23a106
(cvs-parse-commit): Fix parsing for new commit message.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
56721
diff
changeset
|
523 (vc-delete-automatic-version-backups (expand-file-name (or path file))) |
39391
81cef0e070fa
(cvs-parse-commit): Remove the temp files used by VC.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
524 ;; it's important here not to rely on the default directory management |
81cef0e070fa
(cvs-parse-commit): Remove the temp files used by VC.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
525 ;; because `cvs commit' might begin by a series of Examining messages |
81cef0e070fa
(cvs-parse-commit): Remove the temp files used by VC.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
526 ;; so the processing of the actual checkin messages might begin with |
81cef0e070fa
(cvs-parse-commit): Remove the temp files used by VC.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
527 ;; a `current-dir' set to something different from "" |
56721
fcf62a4ca08d
(cvs-parse-table, cvs-parse-commit): Try to adapt to
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
528 (cvs-parsed-fileinfo (cons 'UP-TO-DATE subtype) |
57462
c6d72c23a106
(cvs-parse-commit): Fix parsing for new commit message.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
56721
diff
changeset
|
529 (or path file) 'trust |
39391
81cef0e070fa
(cvs-parse-commit): Remove the temp files used by VC.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
38422
diff
changeset
|
530 :base-rev base-rev))) |
49597
e88404e8f2cf
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
47210
diff
changeset
|
531 |
28088
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
532 ;; useless message added before the actual addition: ignored |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
533 (cvs-match "RCS file: .*\ndone$")))) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
534 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
535 |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
536 (provide 'pcvs-parse) |
b442dfc3cef0
*** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
537 |
56721
fcf62a4ca08d
(cvs-parse-table, cvs-parse-commit): Try to adapt to
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
538 ;; arch-tag: 35418375-1a23-40a0-957d-96b0262f91d6 |
38422
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
37337
diff
changeset
|
539 ;;; pcvs-parse.el ends here |