calling other bzr commands from with a plugin

Jamie Wilkinson jaq at spacepants.org
Mon Nov 21 04:26:37 GMT 2005


This one time, at band camp, Martin Pool wrote:
>On 21 Nov 2005, Jamie Wilkinson <jaq at spacepants.org> wrote:
>> What's the correct procedure for calling other Commands from within a
>> plugin?
>> 
>> Specifically, I want to call Aaron's 'patch' command from bzrtools, but
>> without shelling out to os.system.
>
>Probably call bzrlib.commands.run_bzr, run_bzr_catch_errors or something
>similar.  But consider first if there isn't a more machine-oriented API
>that will do what you want, such as in this case
>bzrlib.plugins.bzrtools.patch.patch.  

The machine-oriented API is exactly what I was looking for, thanks.




More information about the bazaar mailing list