简体   繁体   中英

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. My computer runs Windows XP. I am using CollabNet's Windows Subversion command-line client on my Windows XP machine.

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 . Subversion thinks there are differences when the only differences are really between line-endings.

I kow that this could be solved with the eol-style property, but I am unclear as how to proceed:

  1. What setting for eol-style should I use?
  2. Do I make this property setting on the Linux side or the Windows side?

You should probably use svn:eol-style= native . This means that it'll convert LF to CRLF when on windows, and keep LF on linux. It doesn't matter on what system you set the property.

See also 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). For example, to attach the property to all cpp files run:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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