From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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:50:30 +0200 Message-ID: <83va1vr41l.fsf@gnu.org> References: <84d0o4zoc9.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="148036"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34350@debbugs.gnu.org, vincent.belaiche@gmail.com To: Stefan Monnier , Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 07 16:51:27 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1grlxV-000cCp-Je for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Feb 2019 16:51:25 +0100 Original-Received: from localhost ([127.0.0.1]:42393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grlxU-0001UF-JM for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Feb 2019 10:51:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grlx9-0001Mj-BR for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2019 10:51:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grlx8-0004Hq-Jw for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2019 10:51:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39268) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grlx8-0004Ha-Ex for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2019 10:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1grlx8-0002xG-8j for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2019 10:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Feb 2019 15:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34350 X-GNU-PR-Package: emacs Original-Received: via spool by 34350-submit@debbugs.gnu.org id=B34350.154955466111351 (code B ref 34350); Thu, 07 Feb 2019 15:51:02 +0000 Original-Received: (at 34350) by debbugs.gnu.org; 7 Feb 2019 15:51:01 +0000 Original-Received: from localhost ([127.0.0.1]:38549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1grlx6-0002x1-PA for submit@debbugs.gnu.org; Thu, 07 Feb 2019 10:51:01 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41763) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1grlx3-0002wl-8l for 34350@debbugs.gnu.org; Thu, 07 Feb 2019 10:50:58 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54114) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grlwj-0003w7-Lo; Thu, 07 Feb 2019 10:50:40 -0500 Original-Received: from [176.228.60.248] (port=3293 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1grlwj-0005U4-2B; Thu, 07 Feb 2019 10:50:37 -0500 In-reply-to: <84d0o4zoc9.fsf@gmail.com> (message from Vincent =?UTF-8?Q?Bela=C3=AFche?= on Wed, 06 Feb 2019 20:52:38 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:155229 Archived-At: Stefan, Dmitry, can I have your attention please? I think there's a real mess regarding encoding and decoding stuff in vc-find-revision and its backend implementations. For some reason, several backend implementations bind both coding-system-for-read and coding-system-for-write to no-conversion when they invoke the VCS to produce a file at a certain revision. Here's an example from vc-git.el: (defun vc-git-find-revision (file rev buffer) (let* (process-file-side-effects (coding-system-for-read 'binary) (coding-system-for-write 'binary) (fullname (let ((fn (vc-git--run-command-string file "ls-files" "-z" "--full-name" "--"))) ;; ls-files does not return anything when looking for a ;; revision of a file that has been renamed or removed. (if (string= fn "") (file-relative-name file (vc-git-root default-directory)) (substring fn 0 -1))))) (vc-git-command buffer 0 nil "cat-file" "blob" (concat (if rev rev "HEAD") ":" fullname)))) Any idea why it insists on disabling code-conversions? More generally, the find-revision method is documented as Fetch revision REV of file FILE and put it into BUFFER. There's nothing here that hints that the resulting buffer will not look like any visited file, i.e. after decoding. Am I missing something? In addition to producing undecoded buffer, these bindings have the adverse effect of forcing Emacs not to encode command-line arguments we pass to the VCS, which is the immediate cause for the current bug. It is my impression that one of the backends did these bindings for some reason, and then others simply copy-pasted from it. I'd like to fix this mess, if possible. Thanks in advance for any insights.