subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nico Kadel-Garcia <nka...@gmail.com>
Subject Re: ^M Appends to every line?
Date Thu, 24 Feb 2011 00:44:52 GMT
On Wed, Feb 23, 2011 at 11:39 AM, Les Mikesell <lesmikesell@gmail.com> wrote:
> On 2/23/2011 10:19 AM, Christopher D Haakinson wrote:
>>
>> I have SVN up and running and things are working well, except when
>> editing shell scripts from windows.
>>
>> My server is RHEL5-based and I will have clients connecting from linux
>> and windows. Linux commits work great, and even some times from windows.
>> However some times I commit a file from Windows(running tortoiseSVN and
>> Komodo EDIT) it corrupts the script and adds ^M to the end of every
>> line, often times ruining the structure of the file too.
>>
>> Is there a way to disable this or do I have to run a dos2unix script
>> after every commit to remove them?
>>
>
> Long version:
> http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.advanced.props.file-portability
>
> Short version: set the svn:eol-style property to native on the files where
> you want subversion to manage line endings.  Your client may have a list of
> file suffixes where this would be set automatically.

But in general, avoid it. If you're in a mixed platform environment,
and you are tweaking files back and forth in end-of-line settings when
you check them out in UNIX versis checking them out in Windows, you
are in for a *world* of hurt. This is a source of enormous confusion
for programmers when it works right, on one system, but not on the
other due to local re-writing.

If you're on the UNIX or Linux sides, the "dos2unix" and "unix2dos"
utilities are available with almost every distribution. For Windows,
there are other tools, including the same tools under CygWin.

Mime
View raw message