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

Re: ^M Appends to every line?

From: David Weintraub <qazwart_at_gmail.com>
Date: Wed, 23 Feb 2011 21:01:38 -0500

As others have mentioned, you need to set svn:eol-style on files that
MUST have particular line endings. For example, shell scripts and
Makefiles MUST have Unix line endings. DOS Batch files MUST have
Windows line endings.

You might need to check everything out, clean it up, and set the
property on it. I have a pre-commit hook and one of the things you can
do is to force users to set a property to a particular value on
specified files. If the property isn't on the file, you can't commit
the change. You can get it from here: http://db.tt/H3o1i7S.

If you're using Ant, take a look at the <FixCRNL> task when you do your builds.

On Wed, Feb 23, 2011 at 11:19 AM, Christopher D Haakinson
<cdhaakin_at_us.ibm.com> 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?

-- 
David Weintraub
qazwart_at_gmail.com
Received on 2011-02-24 03:02:07 CET

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.