subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Chapman <dcchap...@acm.org>
Subject Re: ^M Appends to every line?
Date Wed, 23 Feb 2011 16:35:00 GMT
On 2/23/2011 8: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?
>

Look up "propset" and "eol-style".   In particular, in the [auto-props] 
section of my configuration file I have a number of lines of the form

*.c = svn:eol-style=native
*.txt = svn:eol-style=native
*.pl = svn:eol-style=native;svn:executable

I do this both in Windows and in Linux so that I don't have files with 
only ^J when I check them out under Windows.

You can also add this property manually after the files are committed:

svn propset svn:eol-style=native file1 file2 ...

Since you are seeing ^M now, you will need to do this manually for the 
affected files.

Other useful commands:

svn proplist file
svn propget svn:eol-style file

where "file" is the name of the file you are looking at.

-- 
     David Chapman         dcchapman@acm.org
     Chapman Consulting -- San Jose, CA


Mime
View raw message