Sun 3 Sep 2006
Subversion Tip #1: Fixing EOL settings with TortoiseSVN
Posted by dkaz under Programming
I checked out my SVN codebase from a Linux box this morning and I realized that I’ve been committing everything with ^M line endings.
I absolutely hate when others do that, so I had to take immediate steps to remedy the issue. Following directions, lifted from Celtix ESB Wiki made sure that I won’t be guilty of this offense in the near future.
TortoiseSVN settings fix:
In the Windows explorer, highlight any directory and right click. Select the TortoiseSVN > Settings menu item; this opens the TortoiseSVN Settings window.
Highlight the General entry in the left-hand listing and click on the Edit command button adjacent to the Subversion configuration file: label.
Under the miscellany tag, uncomment the last line, which turns on the auto properties functionality.
### Set enable-auto-props to ‘yes’ to enable automatic properties
### for ’svn add’ and ’svn import’, it defaults to ‘no’.
### Automatic properties are defined in the section ‘auto-props’.
enable-auto-props = yes
At the end of the file under the auto_props tag, add the following properties, then save the file and close the TortoiseSVN Settings window.
*.java = svn:eol-style=native
*.properties = svn:mime-type=text/plain;svn:eol-style=native
*.xml = svn:mime-type=text/xml;svn:eol-style=native
*.xsl = svn:mime-type=text/xml;svn:eol-style=native
*.xsd = svn:mime-type=text/xml;svn:eol-style=native
*.wsdl = svn:mime-type=text/xml;svn:eol-style=native
*.txt = svn:eol-style=native;svn:mime-type=text/plain
*.pl = svn:eol-style=native
*.py = svn:eol-style=native
*.cmd = svn:eol-style=native
*.bat = svn:eol-style=native
*.htm* = svn:eol-style=native;svn:mime-type=text/html
*.css = svn:eol-style=native
*.js = svn:eol-style=native
README* = svn:eol-style=native;svn:mime-type=text/plain
LICENSE* = svn:eol-style=native;svn:mime-type=text/plain
ChangeLog = svn:eol-style=native;svn:mime-type=text/plain
*.png = svn:mime-type=image/png
*.jpg = svn:mime-type=image/jpeg
*.gif = svn:mime-type=image/gif
