unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Vincent Belaïche" <vincent.belaiche@gmail.com>
Cc: 34350@debbugs.gnu.org
Subject: bug#34350: 27.0.50; ediff-revision broken with SVN backend + non ascii chars both in directory and in filename
Date: Thu, 07 Feb 2019 17:41:53 +0200	[thread overview]
Message-ID: <83wombr4fy.fsf@gnu.org> (raw)
In-Reply-To: <84d0o4zoc9.fsf@gmail.com> (message from Vincent Belaïche on Wed, 06 Feb 2019 20:52:38 +0100)

> From: Vincent Belaïche <vincent.belaiche@gmail.com>
> Date: Wed, 06 Feb 2019 20:52:38 +0100
> Cc: Vincent Belaïche <vincent.belaiche@gmail.com>
> 
> After some debugging, I realized that the whole thing executes with
> default-directory set to "c:/blah/blah/blah/ê/trunk/" the following
> two commands:
> 
>  (process-file "svn" nil t nil "--non-interactive" "status" "-v" "ê.tex")
> 
> and then:
> 
>  (process-file "svn" nil t nil "--non-interactive" "cat" "ê.tex")
> 
> The first command works quite fine, but the second one fails, and having
> a look info the " *temp*" buffer, I saw that svn angrilly barks with
> some error message like this one:
> 
> --8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8----
> svn: warning: W200005: 'C:\blah\blah\blah\\trunk\ª.tex' is not under version control
> svn: E200009: Could not cat all targets because some targets are not versioned
> svn: E200009: Illegal target for the requested operation
> --8<----8<----8<----8<----8<--  end  -->8---->8---->8---->8---->8----
> 
> looking more carefully at things, and having inspected the C code of
> function call-process, I realized that the variable
> coding-system-for-write has some importance, and tracing this I realized
> that when the first svn command is called the variable
> coding-system-for-write is nil, while when the second svn command is
> called it is 'no-conversion, which makes it fail.

Ouch!  There's a real mess in vc-find-revision and its backend
implementations wrt encoding and decoding.  I will address the general
problem separately, but for now please see if the patch below fixes
the immediate problem with SVN.

> OK, I know that some Askese people will probably say something like
> « don't use non-ASCII characters in file-names » which is IMHO quite a
> ASCII-centric way of thinking, so just in case, my answer is « Î wîll
> ùse nôn-ÀSCÎÎ çhærâctèrs névœrthelèss, because Î àm mysèlf a nôn-ASCII
> pèrsôn ! » ;-)

Is this part relevant?  You didn't really think we refuse to support
non-ASCII file names, did you?

diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 9925196..326284f 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1966,10 +1966,13 @@ vc-find-revision
 	(with-current-buffer filebuf
 	  (let ((failed t))
 	    (unwind-protect
-		(let ((coding-system-for-read 'no-conversion)
-		      (coding-system-for-write 'no-conversion))
+		(let ((coding-system-for-read 'no-conversion))
 		  (with-temp-file filename
 		    (let ((outbuf (current-buffer)))
+                      ;; We will read the backend's output with no
+                      ;; conversions, so we should also save the
+                      ;; temporary file with no encoding conversions.
+                      (setq buffer-file-coding-system 'no-conversion)
 		      ;; Change buffer to get local value of
 		      ;; vc-checkout-switches.
 		      (with-current-buffer filebuf





  reply	other threads:[~2019-02-07 15:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06 19:52 bug#34350: 27.0.50; ediff-revision broken with SVN backend + non ascii chars both in directory and in filename Vincent Belaïche
2019-02-07 15:41 ` Eli Zaretskii [this message]
2019-02-07 22:27   ` Vincent Belaïche
2019-02-08  7:02     ` Eli Zaretskii
2019-02-07 15:50 ` Eli Zaretskii
2019-02-08 16:08   ` Stefan Monnier
2019-02-08 21:18     ` Eli Zaretskii
2019-02-08 21:50       ` Stefan Monnier
2019-02-08 22:10         ` Eli Zaretskii
2019-02-08 23:03           ` Stefan Monnier
2019-02-09  9:01             ` Eli Zaretskii
2019-02-09 13:12               ` Stefan Monnier
2019-02-09 13:42                 ` Eli Zaretskii
2019-02-09 14:03                   ` Stefan Monnier
2019-02-11 21:20         ` Vincent Belaïche
2019-02-11 22:00           ` Stefan Monnier
2019-02-08 17:25   ` Dmitry Gutov
2019-02-08 21:45     ` Eli Zaretskii
2019-02-09  7:58       ` Dmitry Gutov
2019-02-09  8:23         ` Eli Zaretskii
2019-02-10 19:52         ` Vincent Belaïche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83wombr4fy.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=34350@debbugs.gnu.org \
    --cc=vincent.belaiche@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).