SVN更新冲突时添加^M?
我们一直在同时处理一些文件。有时,当我们“svn up”时,我们会看到某些文件的每一行都附加了“^M”。我们原本互相指责对方的编辑>_>。
此后,当存在冲突时,我们将其范围缩小为“svn up”。如果我们隔离冲突的文件和 svn 则不会出现“^M”。 svn 日志/差异中没有出现“^M”。这很奇怪,对吧?
希望有人以前见过这个并知道解决方法。 IDK,它可能无法在其他人的设置上重现。如果有帮助的话,我们正在使用 Subversion 1.4.4。
感谢您的阅读,感谢您的任何评论。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这种情况发生在我身上:
当 Subversion 添加冲突标记(在 Windows 上)时,它会以 CRLF 行结尾添加它们,无论文件的其余部分是否只是 LF 行结尾。当我将冲突文件加载到 Vim 中时,它无法自动确定行结束样式,因此它仅假定 LF 并在每个标记的冲突行的末尾显示“^M”。在解决冲突之前,我确保编辑掉其中的任何一个(因此我的文件在本例中具有所有 LF 行结尾)。
This happens to me when:
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.
难道是合并工具添加了那些行尾字符?
另一件可能有帮助的事情是设置 svn:eol-style 属性设置为项目中文件的本机属性。
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.