~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/plugin-api.txt

  • Committer: Martin Pool
  • Date: 2009-01-23 18:44:10 UTC
  • mto: This revision was merged to the branch mainline in revision 3959.
  • Revision ID: mbp@sourcefrog.net-20090123184410-8no3skbgeghur5jh
More documentation and links about writing plugins

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
Plugin API
3
3
==========
4
4
 
5
 
Status
6
 
======
7
 
 
8
 
:Date: 2008-02-29
 
5
 
 
6
 
 
7
:Date: 2009-01-23
 
8
 
 
9
.. contents::
 
10
 
 
11
Introduction
 
12
============
9
13
 
10
14
bzrlib has a very flexible internal structure allowing plugins for many
11
15
operations. Plugins can add commands, new storage formats, diff and merge
12
16
features and more. This document provides an overview of the API and
13
17
conventions for plugin authors.
14
18
 
15
 
.. contents::
 
19
If you're writing a plugin and have questions not addressed by this
 
20
document, please ask us.
 
21
 
 
22
See also
 
23
--------
 
24
 
 
25
 * `Bazaar Developer Documentation Catalog <index.html>`_.
 
26
 * <http://bazaar-vcs.org/WritingPlugins> wiki page with many more
 
27
   suggestions about particular APIs
16
28
 
17
29
 
18
30
Structure of a plugin
209
221
Plugin registrations
210
222
====================
211
223
 
212
 
Registering commands
213
 
--------------------
214
 
 
215
 
.
 
224
The plugin ``__init__.py`` runs when the plugin is loaded during bzr
 
225
startup.  Generally the plugin won't want to actually do anything at this
 
226
time other than register or override functions to be called later.
 
227
 
 
228
The plugin can import bzrlib and call any function.
 
229
Some interesting APIs are described in <http://bazaar-vcs.org/WritingPlugins>
 
230
 
 
231
 
216
232
 
217
233
..
218
234
   vim: ft=rst tw=74 ai shiftwidth=4