bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#4451: 23.1; EOL problems with vc-diff and cygwin


From: Stefan Monnier
Subject: bug#4451: 23.1; EOL problems with vc-diff and cygwin
Date: Mon, 05 Oct 2009 14:45:43 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

> `vc-coding-system-for-diff' is called 2 times when I do `C-x v ='

> 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"))  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  nil
> "*vc-diff*"))
>   vc-call-backend(CVS diff ("c:/Users/x123456/tmp/check-out/K3.xml")  nil
> nil "*vc-diff*")
>   vc-diff-internal(t (CVS ("c:/Users/x123456/tmp/check-out/K3.xml"))  nil
> nil t)
>   vc-diff(nil t)
>   call-interactively(vc-diff nil nil)

Looks like vc-cvs-diff sets up the coding system redundantly.

>> 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.

Well, that's probably a good explanation for why you see the problem and
others don't: overwriting a file with another is not exaclty standard
practice in revision-control-systems.  I'm surprised that CVS doesn't
consider that every line in the file is modified (AFAIK that's what it
does if you copy the DOS-EOL version of a file atop a Unix-EOL file).

IOW: don't do that.  Either convince CVS to use Unix-EOLs on this file,
or use DOS-EOLs.


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]