[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: Wed, 28 May 2008 16:40:20 -0500

On May 28, 2008, at 06:00, Andy Levy wrote:

> On Wed, May 28, 2008 at 3:34 AM, Didier Trosset wrote:
>
>> Kota, Sreenivasa ShravanaKumar wrote:
>>
>>> 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.
>>>
>>> Check if this works.
>>>
>>> svn propset svn:eol-style LF filename
>>
>> No. Try rather this one
>>
>> $ svn propset svn:eol-style native filename
>>
>> The native will make line endings native on each platform.
>> (LF would have make it UNIX-like even on Windows.)
>
> No, this will continue his problem. He's accessing the same WC from
> both Windows and Linux. So if he sets this, files updated/checked out
> via Linux will show ^M when accessing the files from Windows (or maybe
> it's the other way, I forget).
>
> Really, sharing a WC between OSes is setting oneself up for some
> amount of trouble, and should be avoided if possible.

I agree that sharing a working copy between OS's is not a good idea
when setting svn:eol-style to native, but I don't see any part of the
OP's message where it's said that a single working copy is being
shared between OS's. All I see is "I committed files from Windows,
and when I check them out on Linux I see ^M characters" which would
be solved by setting svn:eol-style to native.

If a working copy is being shared between OS's, you can do what we
did instead, which is to set svn:eol-style to LF, and educate all the
Windows tools you're using to use LF line endings instead of CRLF.
Depending on the Windows tools you use, though, this can be difficult
or even impossible to set up.

---------------------------------------------------------------------
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 23:41:06 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.