/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: Jelmer Vernooij
  • Date: 2017-05-21 18:10:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521181028-zn04pdfw0od9hfj3
Rename brzlib => breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
------------
6
6
 
7
7
Plugins are very similar to brz core functionality.  They can import
8
 
anything in brzlib.  A plugin may simply override standard functionality,
 
8
anything in breezy.  A plugin may simply override standard functionality,
9
9
but most plugins supply new commands.
10
10
 
11
11
Creating a new command
12
12
----------------------
13
13
 
14
14
To create a command, make a new object that derives from
15
 
``brzlib.commands.Command``, and name it ``cmd_foo``, where foo is the name of
 
15
``breezy.commands.Command``, and name it ``cmd_foo``, where foo is the name of
16
16
your command.  If you create a command whose name contains an underscore,
17
17
it will appear in the UI with the underscore turned into a hyphen.  For
18
18
example, `cmd_baz_import` will appear as `baz-import`.  For examples of how
19
19
to write commands, please see ``builtins.py``.
20
20
 
21
21
Once you've created a command you must register the command with
22
 
``brzlib.commands.register_command(cmd_foo)``.  You must register the
 
22
``breezy.commands.register_command(cmd_foo)``.  You must register the
23
23
command when your file is imported, otherwise brz will not see it.
24
24
 
25
25
Installing a hook
40
40
Plugin searching rules
41
41
----------------------
42
42
 
43
 
Bzr will scan ``~/.bazaar/plugins``  and ``brzlib/plugins`` for plugins
 
43
Bzr will scan ``~/.bazaar/plugins``  and ``breezy/plugins`` for plugins
44
44
by default.  You can override this with  ``BZR_PLUGIN_PATH``
45
45
(see `User Reference 
46
46
<../user-reference/configuration-help.html#brz-plugin-path>`_ for details).