[sldev] Patch format question

Felix Duesenburg kfa at gmx.net
Wed May 7 01:13:45 PDT 2008


Callum Lerwick wrote:
> On Tue, 2008-05-06 at 14:27 -0500, Soft wrote:
>> A svn diff is fine. patch accepts that as input without any problems.
>> ToirtoiseSVN's diff output is fine as well. It needs a little cleanup
>> because it mixes line ending styles between the header and the body,
>> but that's trivial for the importer to fix.
> 
> Trivial my ass. Someone needs to be dragged out in to the street and
> shot. *Mixing* line ending types completely breaks the ability to
> automatically detect line ending types, which is what would otherwise
> happen in every tool I've thrown at it.
> 
> Pick a line ending, TortoiseSVN, we're at war.
> 
> 

LOL. Yes that would be bad indeed. But I don't think that is an issue with SVN or Tortoise. Tortoise is really just a GUI that calls SVN with appropriate commands and options. If you ever get a line ending changed, then your editor is to blame or whatever you threw at it.

Here is a relevant chapter from the SVN manual addressing the subject of line endings:

http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.5

I'm not exactly sure how mixing can occur. A wild guess would be that it happens when you create a patch on Windows from a file in UNIX format, both in the repository and in your working copy. Or vice versa. With no conversion option specified, SVN should treat it as binary, but write out the headers in native format of the OS where it is run (would have to look into the SVN source to verify, didn't find it documented). If you download the SL source in the appropriate format for your platform, work on it and give it back from there, then no mixing should occur. (???) But my knowledge of that is rather patchy - no pun intended ;). I didn't want to start a discussion that takes resources from more important work. If Soft says it's ok then I'm grateful for the alleviation and take it for granted until proven wrong.



More information about the SLDev mailing list