[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: special property for text types

From: Christopher Key <cjk32_at_cam.ac.uk>
Date: Thu, 07 Feb 2008 21:19:19 +0000

C. Michael Pilato wrote:
> Karl Fogel wrote:
>> "C. Michael Pilato" <cmpilato_at_collab.net> writes:
>>> I like the thinking here, but would prefer to optimize this a bit,
>>> perhaps by simply allowing svn:eol-style to accept a value which means
>>> "don't do any EOL conversion, but note that this is line-based".
>>> maybe "*" or "" or something.
>>
>> I'm not so sure that's good...
>>
>> People set 'svn:eol-style' because they're looking for a way to get
>> line-ending conversions -- the conversion is the "task" there.
>>
>> People would set svn:is-text because they want to make Subversion
>> behave certain ways with the file when diffing and merging. The
>> "task" is totally different here.
>>
>> If we were to overload the svn:eol-style property (the way we did with
>> 'svn switch --relocate'), I think we'd be confusing a lot of people,
>> who think from the point of view of their tasks, not from the point of
>> view of how Subversion works.
>>
>> I think the documentation for svn:is-text should recommend that the
>> user seriously consider if they need to set svn:eol-style instead
>> (after all, how often would you need to say something's text and yet
>> not be willing to set svn:eol-style to at *least* "native"?), though.
>
> But you think having two properties won't cause the same sorts of
> confusion? "Do I need to set svn:is-text?" Or, "This file had
> svn:eol-style=CRLF but I need to remove that property; shoot, I forgot
> to also add svn:is-text!". You're just begging for more of a mess.
>
> I hear you about the so-called task breakdown, but that too runs afoul
> of your suggestion to satisfy the "task" of diffing/merging by even
> consulting svn:eol-style (which is allegedly unrelated to this
> "task"). My point is simply that we can (and should) *make*
> svn:eol-style related to this task, too, and can do so without
> disturbing its other currently assigned task.
>
It strikes me that the an svn:is_text property is essentially
redundant. If a file is truly line based, then surely by definition it
has consistent line endings throughout, and I can see no reason not to
set the svn:eol-style property for that file. If a user has a file
where they want to preserve the different line endings throughout, then
it really isn't a line based file, and line based operations are no
longer appropriate; they won't show changes in line endings correctly,
something they've already asserted they're interested in by not setting
svn:eol-style. I really can't see any excaptions to this.

This isn't to say that there's no reason to be able to diff non line
based files. I think the ability to diff truly binary files in some
sort of hex viewer, or to diff files with minimal nonprintable content
with a view like 'less' provides would be really quite valuable. Simply
that line-based diffing isn't appropriate.

-- 
Regards,
Chris Key
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-02-07 22:19:32 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.