svn:eol-style

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
leen

svn:eol-style

Post 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
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

svn:eol-style

Post 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!
Bewbs

svn:eol-style

Post by Bewbs »

what is eol-style?
leen

svn:eol-style

Post 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
Anonymous

svn:eol-style

Post 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
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

svn:eol-style

Post by Ted »

Awesome!

Mailing it to me would be just fine.

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

Thanks!
Anonymous

svn:eol-style

Post 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
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

svn:eol-style

Post by Ted »

Yeah, I suppose. You can just use the header from any of the other source files and change it accordingly.
Post Reply

Return to “Developers Discussion”