bzrlib API question

Robey Pointer robey at lag.net
Tue Feb 21 18:11:45 GMT 2006


Now that the repository branch has landed, I had to fix a few places  
where I was using bzrlib in one of my projects -- which is okay, I  
knew what I was getting into. :)  But I want to make sure that what  
I'm doing is the "right" way.

I had lines like:

     [...] bzrlib.log.find_touching_revisions(b, file_id)
     rev = b.get_revision(revid)

and:

     tree = b.revision_tree(b.get_rev_id(revno))

which I changed to:

     [...] bzrlib.log.find_touching_revisions(b, file_id)
     rev = b.repository.get_revision(revid)

and:

     tree = b.repository.revision_tree(b.get_rev_id(revno))

(In other words, I kept everything the same, but used 'b.respository'  
instead of 'b'.)

Am I doing the right thing, or is there a better way to do this?

robey





More information about the bazaar mailing list