iterating over revisions in a branch
Robert Collins
robertc at robertcollins.net
Wed Jan 4 23:02:40 GMT 2006
On Wed, 2006-01-04 at 14:05 +0100, Jelmer Vernooij wrote:
> > It occurred to me just now that it doesn't feel right. If I'm iterating
> > over revisions, I shouldn't have to extract the revision during the body of
> > the iterator loop, surely instead of the revision id I should get back the
> > whole revision?
>
> Efficiency. The list of revision ids can be read directly from the
> .bzr/revision-history file. Reading the revision itself requires reading
> the appropriate file in .bzr/revisions/ (amongst other files).
Eh? return an iterator over revisions, no revisions need to be
constructed until you actually access them, if you reverse the iterator
I'm pretty sure you can implement some __thing__ to tell python that you
know how to reverse better than it does.
Still, revision_history does not imply iterator to me, so I think that
discussion is already on a tangent :)
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060105/3c2467c0/attachment.pgp
More information about the bazaar
mailing list