views:

43

answers:

1

I am using Textmate (bran new user) as my editor of choice. Today I did svn diff somefile and found that svn thinks I changed the entire file !

In Textmate, I went to Textmate -> Preferences -> Advanced -> Saving and Set Line Endings to LF (recommended). File Encoding is set to UTF8 (recommended).

I guessed that this was the correct setting but I really don't know. Anyway, this is a big deal because my project gets changed a LOT very fast and it is a massive project...thousands of files.

A: 

SVN does not care what line endings your files use, it just warns you that they changed.

My guess would be that most of the source code is either written in a Windows based editor (CRLF) or in a pre-OSx editor (CR). Unless your project is Mac-specific I'd bet on the first one.

Franci Penov
I initially wrote my code in Windows using EditPlus and then moved into MacOSX using Textmate. I ran a test just now...I opened NetBeans and edited a file that had no changes (svn diff reported no change)I ran svn diff on the file and saw my change. I then reverted my change and ran svn diff again...and saw no change.I then did the same process using TextMate and saw that the whole file changed.
syn4k
I just tried changing the line endings and the file encoding to all available options and still got the same results...
syn4k
Does TextMate offer a Windows line ending option (CRLF)?
Franci Penov
Yes, I tried that one. The only think I can think is that maybe (but I seriously doubt it) the editor needs to be restarted after changing preferences for them to go into effect.I went and edited my netbeans.conf file to see if the issue is the file encoding but it's not. I know this because I changed the file encoding to use UTF-8, restarted the editor and then made a change to the a file with no changes. SVN reported the change correctly.
syn4k
Ok, you were right and my suspicion was correct. Changning to CRLF (Windows) line endings fixed it. TextMate has to be restarted for the preference change to go into effect. This sux though...I mean it's bad news for me because I don't want the project to be in Windows encoding...I wish I knew that this was happenening when I was still using EditPlus in Windows!Thanks for the help!
syn4k