aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/vc-cvs.el
diff options
context:
space:
mode:
authorAndrĂ© Spiegel <[email protected]>2003-04-05 15:51:14 +0000
committerAndrĂ© Spiegel <[email protected]>2003-04-05 15:51:14 +0000
commit666721a688ba7d8d9640682053e3b528b6660a97 (patch)
tree35f7ce80908c537db2ef6f4b4b8743aa592cd3e9 /lisp/vc-cvs.el
parent16524b9bcb60c6fe683b8143220b9bec0ced3995 (diff)
(vc-cvs-get-entries): New function that uses the right coding system for
accessing CVS/Entries. (vc-cvs-registered, vc-cvs-dir-state-heuristic): Use it.
Diffstat (limited to 'lisp/vc-cvs.el')
-rw-r--r--lisp/vc-cvs.el16
1 files changed, 12 insertions, 4 deletions
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el
index 9d1674c149..6d072d0402 100644
--- a/lisp/vc-cvs.el
+++ b/lisp/vc-cvs.el
@@ -5,7 +5,7 @@
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <[email protected]>
-;; $Id: vc-cvs.el,v 1.51 2003/02/17 08:11:13 spiegel Exp $
+;; $Id: vc-cvs.el,v 1.52 2003/03/27 22:38:38 schwab Exp $
;; This file is part of GNU Emacs.
@@ -169,7 +169,7 @@ See also variable `vc-cvs-sticky-date-format-string'."
(case-fold-search nil))
(if (file-readable-p (expand-file-name "CVS/Entries" dirname))
(with-temp-buffer
- (vc-insert-file (expand-file-name "CVS/Entries" dirname))
+ (vc-cvs-get-entries dirname)
(goto-char (point-min))
(cond
((re-search-forward
@@ -781,7 +781,7 @@ essential information."
(defun vc-cvs-dir-state-heuristic (dir)
"Find the CVS state of all files in DIR, using only local information."
(with-temp-buffer
- (vc-insert-file (expand-file-name "CVS/Entries" dir))
+ (vc-cvs-get-entries dir)
(goto-char (point-min))
(while (not (eobp))
;; CVS-removed files are not taken under VC control.
@@ -791,7 +791,15 @@ essential information."
(vc-cvs-parse-entry file t))))
(forward-line 1))))
-
+(defun vc-cvs-get-entries (dir)
+ "Insert the CVS/Entries file from below DIR into the current buffer.
+This function ensures that the correct coding system is used for that,
+which may not be the one that is used for the files' contents.
+CVS/Entries should only be accessed through this function."
+ (let ((coding-system-for-read (or file-name-coding-system
+ default-file-name-coding-system)))
+ (vc-insert-file (expand-file-name "CVS/Entries" dir))))
+
(defun vc-cvs-valid-symbolic-tag-name-p (tag)
"Return non-nil if TAG is a valid symbolic tag name."
;; According to the CVS manual, a valid symbolic tag must start with