[RFC] Tree.iter_changes
Aaron Bentley
aaron.bentley at utoronto.ca
Thu Sep 21 01:28:58 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
>>>> I like the approach. But I think we need a way to get at this stuff
>>>> without having to build the inventory.
>> I don't understand. Why would that require building the inventory?
>>
>> By default, it only emits information about modified files, and it does
>> not emit inventory entries, just tuples.
>
> Passing in a Tree object currently requires building an inventory.
Only for RevisionTrees, not WorkingTrees or ChangesetTrees.
We need facilities to compare trees, and I think we should use the same
facilities in status, revert and commit. That's the purpose of
Tree.iter_changes.
So we don't really have an alternative. We must have a tree-oriented
API. It doesn't have to be our only API. We could also have a
'changes_from_parent' API and a 'changes_between_revisions' API. I just
think it's cleaner to use the same API in all cases.
> We have discussed making this lazy, or something like that.
Actually, I think Robert wants to deprecate the inventory.
My only issue is that lazy loading can kill the advantage of retrieving
many revision trees at once. But we can work around it, I'm sure.
> I think it
> becomes a little weird to not use the RevisionTree object that is passed
> in for anything more than its .revision_id.
We would also use its repository, I think. Yeah, I know it's still weird.
> So, I don't know if it is better to pass a RevisionTree or a revision_id
> + revision source object. But I can look at what you have done tomorrow,
> and give you more feeback on the specific implementation.
The latest work is here:
http://code.aaronbentley.com/bzr/bzrrepo/tree-compare/
I've got it down to ~1 stat per file. But it's more about API than
implementation, at this point.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFEdzK0F+nu1YWqI0RApOWAJ4nzmwYRjp+yWmBoShy6As5tTIV2ACfZWiU
f+mELhHGf3py99Kg4quKuEw=
=R+v8
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list