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

Re: fixing files committed with wrong eol-style

From: Yves Martin <ymartin59_at_free.fr>
Date: Tue, 13 Jul 2010 09:36:03 +0200 (CEST)

 Hello,

Without the "svn:eol-style" property any file content is considered as binary.
At that point, checkouted files on Windows and Linux have "CR-LF" eol.

If you want to run your script on Linux, you should run a "dos2unix" (or equivalent)
and add the property "svn:eol-style" on your files before commit.
Beware, that is just a guess, I have not tested myself !

On Windows, either use Cygwin for Bash, Perl, Ruby... or the win32 port of your scripting langage. Sure it exists !

By the way, I doubt "diff" is sane in any case... just check a "svn diff" from Linux for instance.

The "perfect" fix whould be to dump the repository content,
add "svn:eol-style" properties at file addition in dump and the load it into a new repository.
OK that is really too heavy...

Another advice: you should distribute a correct "autoprops" settings
to your dev team to avoid that issue at source

Best regards
Yves

----- "Simon Kitching" <Simon.Kitching_at_airnz.co.nz> a écrit :

> We’ve got a repository containing a lot of text-files committed from
> windows systems without the svn:eol-style=native setting. Some
> developers now want to work on these from Linux.
>
> I would therefore like to fix the eol-style. Writing a script on linux
> to find all the relevant files and run “propset svn:eol-style native”
> on them is easy enough. However I’ve noticed that if the change is
> committed from * linux *, then the commit not only changes the file
> properties, but also * every line-ending in the file *, ie looking at
> diffs between files before and after this change is now pointless.
> Committing exactly the same propset change from *windows* just sets
> the property without the whitespace problems; checking out on both
> systems then works as expected, and diffs between repository versions
> are sane.
>
> However it’s much more convenient to write and run this script from
> linux. Is there any way from linux to persuade subversion to just set
> the eol-style property?

-- 
Yves Martin
Received on 2010-07-13 09:36:51 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.