On Mon, Mar 31, 2008 at 09:46:58AM -0600, Bob Jamison wrote:
This morning, when doing an svn up, almost every source file was updated, and was converted to DOS. What gives? And how do I revert this? Source files' formats should remain untouched by the SCM.
The change in question is that I did
svn propset svn:eol-style native
on .cpp/.h files that were added since the last time all .cpp/.h files were set to svn:eol-style native.
The choices we have for this setting are:
- Unset. In this case, files tend to get a mix of CRLF and LF endings in the one file over time -- as was the case with half a dozen or so files when I made the change.
- `native'. In this case, LF is used on Un*x (including MacOS X), while CRLF is used on Windows. (I don't know for sure what happens for svn compiled under cygwin, but I'd guess it would use CRLF.)
- `LF', `CRLF' or `CR', with the obvious meaning for checkouts.
On Un*x (incl. MacOS X) for normal source files (and shell scripts and makefiles and human-readable text files such as readme's, todo's, ChangeLog etc.), we certainly prefer for LF to be used.
On Windows, it's a bit less clear. Heavy users of cygwin may prefer LF to be used, whereas some simple Windows programs (Notepad, last I looked) and DOS commands don't like any form of line ending but CRLF.
Is there a way of changing what Subversion regards as "native" line ending ? I'm not aware of one, short of recompiling svn.
What line endings do our other windows devs want?
It looks like our choices are:
- Change svn:eol-style to LF. Possible disadvantage is that it might scare off potential new windows devs.
- Change to unset. Though this has the same disadvantage of the above while adding its own problems. Its only advantage is predictability / understandability.
- Somehow get subversion to be user-configurable to change what native means.
There's also an issue of what we do for newly-added files. Subversion currently has no way of saying "all .cpp/.h files added to this directory should have svn:eol-style set to foo". The closest that subversion provides is that we could get is to ask all inkscape users to configure their own copy of subversion to enable auto-props, and ask svn to make all .cpp/.h files added to *any* project (not just inkscape) to have svn:eol-style set a certain way. But I suspect that that isn't the right thing (especially if we decide we want it set to LF while some other project wants native or whatever).
So I think the best we can do is ask people to set the property themselves when they add new files. We could organize for e-mail to be sent automatically.
pjrm.