On Wednesday 08 Sep 2010, Ryan Schmidt wrote:
> On Sep 8, 2010, at 10:27, Campbell Allan wrote:
> > Before sending my previous reply I had tested it with a file changed
> > using unix2dos. Prior to the commit svn diff only shows the text changes
> > ignoring the line endings. I haven't explicitly tested changing a single
> > line ending within the file but have done a quick concatenation test with
> > half the file with LF and the other half CRLF. When committed the entire
> > file in the working copy is changed to LF.
>
> As I recall, if a file with svn:eol-style set has inconsistent line endings
> (e.g. some LF, some CRLF), Subversion will reject the commit and require
> the user to make the file's line endings consistent before proceeding.
> Though I don't know whether this is happening on the client or on the
> server.
>
Originally I thought the same which is why I tested it but subversion only
complains if the svn:eol-style is not set. If the property is set then the
official client (1.6.12 with 1.6.11 server. I've not tested others) converts
the files in the working copy on commit. Diffs show only the text changes
ignoring the line endings. The only question I can't answer is if the server
would reject the commit if the client does not do the conversion. This would
almost seem like a bug though unless the svn:eol-style property is only meant
as a hint to the client in which case the documentation should be updated.
I've got a test script for repeating this quickly that I can post. I did
notice there appears to be an inconsistency but I don't believe this is a bug
in subversion as unix2dos also exibits the same problem. The test script
concatenates three smaller files together to create a larger file. When
subversion or unix2dos converts this file to have CRLF endings the resulting
file only contains the first of the three smaller files.
> > The part of the book that I felt was relevant is when the line ending is
> > set to native subversion will store the file in the repository with LF's
> > only. The client is then changing this to reflect the preferences of the
> > client OS.
>
> My understanding is that if svn:eol-style is set to *any value* then the
> repository stores the file with LF line endings and the client does eol
> translation to your desired style.
--
__________________________________________________________________________________
Sword Ciboodle is the trading name of ciboodle Limited (a company
registered in Scotland with registered number SC143434 and whose
registered office is at India of Inchinnan, Renfrewshire, UK,
PA4 9LH) which is part of the Sword Group of companies.
This email (and any attachments) is intended for the named
recipient(s) and is private and confidential. If it is not for you,
please inform us and then delete it. If you are not the intended
recipient(s), the use, disclosure, copying or distribution of any
information contained within this email is prohibited. Messages to
and from us may be monitored. If the content is not about the
business of the Sword Group then the message is neither from nor
sanctioned by us.
Internet communications are not secure. You should scan this
message and any attachments for viruses. Under no circumstances
do we accept liability for any loss or damage which may result from
your receipt of this email or any attachment.
__________________________________________________________________________________
Received on 2010-09-09 12:30:03 CEST