changeset 95042:0f15001fd142

Extract and display the CVS repository.
author Eric S. Raymond <esr@snark.thyrsus.com>
date Fri, 16 May 2008 09:23:22 +0000
parents c3e4a8a23b8c
children 4a0b47d5274d
files lisp/ChangeLog lisp/vc-cvs.el
diffstat 2 files changed, 22 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri May 16 08:53:51 2008 +0000
+++ b/lisp/ChangeLog	Fri May 16 09:23:22 2008 +0000
@@ -3,6 +3,8 @@
 	* vc.el: Remove my analysis of SCCS/RCS concurrency issues from
 	the end of the file, it was good work at one time but has been
 	stale since 1995 and may now be actively misleading.
+	* vc-cvs.el (vc-cvs-status-extra-headers): Extract and display the
+	CVS repository.
 
 2008-05-16  Juanma Barranquero  <lekktu@gmail.com>
 
--- a/lisp/vc-cvs.el	Fri May 16 08:53:51 2008 +0000
+++ b/lisp/vc-cvs.el	Fri May 16 09:23:22 2008 +0000
@@ -922,17 +922,26 @@
    `(vc-cvs-after-dir-status (quote ,update-function))))
 
 (defun vc-cvs-status-extra-headers (dir)
-  (concat
-   ;; FIXME: see how PCL-CVS gets the data to print all these
-   (propertize "Module     : " 'face 'font-lock-type-face)
-   (propertize "ADD CODE TO PRINT THE MODULE\n"
-	       'face 'font-lock-warning-face)
-   (propertize "Repository : " 'face 'font-lock-type-face)
-   (propertize "ADD CODE TO PRINT THE REPOSITORY\n"
-	       'face 'font-lock-warning-face)
-   (propertize "Branch     : " 'face 'font-lock-type-face)
-   (propertize "ADD CODE TO PRINT THE BRANCH NAME\n"
-	       'face 'font-lock-warning-face)))
+  (let ((repo
+	 (condition-case nil 
+	     (save-excursion 
+	       (set-buffer (find-file-noselect "CVS/Root" t))
+	       (and (looking-at ":ext:") (delete-char 5))
+	       (buffer-string))
+	   nil)))
+    (concat
+     ;; FIXME: see how PCL-CVS gets the data to print all these
+     (propertize "Module     : " 'face 'font-lock-type-face)
+     (propertize "ADD CODE TO PRINT THE MODULE\n"
+		 'face 'font-lock-warning-face)
+     (cond (repo
+	    (concat
+	      (propertize "Repository : " 'face 'font-lock-type-face)
+	      (propertize repo 'face 'font-lock-warning-face)))
+	   (t ""))
+     (propertize "Branch     : " 'face 'font-lock-type-face)
+     (propertize "ADD CODE TO PRINT THE BRANCH NAME\n"
+		 'face 'font-lock-warning-face))))
 
 (defun vc-cvs-get-entries (dir)
   "Insert the CVS/Entries file from below DIR into the current buffer.