[MERGE REVIEW] Use InventoryDirectory to represent tree root
Aaron Bentley
aaron.bentley at utoronto.ca
Tue Aug 8 00:47:23 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
> Aaron Bentley wrote:
>> 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?
No, because in the my nested-trees, Inventory.iter_entries().next() will
sometimes raise StopIteration, because the tree has no root.
>>>>> 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.
Really, EmptyTree already had a root, but EmptyTree's deprecated anyhow.
> 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).
You could possibly have it in a working tree. But the Inventory
serializers will prevent such a tree from being committed.
> 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.
Right.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFE19EK0F+nu1YWqI0RApKjAJ41YvsmrlKUfArqS03Ss10poihj9wCfTuBi
pf5dEnkievDWfpE1ZvKvEeQ=
=zNvX
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list