[BUG?] revisiontree's root node has no revision attribute set

John Arbash Meinel john at arbash-meinel.com
Thu Jul 27 14:23:54 BST 2006


Aaron Bentley wrote:
> Robert Collins wrote:
>>> For a RevisionTree, for any entry you can use 'entry.revision' to get
>>> the last changed revision.
>>>
>>> We dont currently set that for the root node.
>>>
>>> I think a reasonable change for this is to start by setting it to the
>>> revision_id of the revision tree.
> 
> Isn't the revision_id for directories only changed when we move or
> rename them?  And therefore, isn't it impossible for it to have changed
> since the first commit?  So shouldn't we use the revision-id of the
> first commit?
> 
> The lack of a revision_id was the reason we were talking about upgrading
> repositories for nested-trees.

I thought directories were modified whenever we change a file inside
them. But you're right, it is only modified when the dir itself is modified.

> 
>>> We could also change commit to start recording changes to the root the
>>> same way it records changes to other directories.
> 
> I am definitely in favour of that, but I believe it's an inventory (and
> therefore repository) format change.
> 
>>> I'm seeking a +1 on the former reasonably urgently, so that the dirstate
>>> serialiser can do something sane
> 
> One option would be to use NOT_REVISION until such data is available.
> 
> Aaron

So ignore my earlier post about root getting the revision_id of the last
commit. I guess it depends what we want to be consistent with.
If we want to be consistent with the root node being a directory, then
it should get the revision_id of the first commit.
If we want it to be the source of the tree/inventory, then it would take
the revision_id of the last commit.

I think for the nested tree work, we would want it to have the revision
id of the last commit. But that makes it different from all the other
directory nodes.

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/20060727/e47b847f/attachment.pgp 


More information about the bazaar mailing list