views:

318

answers:

2

We've been working on some files at the same time. Occasionally, when we "svn up" we'll see files with "^M"'s appended to every line of certain files. We originally blamed each other's editors >_>.

We have since narrowed it down to "svn up"ing when conflicts exist. If we isolate the conflicted file and svn no "^M"'s appear. No "^M"'s appear in the svn log/diff's. Its totally weird, right?

Was hoping that someone might have seen this before and know a workaround. IDK, it might not be reproducible on someone else's setup. We're using Subversion 1.4.4 if that helps.

Thanks for reading and I appreciate any comments.

+2  A: 

This happens to me when:

  • I'm using Subversion on Windows
  • I'm using Vim

When Subversion adds the conflict markers (on Windows), it adds them with CRLF line endings, regardless of whether the rest of the file is just LF line endings. When I load the conflicted file into Vim, it can't automatically determine the line ending style so it assumes LF only and shows "^M" at the end of each marked-up conflict line. I make sure to edit any of those out (so my file has all LF line endings, in this example) before resolving the conflict.

Greg Hewgill
+2  A: 

Could it be that the merge tool adds those end of line characters?

Another thing that might help is setting the svn:eol-style property to native on the files in your project.

Mark van Lent