[ANN] EOL conversion support now in bzr.dev

Alexander Belchenko bialix at ukr.net
Mon Apr 20 14:36:11 BST 2009


Hi Ian,

I'm sorry but I had no time to work on this yet, and next weeks unlikely 
will have more time. (My family require most of my free time now).
I'm sorry if I was a drag for this feature.

I was thinking about support for relative paths for rules, and I have 
stumbled upon inevitable and serious chicken-eggs problem here. And I'm 
fear this problem makes the tree-specific rules less useful (for me 
personally).

I'll try to explain as I see it:

1) When user create new branch of existing project and there is supposed 
to be versioned rules in the tree (e.g. in the .bzrrules file in the 
root of the tree) then these rules won't apply on initial build of 
working files because this rules file should exist before tree will 
start to build. I don't see any reliable way to solve this.

2) If user wants to specify path to rules in the branch.conf then this 
setting should propagate somehow to new tree. Currently there is none 
code for such propagation. But even if this code will exists bzr still 
can not guarantee that file with rules will be accessible in the new 
tree (see problem #1 above).

3) So there is very high chances that new tree will be created without 
actual rules in play, so there should be special way to recreate working 
tree after rules will be set-up. May be "update" command with some 
special flag should do this job?

As I said I see this as "chicken-eggs" problem that cannot be reliable 
solved in the current design of rules and eol filters. In any case with 
current design it will require additional steps from the users. This is 
bad IMO.

An year ago I have tried to introduce versioned properties to bzr, 
because I have thought about such problems very long time. In my opinion 
this chicken-eggs problem cannot be solved without some sort of 
versioned properties. As you know Mr. Robert Collins (who is main bzr 
architect IIUC) rejected the idea of versioned properties. I still think 
it's wrong decision.

Sorry Ian, but I won't be able to work on relative rules in the near future.


Ian Clatworthy пишет:
> Alexander Belchenko wrote:
> 
>>> Some things to note:
>>>
>>> 1. We only support the definition of rules globally at the
>>>    moment, rules can't be configured per project or branch yet.
>>>    I'm half way through a patch for this but, realistically,
>>>    this probably won't make the 1.14 cut.
>> I'd like to help here. Because I simply can't use global rules.
>> My working branches have mixed eols in various weird combinations today.
> 
> That would help me a *lot*. Here's my latest code that you
> can start from: https://code.edge.launchpad.net/~bzr/bzr/rules-location.
> At a minimum it needs:
> 
> * tests written
> * the help for rules updated
> * the help for configuration settings updated
> * a NEWS entry.
> 
> I doubt the code works yet so it will need changes as well. :-)
> 
> One thing to think about is how to interpret relative paths. Are they
> relative to the root of the tree or the root of the branch? It matters
> when using a lightweight checkout pointing to branches on a network
> drive say.
> 
> To keep the scope as small as possible in an initial cut, I'd be tempted
> to just get local, absolute paths working, reviewed and committed. We
> can then enhance it from there to support relative paths and URLs.
> 
> Ian C.
> 
> 




More information about the bazaar mailing list