[RFC] proposed user doc for nested trees

Aaron Bentley aaron at aaronbentley.com
Tue May 12 15:07:34 BST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
> Aaron Bentley пишет:
>> On initial checkout how the bzr will build nested components?

Bear in mind that the normal use case I've been thinking about is "on
branch", not "on checkout".  The behavior of heavyweight checkout is
basically the same as for branch, except that the bound location will be
set.

When creating a lightweight checkout from a branch, it will create a
lightweight checkout of the top-level tree.  Then for each
tree-reference in the top level tree, it will find the reference
location stored in the branch.  It will open the branch at that
reference location, and create a lightweight checkout at the
tree-reference location.  It then treats this new checkout like a
top-level tree, recursively checking out all subtrees.

> The
>> relative paths of nested components will be stored somewhere (in the
>> inventory?), is it right?

Not really, it's based on file-ids.  The containing tree's branch
contains a mapping of the tree-reference file-id to the tree-reference's
branch.

>> So when user will move nested components withing entire construct this
>> info will be updated as well?

No.

>> So why the code that will update relative position of nested component
>> (in the inventory?) cannot update relative branch reference as well?

Since the code isn't updating any extra info, updating branch reference
locations would be a big burden, and you'd need to ensure that it was
impossible to move a checkout any other way, to avoid breaking the
user's tree.  That's a very difficult guarantee to provide.

Whereas, moving checkouts around is a fairly rare event.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoJgqMACgkQ0F+nu1YWqI3HYACfVjCM0eaZU7L+7OWDzTGOWNZT
rSoAmwQwf//YWrG8Qo8zoDIAksEBuwzg
=QgCE
-----END PGP SIGNATURE-----



More information about the bazaar mailing list