/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to doc/en/user-guide/writing_a_plugin.txt

  • Committer: Martin von Gagern
  • Date: 2010-04-20 08:47:38 UTC
  • mfrom: (5167 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5195.
  • Revision ID: martin.vgagern@gmx.net-20100420084738-ygymnqmdllzrhpfn
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
``bzrlib.commands.register_command(cmd_foo)``.  You must register the
23
23
command when your file is imported, otherwise bzr will not see it.
24
24
 
 
25
Specifying a plugin version number
 
26
----------------------------------
 
27
Simply define ``version_info`` to be a tuple defining the current version
 
28
number of your plugin. eg.
 
29
``version_info = (0, 9, 0)``
 
30
``version_info = (0, 9, 0, 'dev', 0)``
 
31
 
25
32
Plugin searching rules
26
33
----------------------
27
34
 
28
 
Bzr will scan ``bzrlib/plugins`` and ``~/.bazaar/plugins`` for plugins
29
 
by default.  You can override this with ``BZR_PLUGIN_PATH``.  Plugins
30
 
may be either modules or packages.  If your plugin is a single file,
31
 
you can structure it as a module.  If it has multiple files, or if you
32
 
want to distribute it as a bzr branch, you should structure it as a
 
35
Bzr will scan ``~/.bazaar/plugins``  and ``bzrlib/plugins`` for plugins
 
36
by default.  You can override this with  ``BZR_PLUGIN_PATH``
 
37
(see `User Reference <../user-reference/bzr_man.html#bzr-plugin-path>`_
 
38
for details).
 
39
 
 
40
Plugins may be either modules or packages.  If your plugin is a single
 
41
file, you can structure it as a module.  If it has multiple files, or if
 
42
you want to distribute it as a bzr branch, you should structure it as a
33
43
package, i.e. a directory with an ``__init__.py`` file.
34
44
 
35
45
More information