Comment 1 for bug 800490

Revision history for this message
Martin Pool (mbp) wrote :

Hi Mark,

You should be able to get this now using bzrlib; see for example <http://doc.bazaar.canonical.com/bzr.dev/developers/plugin-api.html>.

If you need something that you can't get there, or can't work out how to get there, or if you specifically need to get it through the Launchpad api rather than through bzr, please let us know.

Something like this should work:

In [1]: from bzrlib import branch

In [3]: import bzrlib

In [4]: bzrlib.initialize()
Out[4]: <bzrlib.library_state.BzrLibraryState object at 0x319e910>

In [6]: import bzrlib.plugins.launchpad

In [7]: b = branch.Branch.open('lp:bzr')

In [8]: b.lock_read()
Out[8]: LogicalLockResult(<bound method RemoteBranch.unlock of RemoteBranch(bzr+ssh://bazaar.launchpad.net/%2Bbranch/bzr/)>)

In [9]: last_rev = b.las
b.last_revision b.last_revision_info

In [10]: b.last_revision_info()
Out[10]: (6001, '<email address hidden>')

In [11]: wt = b.repository.revision_tree(b.last_revision())
    72kB 135kB/s -
In [12]: wt
Out[12]: <InventoryRevisionTree instance at 3b33a90, <email address hidden>'>

In [13]: rev = b.repository.get_revision(b.last_revision())
   320kB 218kB/s |

In [14]: rev.message
Out[14]: u'(mbp) remove __contains__ methods from inventory and dict (Martin Pool)'