From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.bugs Subject: bug#4451: 23.1; EOL problems with vc-diff and cygwin Date: Mon, 05 Oct 2009 18:07:53 +0200 Message-ID: <20091005180753.1mcmt2jzswoko048@imap.uni-ulm.de> References: <87skemzrre.fsf@marauder.physik.uni-ulm.de> <83r5u6wqvs.fsf@gnu.org> <20090917162612.l0stf7ln28gc4s8o@imap.uni-ulm.de> <20090918132946.w1z9vf7py8ow8ggo@imap.uni-ulm.de> <87skec9t1k.fsf@marauder.physik.uni-ulm.de> <83eipuu9dz.fsf@gnu.org> <87iqf68611.fsf@marauder.physik.uni-ulm.de> <834oqqt63w.fsf@gnu.org> Reply-To: Reiner Steib , 4451@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1254760982 6944 80.91.229.12 (5 Oct 2009 16:43:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Oct 2009 16:43:02 +0000 (UTC) Cc: 4451@emacsbugs.donarmstrong.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 05 18:42:58 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MuqeB-0004lt-50 for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Oct 2009 18:42:51 +0200 Original-Received: from localhost ([127.0.0.1]:51685 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MuqeB-0002j8-30 for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Oct 2009 12:42:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MuqPA-0001dJ-HE for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2009 12:27:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MuqP4-0001bV-9e for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2009 12:27:19 -0400 Original-Received: from [199.232.76.173] (port=45084 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MuqP1-0001b3-5f for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2009 12:27:11 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:35317) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MuqP0-0005L7-Ol for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2009 12:27:11 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n95GR8iE031738; Mon, 5 Oct 2009 09:27:08 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n95GF8LP029466; Mon, 5 Oct 2009 09:15:08 -0700 Resent-Date: Mon, 5 Oct 2009 09:15:08 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Reiner Steib Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Mon, 05 Oct 2009 16:15:08 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4451 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4451-submit@emacsbugs.donarmstrong.com id=B4451.125475887728229 (code B ref 4451); Mon, 05 Oct 2009 16:15:08 +0000 Original-Received: (at 4451) by emacsbugs.donarmstrong.com; 5 Oct 2009 16:07:57 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail.uni-ulm.de (mail.uni-ulm.de [134.60.1.11]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n95G7tDM028223 for <4451@emacsbugs.donarmstrong.com>; Mon, 5 Oct 2009 09:07:57 -0700 Original-Received: from poseidon.rz.uni-ulm.de (localhost [127.0.0.1]) by smtp.uni-ulm.de (8.14.2/8.14.2) with ESMTP id n95G7srF014586; Mon, 5 Oct 2009 18:07:54 +0200 (MEST) Original-Received: (from cyrus@localhost) by poseidon.rz.uni-ulm.de (8.14.2/8.14.2/Submit) id n95G7rkC014568; Mon, 5 Oct 2009 18:07:53 +0200 (MEST) Original-Received: from gate-6.ruv.de (gate-6.ruv.de [195.145.180.106]) by imap.uni-ulm.de (Horde MIME library) with HTTP; Mon, 05 Oct 2009 18:07:53 +0200 In-Reply-To: <834oqqt63w.fsf@gnu.org> Content-Disposition: inline User-Agent: Internet Messaging Program (IMP) H3 (4.1.5) X-Virus-Scanned: by amavisd-new X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 05 Oct 2009 12:27:19 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31704 Archived-At: Eli Zaretskii wrote: > What I'd like to see is where in Emacs sources we examine the output > we get from Diff, and where and why we err as to what EOL format > should be used for decoding that output. `vc-coding-system-for-diff' is called 2 times when I do `C-x v =3D' 1) vc-coding-system-for-diff("c:/Users/x123456/tmp/check-out/K3.xml") vc-diff-internal(t (CVS ("c:/Users/x123456/tmp/check-out/K3.xml")) =20 nil nil t) vc-diff(nil t) call-interactively(vc-diff nil nil) 2) vc-coding-system-for-diff("c:/Users/x123456/tmp/check-out/K3.xml") vc-cvs-diff(("c:/Users/x123456/tmp/check-out/K3.xml") nil nil "*vc-diff*"= ) apply(vc-cvs-diff (("c:/Users/x123456/tmp/check-out/K3.xml") nil =20 nil "*vc-diff*")) vc-call-backend(CVS diff ("c:/Users/x123456/tmp/check-out/K3.xml") =20 nil nil "*vc-diff*") vc-diff-internal(t (CVS ("c:/Users/x123456/tmp/check-out/K3.xml")) =20 nil nil t) vc-diff(nil t) call-interactively(vc-diff nil nil) > One possibility for this mistake might be that Diff produces > inconsistent EOL format in its output, for example if Diff or its VC > front-end outputs some headers that have Unix EOLs and then the actual > diffs with DOS EOLs. The repository file (K3.xml,v) has Unix EOLs. But if I do a fresh checkout, I get a file K3.xml with DOS EOLs (I think this is the usual behavoir of the Windows cvs binaries[1] for text files unless you specify the switch "-ko"). However, in my workflow I overwrite the file with a Unix EOL file (exported from some application), do modifications, diffs and check it in. Probably this conversion is also the reason that "cvs diff --binary" outputs "^M^M$" for the old file and "^M$" for the new file. "cvs diff" outputs consitent DOS EOLs (both diff markers and the text): $ cvs diff SK3.xml | cat --show-all | grep -F -v '^M' | wc -l > Another possibility is that somewhere along the chain of processing > the output, we force EOL conversion to be Unix-style, instead of > detecting EOLs dynamically, or maybe even forcing it to DOS (if we > have clear evidence for doing the latter). `vc-coding-system-for-diff' returns `utf-8-unix' in both calls. Stefan Monnier wrote: > Could it be that the RCS files accessed this way get an accidental > LF->CRLF conversion done by the network-file-system? > Seems pretty unlikely. But could you try and copy (part of) the > repository to a local directory and try the operation again, just to > rule out any funny business from this side? I copied the repository file to a local drive and also used local drive working copy (drive c:). But that doesn't make any difference. Bye, Reiner [1] $ cvs --version Concurrent Versions System (CVS) 1.11.22 (client) Copyright (C) 2006 Free Software Foundation, Inc.