[BUG?] revisiontree's root node has no revision attribute set
John Arbash Meinel
john at arbash-meinel.com
Thu Jul 27 14:10:34 BST 2006
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.
> We could also change commit to start recording changes to the root the
> same way it records changes to other directories.
> I'm seeking a +1 on the former reasonably urgently, so that the dirstate
> serialiser can do something sane, and for the latter, while I think its
> a good idea its not urgent - it only has to be done, or something
> similar, for trees when the root node logic comes in.
Since we are trying to phase in the root node as a real node, I agree
that we should set the revision_id on it.
We are already setting and reading the 'revision_id' for the entire
Inventory object. (CommitBuilder.finish_inventory() does
self.new_inventory.revision_id = self._new_revision_id)
So we could certainly update that to also set the root-node revision id.
I think there are a couple ways to do it. One would be to have the root
node revision_id be a property that thunks over to
Inventory.revision_id. The other way would be just the opposite. To have
Inventory thunk over to the root node.
I don't think we want two copies, which can then get out of sync.
Anyway, I think it should get set. But I think it should stay in sync
with the Inventory too.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060727/92852958/attachment.pgp
More information about the bazaar