Subversion Properties: EOL-Style

By default, Apache Subversion doesn’t pay attention to a file’s end-of-line (EOL) markers, which can cause problems if you’re part of a team who are collaborating on a document across different operating systems. Different operating systems use different characters to represent the end of a line in a text file, and some operating systems can struggle when EOL characters do not align with their native EOL style.

There are a few workarounds for this issue, but any workaround that involves performing EOL-related modifications by hand leaves your project open to human error, and makes it difficult to distinguish which changes relate to the EOL workaround, and which actually move the project forward.

This is where the svn:eol-style property is useful. This property allows Subversion to automatically perform the necessary processing on a file, to ensure EOL consistency across operating systems. To leverage svn:eol-style, you must set the property to one of the following valid values:

  • Platform-Dependent/Native – files contain EOL markers native to your operating system.
  • LF – files contain LF characters, regardless of the operating system.
  • CR+LF – files contain CRLF sequences, regardless of the operating system.
  • CR – files contain CR characters, regardless of the operating system.
  • As is (no convention) – this is typically the default value of EOL-style.

To set EOL-Style in SmartSVN:

1) Open the ‘Properties’ menu and select ‘EOL-Style…’

2) In the subsequent dialog, select the new value.

3) When you attempt to change the EOL-style of a file, SmartSVN checks whether the file has consistent line endings. If it doesn’t, SmartSVN will block the EOL-style change. To skip this check and apply the EOL-style change regardless, select ‘Force’ before clicking ‘OK.’

4) Click ‘OK’ to apply the properties change.

Want to learn more about Subversion properties? On December 13th we will be holding a free ‘Subversion Properties’ webinar. It’s free to attend, but places are limited so register now to avoid disappointment.

0 Responses to “Subversion Properties: EOL-Style”


  • No Comments

Leave a Reply