From 6a73fedeef5fea9b643fa5f7a47f4b161c6cf5de Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 11 Nov 2012 12:17:30 +0200 Subject: [PATCH] rename to bzrirker everywhere. Add project name option --- __init__.py | 14 ++++++++------ irkerhook.py | 2 ++ setup.py | 8 ++++---- tests/testirker.py | 2 +- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/__init__.py b/__init__.py index 31a2680..ca1768e 100644 --- a/__init__.py +++ b/__init__.py @@ -13,7 +13,7 @@ from bzrlib.lazy_import import lazy_import # lazy_import so that it doesn't get loaded if it isn't used # Approach borrowed from bzr-email lazy_import(globals(), """\ -from bzrlib.plugins.irkerhook import irkerhook as _irkerhook +from bzrlib.plugins.bzrirker import irkerhook as _irkerhook """) @@ -40,18 +40,20 @@ def branch_post_change_hook(params): def test_suite(): from unittest import TestSuite - import bzrlib.plugins.irkerhook.tests + import bzrlib.plugins.bzrirker.tests result = TestSuite() - result.addTest(bzrlib.plugins.irkerhook.tests.test_suite()) + result.addTest(bzrlib.plugins.bzrirker.tests.test_suite()) return result option_registry.register_lazy("irker_channels", - "bzrlib.plugins.irkerhook.irkerhook", "opt_irker_channels") + "bzrlib.plugins.bzrirker.irkerhook", "opt_irker_channels") option_registry.register_lazy("irker_colours", - "bzrlib.plugins.irkerhook.irkerhook", "opt_irker_colours") + "bzrlib.plugins.bzrirker.irkerhook", "opt_irker_colours") option_registry.register_lazy("irker_url", - "bzrlib.plugins.irkerhook.irkerhook", "opt_irker_url") + "bzrlib.plugins.bzrirker.irkerhook", "opt_irker_url") +option_registry.register_lazy("irker_project", + "bzrlib.plugins.bzrirker.irkerhook", "opt_irker_project") from bzrlib.hooks import install_lazy_named_hook install_lazy_named_hook("bzrlib.branch", "Branch.hooks", 'post_commit', diff --git a/irkerhook.py b/irkerhook.py index b2dd4fe..208c0d8 100644 --- a/irkerhook.py +++ b/irkerhook.py @@ -112,3 +112,5 @@ opt_irker_channels = Option('irker_channels', help='Channel(s) to post commit messages to.') opt_irker_colours = Option('irker_colours', help='Colour option for irker.') +opt_irker_project = Option('irker_project', + help='Project name to use.') diff --git a/setup.py b/setup.py index 867e24e..4b78ee5 100755 --- a/setup.py +++ b/setup.py @@ -15,8 +15,8 @@ if __name__ == '__main__': long_description=""" Hooks into Bazaar and sends commit notification messages via irker. """, - package_dir={'bzrlib.plugins.irkerhook':'.', - 'bzrlib.plugins.irkerhook.tests':'tests'}, - packages=['bzrlib.plugins.irkerhook', - 'bzrlib.plugins.irkerhook.tests'] + package_dir={'bzrlib.plugins.bzrirker':'.', + 'bzrlib.plugins.bzrirker.tests':'tests'}, + packages=['bzrlib.plugins.bzrirker', + 'bzrlib.plugins.bzrirker.tests'] ) diff --git a/tests/testirker.py b/tests/testirker.py index 918edd2..8bec6d0 100644 --- a/tests/testirker.py +++ b/tests/testirker.py @@ -10,7 +10,7 @@ from bzrlib import ( ) from bzrlib.bzrdir import BzrDir from bzrlib.tests import TestCaseInTempDir -from bzrlib.plugins.irker.irkerhook import IrkerSender +from bzrlib.plugins.bzrirker.irkerhook import IrkerSender def test_suite(): -- 2.34.1