You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by James French <Ja...@naturalmotion.com> on 2012/10/04 23:38:40 UTC

svn:eol-style native and reintegrate merge

Hi,

Using svn 1.7.6 and working on a dev branch I wrote a script to set svn:eol-style=native on all source code files, because we develop on Mac and PC. When I tried to check in it kept failing on files that had inconsistent line endings so I kept fixing them until I was able to check in. So far so good. The diff of the checkin showed that files with consistent line endings (99% of them) simply had the svn:eol-style=native property on them which is what I expected. Now that I come to reintegrate however I have had a shock - it has converted all files to unix line endings (and I'm on a PC). We do our sync up merges with the --ignore-eol-style style switch (to be honest I'm not sure exactly what this does). I tried reintegrating with and without switch and it does the same - everything has unix line endings. Maybe its just some weird glitch and it won't really change the line endings but I'm too scared to check in to find out. Tomorrow I'm going to try with 1.6 and see what that does.

What the hell is going on?

Cheers,
James

Re: svn:eol-style native and reintegrate merge

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag James French,
am Donnerstag, 4. Oktober 2012 um 23:38 schrieben Sie:

> Now
> that I come to reintegrate however I have had a shock - it has
> converted all files to unix line endings (and I'm on a PC).

On native eol-style, Subversion internally stores LF line endings.

> Note that Subversion will actually store the file in the repository
> using normalized LF EOL markers regardless of the operating system.
> This is basically transparent to the user, though.

http://svnbook.red-bean.com/en/1.7/svn.advanced.props.file-portability.html#svn.advanced.props.special.eol-style

> We do
> our sync up merges with the --ignore-eol-style style switch (to be
> honest I'm not sure exactly what this does).

> --ignore-eol-style:
>   Ignore changes in EOL style.

I would expect that your merges set the new native eol-property on the
files you committed and Subversion harmonizes files to LF line endings,
but all other changes to line endings get ignored. Which should be
what you expect, as native eol-property says that the subversion
client should handle line endings on commits and updates depending on
your OS.

> I tried reintegrating
> with and without switch and it does the same - everything has unix
> line endings.

Where exactly has anything Unix line endings? After your merge in the
working copy, but before a commit or after a commit in another,
updated working copy? I think this is the real problem and everything
is working fine, you just have to look to the files after the proper
operation. If there is a problem it surely is in the handling after
fetching files form the repo, as in the repo as documented above each
file should have Unix line endings in your case.

In my opinion I think the better approach is to use proper tools which
work with different line endings and for example define which to use
as part of a code style.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon.............030-2 1001-310
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow