install_hook once from multiple plugins
Alexander Belchenko
bialix at ukr.net
Tue Apr 27 14:39:51 BST 2010
Hi,
I'm pondering on some vague idea when I want to share some functionality
between 2 (or may be more) plugins. This functionality is based on the
usage of hooks. So I'm trying to understand what is the right path will
be for this: extract the required hook into 3rd plugin and make that 3rd
plugin mandatory for first two, or thinking about implement method in
bzr like `install_unique_hook` and pass special argument here (some tag)
to avoid the same hook installed twice.
For example, I've added MRU commit-history list to QBzr and then
realized I can provide access to this feature for CLI users. So CLI
users don't need to install QBzr but can use another (lightweight)
plugin, named, say, commit-history, or mru-history.
On the other hand maybe I should make mru-history dependency for QBzr
and therefore make MRU functionality optional in QBzr if that
(imaginary) plugin is not installed? Something similar we do for
bzr-search... But I'm not sure I want to create mru-history plugin right
now.
Or maybe I bother about such things too early?
Alexander
More information about the bazaar
mailing list