[PATCH] fixes for log -v

Aaron Bentley aaron.bentley at utoronto.ca
Fri Jul 15 15:08:39 BST 2005


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

The recent patches that give an ID to the root directory messed up log
- -v, because they failed to initialize EmptyTree with a root ID in every
case.

Even my fixed version of these patches is somewhat broken because they
assume the root ID of the working tree is the root ID of the first
revision.  But of course, the whole point of these patches is to allow
the root ID to vary.

In fact, I am not sure this is the correct way to ensure that root has a
mutable ID.  My vision of the way we handle this is that all revisions
are descendants of the null revision.  The null revision's working tree
is EmptyTree.  Since there's only one null revision, we cannot have
different kinds of empty tree.  Either EmptyTree's root is not
versioned, or its root ID is the same for every tree, but either way,
its contents must be consistent.

It's not very helpful for the root id to always be initialized to the
same value, even if you can later change it, because that means it's
awkward to create a supertree from several projects, in which each
origninal root is a subdirectory in the supertree.

I think the right way would be to say the empty tree's root is not
versioned, and to add an ID (but *not* the directory) for the root
revision.  So directory creation and deletion for the current tree root
would be handled as no-ops.

If this goes on, we're gonna need to be able to handle root directory
*moves* at some point.  The simplest way I can think of would involve
creating a temp directory that is a sibling to the tree root, moving the
tree root into it, and moving the sibling in place of the tree root.
Unfortunately, this would require write access to the parent of the tree
root, which is something we haven't required until now.

We could also simulate moving the tree root by moving all its contents,
but I worry that this could lead to inconsistencies.

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

iD8DBQFC18Nm0F+nu1YWqI0RAhhYAJ9MDmqlokHX9taocptB94ySwjZCSwCdGHhK
/1KaLvMBE1ubaNILK843FSM=
=q5+J
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log-v.patch
Type: text/x-patch
Size: 1871 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050715/12886ca6/attachment.bin 


More information about the bazaar mailing list