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

Visual Studio and the svn:eol-style property

From: Giulio Troccoli <Giulio.Troccoli_at_uk.linedata.com>
Date: 2006-10-26 13:17:52 CEST

First of all let me say that this might not be the correct Forum, but I
couldn't find a better one (you'll understand in a minute).

Secondly, I have searched all forums but I haven't find any post about
my problem.

 

We have Subversion on a Linux box, but we develop on Solaris, Linux and
Windows.

 

Recently the Solaris build failed because there were some CR-LF at the
end on some lines, inserted by Visual Studio (the tools we use to
develop on Windows along with TortoiseSVN).

 

I read the Subversion Manual and set the svn:eol-style property to
native to all files. It seems that everything was fine, i.e. I could
build on all three platforms.

 

Unfortunately the next time we tried to commit some changes in Windows,
the pre-commit script failed saying

 

Error Commit failed (details follow):

Error File 'blah blah blah' has inconsistent newlines

Error Inconsistent line ending style

 

This was caused, I think, by copy-and-paste, but still it is something
that I would like to avoid.

 

I thought that setting the svn:eol-style property to native would
automatically translate any kind of eol to the native eol only when the
code was checked-out or updated. But clearly I'm wrong on this.

 

So now, what I would like to achieve is a system were no matter the
file's eol style when it is committed, its eol style is correct for the
platform where the file is checked-out or updated.

 

I also thought of using dos2unix utility. My problem with that, and
please advise of this too, is that using a working copy to do the build
we would need to dos2unix every file before starting the build. We
cannot just dos2unix a single file before compiling it as we would miss
on the .h files.

 

This solution not only would have a performance impact, in respect of
doing something with Subversion directly, e.g. using svn:eol-style
property, but also would put the working copy in a "modify" state, so
next time we update it before building Subversion will merge the
repository copy with our changes, which are only the eols. We cannot
take the risk of having conflicts as these are all automatic processes.

 

I hope I was enough clear in my explanation. If I wasn't please ask.

 

Thanks

Giulio

 

-------------------

Giulio Troccoli

Technical Consultant

 

Linedata Services (UK) Ltd. Bishopsgate Court, 4-12 Norton Folgate,
London E1 6DB

T +44 (0)20 7360 1914 F +44 (0)20 7360 1974

E giulio.troccoli@uk.linedata.com
<mailto:giulio.troccoli@uk.linedata.com> W www.linedata.com
<http://www.linedata.com>

MSN Messenger giulio@troccoli.it

 
Received on Thu Oct 26 13:18:46 2006

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.