[BZR Tree!] Updated shelf

John Arbash Meinel john at arbash-meinel.com
Fri Jun 17 07:15:10 BST 2005


Michael Ellerman wrote:

>Hey sports fans,
>
>I've just uploaded my bzr tree of shelf to my website, you can pull it with:
>
># bzr init
># bzr pull http://michael.ellerman.id.au/files/shelf
>
>suh-weet!
>
>You'll need to run 'chmod u+x shelve unshelve' once you suck it down.
>
>This has a few bug fixes and general goodness since the last tar ball I sent
>(I think I sent it?).
>
>The UI is much nicer than the first version, with defaults (ie. whack Enter),
>inversion of selections, jump-to-end, restart selection, and a "are you sure"
>prompt at then end.
>
>cheers
>
>
>
Generally this seems very nice. Thanks for all the good work.

Since I have been working on native plugins (rather than spawning
sub-processes) I figured I would give it a shot.
The attached patch modifies your code so that acts like a real bzr plugin.

This should work with the latest bzr, but should also be compatible with
my work on updating the plugin system.
If you have a stock bzr, then you want put shelf into BZRPLUGINPATH=
(It technically loads all of the .py files, but it only gets commands
out of the last one).
If you have applied my last patch, you could just put the directory into
~/.bzr/plugins/
And since I use the "__init__.py" form, it should load automatically
(and only load __init__.py until you need more.)

Anyway, it seemed nicer to use bzrlib rather than spawning bzr for
different interactions. Though I still cheat a little bit by passing a
StringIO() object as the "output file" of some commands. Instead, it
would make more sense to tie in at a lower level, rather than at the
show_diff_trees() level.

John
=:->

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bzr-shelf-native-plugin.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20050617/d702889b/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050617/d702889b/attachment.pgp 


More information about the bazaar mailing list