changeset 71346:1405144e8610

(cvs-retrieve-revision): Use decode-coding-inserted-region.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 14 Jun 2006 15:38:10 +0000
parents 50899a9ba412
children 27a7e14de688
files lisp/ChangeLog lisp/pcvs.el
diffstat 2 files changed, 25 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Jun 14 14:29:47 2006 +0000
+++ b/lisp/ChangeLog	Wed Jun 14 15:38:10 2006 +0000
@@ -1,3 +1,7 @@
+2006-06-14  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* pcvs.el (cvs-retrieve-revision): Use decode-coding-inserted-region.
+
 2006-06-13  Martin J. Reed  <mjreed@essex.ac.uk>  (tiny change)
 
 	* net/ldap.el (ldap-ldapsearch-args): Default to SASL search.
@@ -14,7 +18,7 @@
 
 2006-06-11  Robert J. Chassell  <bob@rattlesnake.com>
 
-	* textmodes/page-ext.el (pages-directory-for-addresses): 
+	* textmodes/page-ext.el (pages-directory-for-addresses):
 	Including `pages-directory-address-mode' in the function results
 	in the message "Buffer in which pages were found is deleted".
 
@@ -92,8 +96,7 @@
 
 2006-06-06  Jesper Harder  <harder@phys.au.dk>
 
-	* ediff-diff.el (ediff-test-utility): Protect against
-	file-error.
+	* ediff-diff.el (ediff-test-utility): Protect against file-error.
 
 2006-06-06  Chong Yidong  <cyd@stupidchicken.com>
 
@@ -125,7 +128,7 @@
 	cookies but no other non-empty fields.
 	(org-set-tags): Allow groups of mutually exclusive tags.
 	(org-cmp-time): Sort 24:21 before items without time.
-	(org-get-time-of-day): Fixed the interpretation of 12pm and 12am.
+	(org-get-time-of-day): Fix the interpretation of 12pm and 12am.
 	(org-open-at-point): Require double colon also for numbers.
 
 2006-06-06  Kim F. Storm  <storm@cua.dk>
@@ -165,8 +168,8 @@
 
 2006-06-05  Kenichi Handa  <handa@m17n.org>
 
-	* international/mule.el (find-auto-coding): Handle
-	enable-character-translation in file header.
+	* international/mule.el (find-auto-coding):
+	Handle enable-character-translation in file header.
 
 2006-06-04  Kim F. Storm  <storm@cua.dk>
 
@@ -235,8 +238,8 @@
 	as well as `coding'.
 	(hack-local-variables): Likewise.
 
-	* international/mule.el (enable-character-translation): Put
-	permanent-local and safe-local-variable properties.
+	* international/mule.el (enable-character-translation):
+	Put permanent-local and safe-local-variable properties.
 	(find-auto-coding): Handle char-trans: tag.
 
 2006-06-02  Juri Linkov  <juri@jurta.org>
--- a/lisp/pcvs.el	Wed Jun 14 14:29:47 2006 +0000
+++ b/lisp/pcvs.el	Wed Jun 14 15:38:10 2006 +0000
@@ -1723,16 +1723,22 @@
 	  (message "Retrieving revision %s..." rev)
 	  ;; Discard stderr output to work around the CVS+SSH+libc
 	  ;; problem when stdout and stderr are the same.
-	  (let ((res (apply 'call-process cvs-program nil '(t nil) nil
-			    "-q" "update" "-p"
-			    ;; If `rev' is HEAD, don't pass it at all:
-			    ;; the default behavior is to get the head
-			    ;; of the current branch whereas "-r HEAD"
-			    ;; stupidly gives you the head of the trunk.
-			    (append (unless (equal rev "HEAD") (list "-r" rev))
-				    (list file)))))
+	  (let ((res
+                 (let ((coding-system-for-read 'binary))
+                   (apply 'call-process cvs-program nil '(t nil) nil
+                          "-q" "update" "-p"
+                          ;; If `rev' is HEAD, don't pass it at all:
+                          ;; the default behavior is to get the head
+                          ;; of the current branch whereas "-r HEAD"
+                          ;; stupidly gives you the head of the trunk.
+                          (append (unless (equal rev "HEAD") (list "-r" rev))
+                                  (list file))))))
 	    (when (and res (not (and (equal 0 res))))
 	      (error "Something went wrong retrieving revision %s: %s" rev res))
+            ;; Figure out the encoding used and decode the byte-sequence
+            ;; into a sequence of chars.
+            (decode-coding-inserted-region
+             (point-min) (point-max) file t nil nil t)
 	    (set-buffer-modified-p nil)
 	    (let ((buffer-file-name (expand-file-name file)))
 	      (after-find-file))