Page 1 of 1

svn:eol-style

Posted: Wed Sep 29, 2004 9:59 pm
by leen
Hello developers,

Currently there is not a consistent policy concerning EOL. There are files with unix-style EOL (LF), there are files with MS-DOS-style EOL (CRLF) and it would not surprise me if those styles were mixed in some files, of if some files use the Mac-style EOL(CR).

There is an easy solution: for each text-file, execute the following command:

Code: Select all

svn propset svn:eol-style native example_file.txt
The file example_file.txt will get the EOL-style of the system where it is checked out. Subversion will take care of that.

See for more information http://svnbook.red-bean.com/svnbook-1.0 ... sect-2.3.5.

There is a catch: as far as I know this works only if trunk is checked out fresh. In other words: delete or rename the local working copy of trunc and do:

Code: Select all

svn checkout http://svn.cmsmadesimple.org/cms/trunk
If you are interested, I can provide a shell script that sets the eol-style property to native of each text file in trunk.

Cheers,

Leen

svn:eol-style

Posted: Wed Sep 29, 2004 11:10 pm
by Ted
Leen,

Can you do us a big favor and make a shell script to set all these subversion properties properly? That way I can just run it every once in awhile and make sure they're good. Unix shell script that runs from the document root would be perfect.

Thanks!

svn:eol-style

Posted: Wed Sep 29, 2004 11:18 pm
by Bewbs
what is eol-style?

svn:eol-style

Posted: Thu Sep 30, 2004 5:02 pm
by leen
Sorry for the delay, I had no connection for 14 hours.
wishy wrote:Can you do us a big favor and make a shell script to set all these subversion properties properly?
Sure, no problem. :) This script would have to relay on the Linux 'file' command for discovering mime-types.

I'm working on it now.
That way I can just run it every once in awhile and make sure they're good.
The best would be to set the correct properties upon import of a new file. There is something called 'auto-props' and 'use-auto-props' or so. See the Subversion manual: http://svnbook.red-bean.com/svnbook-1.0 ... 7-sect-2.4

I'll study on its usage and effects.
Unix shell script that runs from the document root would be perfect.
Huh? What document root?

Cheers,

Leen

svn:eol-style

Posted: Fri Oct 01, 2004 12:39 am
by Anonymous
leen wrote:I'm working on it now.
Wishy:

Ok, I've got something. 3 small scripts and a README file. I can make a tarball of it (2.4 K) and ... What next? Upload somewhere? Mail to someone? Please advise.

Cheers,

Leen

svn:eol-style

Posted: Fri Oct 01, 2004 12:56 am
by Ted
Awesome!

Mailing it to me would be just fine.

wishy (=at=) cmsmadesimple (=dot=) org

Thanks!

svn:eol-style

Posted: Fri Oct 01, 2004 8:36 am
by Anonymous
wishy wrote:Mailing it to me would be just fine.

wishy (=at=) cmsmadesimple (=dot=) org
There is an email-button with your email address below your posts. ;P

BTW, before I send it, do I need to copyright the whole thing?

Cheers,

Leen

svn:eol-style

Posted: Fri Oct 01, 2004 9:23 am
by Ted
Yeah, I suppose. You can just use the header from any of the other source files and change it accordingly.