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

Re: ^M characters in checkedin files

From: Ryan Schmidt <subversion-2008b_at_ryandesign.com>
Date: Tue, 27 May 2008 23:01:09 -0500

On May 27, 2008, at 22:14, Pankaj Chawla wrote:

> I have a SVN server working on Windows XP with the repository also
> on the same machine. The repository is accessed from both Windows
> and Linux machines using TortoiseSVN on windows and svn commandline
> on linux. The problem is that when files are checked-in from
> windows and later checkedout on linux I see ^M characters on linux.
> The reason is because of the \r\n and \n difference between the
> two platforms. My question is, is there a way to setup svn to take
> care of this automatically. Clearcase has a interoperatibility option
> that takes care of this problem. Is there something similar in SVN.

Yes: set the svn:eol-style property of these files to a suitable
value, for example "native". This means when you check out on Windows
your files will have CRLF line endings, and on Linux and Mac OS X,
you'll have LF line endings.

You can use auto-props to automate the setting of these properties on
new files.

You can write a pre-commit hook to prevent the commit of files that
don't have this property set, if you want to do that.

Consult the documentation. http://svnbook.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-05-28 06:01:42 CEST

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.