简体   繁体   English

将基于Linux的subversion项目检入Windows和行结尾

[英]Checking out a Linux-based subversion project into Windows and line endings

I am collaborating on a project hosted in a Subversion repository on a Linux server. 我正在合作一个在Linux服务器上的Subversion存储库中托管的项目。 My computer runs Windows XP. 我的电脑运行Windows XP。 I am using CollabNet's Windows Subversion command-line client on my Windows XP machine. 我在Windows XP机器上使用CollabNet的Windows Subversion命令行客户端。

I am running into the end-of-line (EOL) problem that happens when I edit a file on my Windows machine and then do an svn update . 我遇到了在我的Windows机器上编辑文件然后执行svn update时发生的行尾(EOL)问题。 Subversion thinks there are differences when the only differences are really between line-endings. Subversion认为,只有在行结尾之间存在唯一差异时才存在差异。

I kow that this could be solved with the eol-style property, but I am unclear as how to proceed: 我知道这可以通过eol-style属性来解决,但我不清楚如何继续:

  1. What setting for eol-style should I use? 我应该使用什么样的eol-style设置?
  2. Do I make this property setting on the Linux side or the Windows side? 我是在Linux端还是在Windows端进行此属性设置?

You should probably use svn:eol-style= native . 你应该使用svn:eol-style= native This means that it'll convert LF to CRLF when on windows, and keep LF on linux. 这意味着它将在Windows上将LF转换为CRLF,并在Linux上保持LF。 It doesn't matter on what system you set the property. 在您设置属性的系统上无关紧要。

See also svnbook 另见svnbook

To attach the mentioned property manually to a set of existing files run the "svn propset" command (assuming that you have a command line client). 要手动将提到的属性附加到一组现有文件,请运行“svn propset”命令(假设您有一个命令行客户端)。 For example, to attach the property to all cpp files run: 例如,要将属性附加到所有cpp文件运行:

svn propset -R svn:eol-style native *.cpp svn propset -R svn:eol-style native * .cpp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM