Last day to vote/reject on proposed EOL names

Alexander Belchenko bialix at ukr.net
Tue Mar 31 06:38:53 BST 2009


Michael B. Trausch пишет:
> On Tue, 31 Mar 2009 08:43:22 +1000
> Ian Clatworthy <ian.clatworthy at internode.on.net> wrote:
> 
>> Thanks to everyone for their thoughtful emails on picking
>> the right names for our EOL settings. Here's my latest
>> thinking - the names will be upwardly compatible with
>> those used for svn (except for cr which I'm not planning to add):
>>
>> * native
>> * lf
>> * crlf
>> * exact
>> * native:crlf
>> * lf:crlf
>> * crlf:crlf
>>
>> In general, wt-format[:repo-format] where the default
>> repo-format is lf. I'm happy to change the separator to -, +, / or
>> something else but : seems as good as any.
>>
>> I'm planning to land EOL support into bzr.dev with those names
>> 24 hours from now. If anyone objects, here's your last chance
>> to say why.
> 
> I'm a bit late to the discussion, but I have a few questions as a
> user.  First, why have the format stored in the repository be
> customizable at all? Why not have a normalized format inside the
> repository?

Because there are existing [windows] users with their repos, and they most likely
has crlf committed. If somebody switch their committed files from crlf to lf
then annotations will be lost.

> Secondly, why not detect the user's environment and use
> whatever settings are reasonable for the working copy based on the
> user's operating system?

Because sometimes user *need* file in the some already known eol style.
I've explained this many times in the past: I did checkout of shell script on windows
with native (crlf) and then copy this file to test on Linux over ssh.
It will fail to run because bash don't understand cr in the shebang.

> 
> For example, if the user is using OS X, Linux, BSD, etc., or anything
> that uses that style of environment (say, Cygwin, which usually uses
> UNIX-style line endings by default), then UNIX-style line endings are
> used in the working copy. If the user is using native Windows, then
> Windows-style line endings are used. If bzr even runs on MacOS classic
> versions pre-10.x, then such a working copy would use Macintosh-style
> line endings.  But the repository format should be normalized
> completely---at least that seems to make the most sense to me.  That
> way, there is no fuss, no worry, and no confusion.  While the
> text-based EDIT utility that comes with Windows can deal with UNIX line
> endings (no idea on whether it handles Macintosh line endings or not),
> Notepad certainly barfs on Unix files and stair-steps them when
> viewed.  (EDIT is a good way to convert the files---manually---but that
> stinks.)
> 
> Just my few words; feel free to ignore them if I somehow missed that
> party.

The problem is much bigger and complex than it looks at first sight.

> 
> 	--- Mike
> 
> 
> 




More information about the bazaar mailing list