[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Coding system for output of "svn cat"

From: Andre Colomb <acolomb_at_schickhardt.org>
Date: Mon, 27 Aug 2012 17:55:33 +0200

Daniel Shahaf <d.s_at_daniel.shahaf.name> wrote on 2012-08-27 15:41
> Andre Colomb wrote on Mon, Aug 27, 2012 at 14:26:17 +0200:
>> I'm trying to improve the contributed psvn.el mode and need to figure
>> out how to get rid of extra ^M characters at the end of every line when
>> checking out an older revision (which uses svn cat internally) and
>> comparing it with the working copy.
>>
>
> When svn:eol-style=native, the file is stored in the repository with LF
> line feeds. (See "repository normal form" --- LF line feeds and
> contracted $Keywords$.)
>
> I assume you have cases where svn:eol-style was set on a file partway
> through its history. Due to the above implementation detail, I wonder
> if you'll find that the behaviour differs for setting
> svn:eol-style=native on a file that was CRLF beforehand compared to
> setting it on a file that was LF beforehand...

The error in this case is actually much simpler. psvn.el does not use
the internal svn diff in case the user requests a specific revision of a
file. It just relies upon svn cat to do the Right Thing and saves its
output to a file with revision number appended.

However, when actually displaying this file, the usual Emacs habit of
detecting the character encoding and line ending style to use in the
buffer (and subsequently use it for diffing) is not triggered.

I think the case you describe with svn:eol-style properties being set
and removed some time during the file history will be handled correctly
by psvn.el as long as svn cat always honors the property set for the
requested file revision. This means that for example ediff would
(correctly) detect changes in line ending if using it to compare a
version with and one without svn:eol-style. However, this is probably
desired and if it poses a problem, would need to be handled inside
Emacs' diff code as an option akin to subversion's --ignore-eol-style.

Please see my other mails for patches to solve the outstanding issues in
psvn.el concerning the coding system.

André

-- 
Greetings...
From: Andre Colomb <acolomb_at_schickhardt.org>

Received on 2012-08-27 17:56:10 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.