[PREVIEW] line-endings support

Talden talden at gmail.com
Sun Apr 13 22:30:11 BST 2008


>  > Used simple file properties implementation does not require format upgrade
>  > and eol support will work with any working tree format (WT2, 3 and 4).
>
>  > To start using eol support you need set 'eol' property for some files
>  > or file mask, e.g.:
>
>  > $ bzr prop-set *.txt eol native
>  > $ bzr prop-set *.py eol LF
>  > $ bzr prop-set binary.file eol exact
>
>  File properties should imho be an implementation detail rather than
>  something that's exposed to the user. I think this is one of the
>  things that Subversion got wrong. It's fine for a "bzr prop-set"
>  command to exist, but it should be there for debugging purposes rather
>  than as the UI you use on a daily basis.

IMHO some things shouldn't be exposed as properties - they should have
their own command-space.  This is especially true of something like
the EOL handling since it drives functionality that mutates committed
and checked out content.  Of course custom properties are used in
Subversion as well and supporting that is a good thing for those that
use them.

>  Instead, I'd like to see us have a separate command for changing the
>  line ending policy on files, e.g.
>
>  $ bzr eol-style "*.txt" native
>  $ bzr eol-style "binary.file exact
>  $ bzr eol-style "*.txt"
>  native

Even if this were implemented as properties, I would expect all
properties under a special namespace (EG 'bzr:') would be hidden from
prop-get, prop-set commands - each would, I expect, have it's own set
of CRUD commands.

I agree that exposing this as a property in Subversion was a mistake -
it should be clear to users that setting it changes tool behaviour -
Properties in subversion look more like data than configuration and
that can be confusing.

None of this should detract from the huge benefit this addition makes
for many users allowing more projects to move to Bazaar.

--
Talden



More information about the bazaar mailing list