changeset 99363:e48aaf88b6e7

* vc-cvs.el (vc-cvs-dir-extra-headers): Add tag name to header. * vc-dir.el (vc-dir-headers): Order headers as in PCL-CVS.
author Nick Roberts <nickrob@snap.net.nz>
date Tue, 04 Nov 2008 07:27:26 +0000
parents b162bc232856
children 5843a66ad69e
files lisp/vc-cvs.el
diffstat 1 files changed, 18 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/vc-cvs.el	Tue Nov 04 07:27:15 2008 +0000
+++ b/lisp/vc-cvs.el	Tue Nov 04 07:27:26 2008 +0000
@@ -993,7 +993,7 @@
 	       (insert-file-contents "CVS/Root")
 	       (goto-char (point-min))
 	       (and (looking-at ":ext:") (delete-char 5))
-	       (buffer-substring (point) (1- (point-max))))
+	       (concat (buffer-substring (point) (1- (point-max))) "\n"))
 	   (file-error nil)))
 	(module
 	 (condition-case nil
@@ -1004,14 +1004,27 @@
 	       (concat (buffer-substring (point-min) (point)) "\n"))
 	   (file-error nil))))
     (concat
+     (cond (repo
+	    (concat (propertize "Repository : " 'face 'font-lock-type-face)
+                    (propertize repo 'face 'font-lock-variable-name-face)))
+	   (t ""))
      (cond (module
 	    (concat (propertize "Module     : " 'face 'font-lock-type-face)
                     (propertize module 'face 'font-lock-variable-name-face)))
 	   (t ""))
-     (cond (repo
-	    (concat (propertize "Repository : " 'face 'font-lock-type-face)
-                    (propertize repo 'face 'font-lock-variable-name-face)))
-	   (t ""))
+     (if (file-readable-p "CVS/Tag")
+	 (let ((tag (vc-cvs-file-to-string "CVS/Tag")))
+	   (cond
+	    ((string-match "\\`T" tag)
+	     (concat (propertize "Tag        : " 'face 'font-lock-type-face)
+		     (propertize (substring tag 1)
+				 'face 'font-lock-variable-name-face)))
+	    ((string-match "\\`D" tag)
+	     (concat (propertize "Date       : " 'face 'font-lock-type-face)
+		     (propertize (substring tag 1)
+				 'face 'font-lock-variable-name-face)))
+	    (t ""))))
+
      ;; In CVS, branch is a per-file property, not a per-directory property.
      ;; We can't really do this here without making dangerous assumptions.
      ;;(propertize "Branch:     " 'face 'font-lock-type-face)