[MERGE REVIEW] Use InventoryDirectory to represent tree root
John Arbash Meinel
john at arbash-meinel.com
Tue Aug 8 00:27:51 BST 2006
Aaron Bentley wrote:
> Robert Collins wrote:
>>>> Doesn't iter_entries now yield the root entry?
>>> Yes, but its always first, so it can be skipped trivially.
>
> And it won't work properly in nested-trees. is_root isn't a YAGNI. I
> already need it. It's just a question of when it should enter the
> mainline. It seems rather pointless to reimplement this stuff to get
> rid of is_root, which is a nice, clear method.
Why? Can you recurse into nested trees from the parent tree? I think
Robert is saying that if you stop at a nested tree, then one inventory
recursion only has a single root, and it is always the first entry
returned by iter_entries().
>
>>>> These all assume that a tree has one root directory, which is not true
>>>> in nested-trees, where this came from.
>>> I dont quite follow. In nested trees AIUI there is still only one root
>>> for a given tree.
>
> No, in my nested-trees branch, sometimes there is no root for a given tree.
I know you did your nested-trees stuff before Robert changed "EmptyTree"
to have a root entry. I know you still have a disagreement about that
change, but is there any other way that you can not have a root? (Maybe
you can delete it without adding a new one).
But being able to have files and no root would be a Tree invariant
violation, right? Otherwise the files have nowhere to be based from.
I haven't looked over the latest patch, as I'm curious about the above
answers first.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060807/3f1caffb/attachment.pgp
More information about the bazaar
mailing list