Rev 183: Update commit-notify to use new dbus api, and show remote URL's. in file:///home/robertc/source/baz/plugins/gtk/trunk/
Robert Collins
robertc at robertcollins.net
Mon Mar 26 07:19:00 BST 2007
At file:///home/robertc/source/baz/plugins/gtk/trunk/
------------------------------------------------------------
revno: 183
revision-id: robertc at robertcollins.net-20070326061845-ddc0sl9umubkyuzy
parent: jelmer at samba.org-20070323134329-xx25fcg5hsh7noat
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Mon 2007-03-26 16:18:45 +1000
message:
Update commit-notify to use new dbus api, and show remote URL's.
modified:
__init__.py __init__.py-20060519165329-a1fd52c8a829fcd5
=== modified file '__init__.py'
--- a/__init__.py 2007-03-23 13:43:29 +0000
+++ b/__init__.py 2007-03-26 06:18:45 +0000
@@ -462,17 +462,13 @@
broadcast_service = bus.get_object(
activity.Broadcast.DBUS_NAME,
activity.Broadcast.DBUS_PATH)
- def catch_branch(revision_id, url):
+ def catch_branch(revision_id, urls):
+ # TODO: show all the urls, or perhaps choose the 'best'.
+ url = urls[0]
try:
if isinstance(revision_id, unicode):
revision_id = revision_id.encode('utf8')
transport = get_transport(url)
- try:
- transport.local_abspath('.')
- except errors.TransportNotPossible:
- # dont show remote urls for now.
- return
- # here we should:
a_dir = BzrDir.open_from_transport(transport)
branch = a_dir.open_branch()
revno = branch.revision_id_to_revno(revision_id)
@@ -484,7 +480,6 @@
body += '\n'
body += revision.message
body = cgi.escape(body)
- #print repr(body)
nw = pynotify.Notification(summary, body)
nw.set_timeout(5000)
nw.show()
More information about the bazaar-commits
mailing list