[rfc] [patch] speeding up bzr log with a tree delta iterator

John A Meinel john at arbash-meinel.com
Thu Jan 19 16:27:55 GMT 2006


Denys Duchier wrote:
> Denys Duchier <duchier at ps.uni-sb.de> writes:
> 
>> John A Meinel <john at arbash-meinel.com> writes:
>>
>>> What about changing the interface to that?
>>>
>>> compare_trees_iter(branch, revisions)
>> as such that doesn't work because compare_trees(old_tree, new_tree) isn't
>> commutative.  we could pass a list of pairs (old_revid, new_revid) which also
>> would have the advantage of saying explicitely what needs to be done at the
>> boundaries (I mean at each end of the given list).
> 
> How about:
> 
> 	Branch.revision_iter(rev1,rev2,reverse=False,delta=False)
> 
> returning an iterator where each next() returns:
> 
> 	revno, revid, delta_or_None
> 
> this way we cover iteration both with and without computing deltas and
> everything is always in sync.
> 
> --Denys
> 

That seems generally more useful. I still wish log could support 1
revision which is not in the revision-history.

I do know that at that point 'log' already has a list of revisions,
which seems that you could have:
Branch.revision_iter(revisions, delta=False).

I would just say that 'revisions' would need to be padded, so the first
entry is not included in the delta.

I just realized why you need 'reverse', because you are displaying the
'forward' changes, but just displaying them in reverse order.

What about:
  def revision_delta_iter(branch, revisions, reverse=False):

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060119/ff690922/attachment.pgp 


More information about the bazaar mailing list