File: pcl-cvs-format.diff

package info (click to toggle)
emacs21 21.4a%2B1-3etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 59,104 kB
  • ctags: 58,909
  • sloc: lisp: 493,229; ansic: 237,175; xml: 4,262; sh: 4,109; makefile: 2,479; perl: 1,069; cs: 776; asm: 254; csh: 9; sed: 4
file content (61 lines) | stat: -rw-r--r-- 2,750 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
* Emacs can now handle the output of newer versions of various CVS commands.
  Patch: pcl-cvs-format.diff
  Provded-by: Romain Francoise <rfrancoise@debian.org>
  Author: Stefan Monnier
  Date: Mon, 24 Jan 2005 19:49:21 +0100
  Status: has been fixed upstream

diff -urNad emacs21-21.3+1/lisp/pcvs-parse.el /tmp/dpep.SXISqR/emacs21-21.3+1/lisp/pcvs-parse.el
--- emacs21-21.3+1/lisp/pcvs-parse.el	2001-09-24 18:39:23.000000000 +0200
+++ /tmp/dpep.SXISqR/emacs21-21.3+1/lisp/pcvs-parse.el	2005-01-24 19:15:31.000000000 +0100
@@ -351,7 +351,7 @@
        ;; File you removed still exists.  Ignore (will be noted as removed).
        (cvs-match ".* should be removed and is still there$")
        ;; just a note
-       (cvs-match "use '.+ commit' to \\sw+ th\\sw+ files? permanently$")
+       (cvs-match "use ['`].+ commit' to \\sw+ th\\sw+ files? permanently$")
        ;; [add,status] followed by a more complete status description anyway
        (cvs-match "nothing known about .*$")
        ;; [update] problem with patch
@@ -467,12 +467,14 @@
 			  :head-rev head-rev))))
 
 (defun cvs-parse-commit ()
-  (let (path base-rev subtype)
+  (let (path file base-rev subtype)
     (cvs-or
 
      (and
-      (cvs-match "\\(Checking in\\|Removing\\) \\(.*\\);$" (path 2))
-      (cvs-match ".*,v  <--  .*$")
+      (cvs-or
+       (cvs-match "\\(Checking in\\|Removing\\) \\(.*\\);$" (path 2))
+       t)
+      (cvs-match ".*,v  <--  \\(.*\\)$" (file 1))
       (cvs-or
        ;; deletion
        (cvs-match "new revision: delete; previous revision: \\([0-9.]*\\)$"
@@ -483,15 +485,20 @@
        ;; update
        (cvs-match "new revision: \\([0-9.]*\\); previous revision: .*$"
 		  (subtype 'COMMITTED) (base-rev 1)))
-      (cvs-match "done$")
+      (cvs-or (cvs-match "done$") t)
+      ;; In cvs-1.12.9 commit messages have been changed and became
+      ;; ambiguous.  More specifically, the `path' above is not given.
+      ;; We assume here that in future releases the corresponding info will
+      ;; be put into `file'.
       (progn
 	;; Try to remove the temp files used by VC.
-	(vc-delete-automatic-version-backups (expand-file-name path))
+	(vc-delete-automatic-version-backups (expand-file-name (or path file)))
 	;; it's important here not to rely on the default directory management
 	;; because `cvs commit' might begin by a series of Examining messages
 	;; so the processing of the actual checkin messages might begin with
 	;; a `current-dir' set to something different from ""
-	(cvs-parsed-fileinfo (cons 'UP-TO-DATE subtype) path 'trust
+	(cvs-parsed-fileinfo (cons 'UP-TO-DATE subtype)
+			     (or path file) 'trust
 			     :base-rev base-rev)))
      
      ;; useless message added before the actual addition: ignored