[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v
From: |
Eric S. Raymond |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v |
Date: |
Fri, 16 May 2008 19:15:35 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Eric S. Raymond <esr> 08/05/16 19:15:28
Index: vc-cvs.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc-cvs.el,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -b -r1.135 -r1.136
--- vc-cvs.el 16 May 2008 09:30:17 -0000 1.135
+++ vc-cvs.el 16 May 2008 19:15:25 -0000 1.136
@@ -921,27 +921,50 @@
(vc-exec-after
`(vc-cvs-after-dir-status (quote ,update-function))))
+(defun vc-cvs-file-to-string (file)
+ "Read the content of FILE and return it as a string."
+ (condition-case nil
+ (with-temp-buffer
+ (insert-file-contents file)
+ (goto-char (point-min))
+ (buffer-substring (point) (point-max)))
+ (file-error nil)))
+
(defun vc-cvs-status-extra-headers (dir)
+ "Extract and represent per-directory properties of a CVS working copy."
(let ((repo
(condition-case nil
- (save-excursion
- (set-buffer (find-file-noselect "CVS/Root" t))
+ (with-temp-buffer
+ (insert-file-contents "CVS/Root")
+ (goto-char (point-min))
(and (looking-at ":ext:") (delete-char 5))
- (prog1 (buffer-string) (not-modified) (kill-buffer nil)))
- nil)))
+ (buffer-substring (point) (point-max)))
+ (file-error nil)))
+ (module
+ (condition-case nil
+ (with-temp-buffer
+ (insert-file-contents "CVS/Repository")
+ (goto-char (point-min))
+ (re-search-forward "[^/]*" nil t)
+ (concat (match-string 0) "\n"))
+ (file-error 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 (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-warning-face)))
+ (propertize "Repository: " 'face 'font-lock-type-face)
+ (propertize repo 'face 'font-lock-variable-name-face)))
(t ""))
- (propertize "Branch : " 'face 'font-lock-type-face)
- (propertize "ADD CODE TO PRINT THE BRANCH NAME\n"
- 'face 'font-lock-warning-face))))
+ ;; 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)
+ ;;(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.
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v, (continued)
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v, Eric S. Raymond, 2008/05/01
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v, Eric S. Raymond, 2008/05/02
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v, Eric S. Raymond, 2008/05/02
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v, Glenn Morris, 2008/05/06
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v, Eric S. Raymond, 2008/05/07
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v, Eric S. Raymond, 2008/05/09
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v, Eric S. Raymond, 2008/05/10
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v, Eric S. Raymond, 2008/05/15
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v, Eric S. Raymond, 2008/05/16
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v, Eric S. Raymond, 2008/05/16
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v,
Eric S. Raymond <=
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v, Dan Nicolaescu, 2008/05/26
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v, Stefan Monnier, 2008/05/30
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v, Dan Nicolaescu, 2008/05/31
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v, Dan Nicolaescu, 2008/05/31
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v, Dan Nicolaescu, 2008/05/31