[Pkg-bazaar-commits] ./bzr-dbus/unstable r44: Merge new upstream snapshot.
Jelmer Vernooij
jelmer at samba.org
Fri Apr 10 12:28:39 UTC 2009
------------------------------------------------------------
revno: 44
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: debian
timestamp: Mon 2008-08-04 22:14:19 +0200
message:
Merge new upstream snapshot.
modified:
debian/changelog
hook.py
setup.py
tests/test_hook.py
------------------------------------------------------------
revno: 33.2.1
committer: James Henstridge <james at jamesh.id.au>
branch nick: bzr-dbus.bug-198645
timestamp: Mon 2008-05-12 09:51:01 +0800
message:
Switch to install_named_hook() API since install_hook() prints lots of
deprecation warnings. Remove compat code for older releases.
modified:
hook.py
tests/test_hook.py
------------------------------------------------------------
revno: 33.3.1
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Sun 2008-06-08 15:17:02 +1000
message:
Merge James Henstridges fix for commits not triggering notifications, and deprecation updates. Raises the minimum version of bzrlib needed to approximately 1.4.
modified:
hook.py
setup.py
tests/test_hook.py
-------------- next part --------------
=== modified file 'debian/changelog'
--- a/debian/changelog 2008-05-15 15:40:51 +0000
+++ b/debian/changelog 2008-08-04 20:14:19 +0000
@@ -1,3 +1,9 @@
+bzr-dbus (0.1~bzr36-1) unstable; urgency=low
+
+ * New upstream snapshot.
+
+ -- Jelmer Vernooij <jelmer at samba.org> Mon, 04 Aug 2008 22:14:03 +0200
+
bzr-dbus (0.1~bzr35-4) unstable; urgency=low
* Fix deprecation warnings when using newer versions of Bazaar.
=== modified file 'hook.py'
--- a/hook.py 2008-05-07 15:29:35 +0000
+++ b/hook.py 2008-08-04 20:14:19 +0000
@@ -27,22 +27,15 @@
def install_hooks():
"""Install the dbus hooks into bzrlib."""
- if 'post_change_branch_tip' in Branch.hooks:
- Branch.hooks.install_named_hook('post_change_branch_tip',
- on_post_change_branch_tip, None)
- else:
- Branch.hooks.install_named_hook('set_rh', on_set_rh, None)
- try:
- SmartTCPServer.hooks
- except AttributeError:
- return
- SmartTCPServer.hooks.install_named_hook('server_started', on_server_start, None)
- SmartTCPServer.hooks.install_named_hook('server_stopped', on_server_stop, None)
-
-
-def on_set_rh(branch, rev_history):
- """Announce the new revision_history of branch to dbus."""
- activity.Activity().advertise_branch(branch)
+ Branch.hooks.install_named_hook(
+ 'post_change_branch_tip', on_post_change_branch_tip,
+ 'Announcing on branch change on D-Bus')
+ SmartTCPServer.hooks.install_named_hook(
+ 'server_started', on_server_start,
+ 'Registering server URL mapping')
+ SmartTCPServer.hooks.install_named_hook(
+ 'server_stopped', on_server_stop,
+ 'Unregistering server mapping')
def on_post_change_branch_tip(params):
=== modified file 'setup.py'
--- a/setup.py 2008-03-04 23:17:39 +0000
+++ b/setup.py 2008-06-08 05:17:02 +0000
@@ -7,7 +7,7 @@
author_email="robert.collins at canonical.com",
license = "GPLV2",
url="https://launchpad.net/bzr-dbus",
- data_files=[('share/dbus-1/services',
+ data_files=[('share/dbus-1/services',
['org.bazaarvcs.plugins.dbus.Broadcast.service'])],
packages=['bzrlib.plugins.dbus',
'bzrlib.plugins.dbus.tests',
=== modified file 'tests/test_hook.py'
--- a/tests/test_hook.py 2008-04-18 05:22:49 +0000
+++ b/tests/test_hook.py 2008-05-12 01:51:01 +0000
@@ -31,12 +31,8 @@
"""Loading the plugin should have installed its hooks."""
# check by looking in self._preserved hooks.
# the set_rh Branch hook to detect branch changes.
- if 'post_change_branch_tip' in self._preserved_hooks[Branch]:
- self.assertTrue(hook.on_post_change_branch_tip in
- self._preserved_hooks[Branch]['post_change_branch_tip'])
- else:
- self.assertTrue(hook.on_set_rh in
- self._preserved_hooks[Branch]['set_rh'])
+ self.assertTrue(hook.on_post_change_branch_tip in
+ self._preserved_hooks[Branch]['post_change_branch_tip'])
# the server_started and server_stopped smart server hooks
# to detect url maps for servers.
self.assertTrue(hook.on_server_start in
@@ -48,35 +44,13 @@
"""dbus.hook.install_hooks() should install hooks."""
hook.install_hooks()
# check the branch hooks.
- if 'post_change_branch_tip' in Branch.hooks:
- self.assertTrue(hook.on_post_change_branch_tip in
- Branch.hooks['post_change_branch_tip'])
- else:
- self.assertTrue(hook.on_set_rh in Branch.hooks['set_rh'])
+ self.assertTrue(hook.on_post_change_branch_tip in
+ Branch.hooks['post_change_branch_tip'])
# check the SmartServer hooks.
- self.assertTrue(hook.on_server_start in SmartTCPServer.hooks['server_started'])
- self.assertTrue(hook.on_server_stop in SmartTCPServer.hooks['server_stopped'])
-
- def test_on_set_rh_hook(self):
- """The on_set_rh hook should hand off the branch to advertise it."""
- # change the global b.p.dbus.activity.Activity to instrument
- # on_set_rh.
- calls = []
- class SampleActivity(object):
-
- def advertise_branch(self, branch):
- calls.append(('advertise_branch', branch))
-
- # prevent api skew: check we can use the API SampleActivity presents.
- activity.Activity(bus=self.bus).advertise_branch(self.make_branch('.'))
- # now test the hook
- original_class = activity.Activity
- try:
- activity.Activity = SampleActivity
- hook.on_set_rh('branch', 'history')
- finally:
- activity.Activity = original_class
- self.assertEqual([('advertise_branch', 'branch')], calls)
+ self.assertTrue(hook.on_server_start in
+ SmartTCPServer.hooks['server_started'])
+ self.assertTrue(hook.on_server_stop in
+ SmartTCPServer.hooks['server_stopped'])
def test_on_post_change_branch_tip_hook(self):
"""The on_post_change_branch_tip hook should advertise the branch."""
More information about the Pkg-bazaar-commits
mailing list