Rev 29: Documentation cleanup. in http://people.ubuntu.com/~robertc/baz2.0/plugins/dbus/trunk

Robert Collins robertc at robertcollins.net
Sun Jul 8 07:41:43 BST 2007


At http://people.ubuntu.com/~robertc/baz2.0/plugins/dbus/trunk

------------------------------------------------------------
revno: 29
revision-id: robertc at robertcollins.net-20070708064128-5syogfxrudsw48r0
parent: robertc at robertcollins.net-20070518180812-qb97lbypzysu0eb0
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Sun 2007-07-08 16:41:28 +1000
message:
  Documentation cleanup.
modified:
  README                         readme-20070206032729-2b5teqiwctqrfgei-2
  TODO                           todo-20070206032729-2b5teqiwctqrfgei-3
  __init__.py                    __init__.py-20070206032729-2b5teqiwctqrfgei-4
  hook.py                        hook.py-20070206032729-2b5teqiwctqrfgei-5
=== modified file 'README'
--- a/README	2007-03-27 08:24:58 +0000
+++ b/README	2007-07-08 06:41:28 +0000
@@ -33,34 +33,7 @@
     process that looks like ``/usr/bin/dbus-daemon --system``. Alternatively
     you can restart your system.
 
-This plugin currently provides a dbus service, which is automatically activated
-if you have followed the installation procedures above. If you have not done
-so, you can still manually start it by running 'bzr dbus-broadcast'. This
-service allows programs to subscribe to dbus notification of new revisions.
-This service is fully documented in its python code - see 'pydoc
-bzrlib.plugins.dbus.activity.Broadcast'.
-
-The plugin also install a bzr hook to notify the broadcast service of new
-revisions in branches, allowing other programs to react when bzr completes a
-push/pull/commit/uncommit. This should be useful for IDE's and other editors
-working in the same space as bzr, or for integration with network services.
-
 What next?
 ----------
 
-Once bzr-dbus is installed, you can start to play with it. There are currently
-two useful commands (at the time of writing!):
-
- * bzr lan-notify. Run this command to have bzr-dbus send and receive branch
-   change messages over the local area network. This is useful in a sprint
-   setting. The lan-notify command should be put into the background - e.g.
-   ``bzr lan-notify &``.
- * bzr commit-notify. This command, shipped in the 'bzr-gtk' plugin, will
-   provide a gui notification when a branch has changed. When combined with
-   lan-notify commits made to published branches become visible to your
-   peers on a local network.
- * bzr serve: A running bzr server provides a convenient way to share your
-   branches when behind a slow network connection. Currently it does not
-   calculate the URL it is running at correctly *by default*, so check your
-   machines ip address and then run bzr serve manually. e.g.
-   ``cd ~/source/project-foo; bzr serve --port=192.168.1.2:4155``.
+Use ``bzr help dbus`` to access the online help for the dbus plugin.

=== modified file 'TODO'
--- a/TODO	2007-03-26 12:36:51 +0000
+++ b/TODO	2007-07-08 06:41:28 +0000
@@ -10,4 +10,4 @@
    determine public urls? (how can it tell that something is there? This TODO
    may be inherently flawed).
  * have the announce_revision method read bazaar.conf to pickup statically
-   configured servers.
+   configured servers. (requires server configuration to be possible ;)).

=== modified file '__init__.py'
--- a/__init__.py	2007-03-26 12:36:51 +0000
+++ b/__init__.py	2007-07-08 06:41:28 +0000
@@ -16,9 +16,50 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 # 
 
-"""DBus integration for bzr/bzrlib. 
-
-Currently nothing works, please see TODO.
+"""D-Bus integration for bzr/bzrlib. 
+
+This plugin provides integration with D-Bus and optional local-LAN commit
+broadcasting. Please see README for installation instructions which will
+correctly configure the D-Bus service included in the plugin.
+
+The integration involves a D-Bus advertising daemon and hooks into the bzr
+library to reflect events (e.g. push/pull/commit/uncommit) across to D-Bus. 
+This should be useful for IDE's and other editors working in the same space as
+bzr, or for integration with network services.
+
+
+Commands provided:
+------------------
+
+ * dbus-broadcast: D-Bus commit/branch advertising daemon. The D-Bus service
+   which is activated on demand if it has been correctly installed. If for some
+   reason you cannot correctly install the .service file this command can be
+   run by hand.
+   This service is fully documented in its python code - see 'pydoc
+   bzrlib.plugins.dbus.activity.Broadcast'.
+ * lan-notify: Provide a bi-directional gateway of commit-notifications to the
+   local LAN. Only the URL and revision-id are disclosed, no commit content is
+   transmitted. This command is typically put into the background - e.g. ``bzr
+   lan-notify &``. ``lan-notify`` is very useful in local LAN collaboration to
+   keep multiple developers in sync.
+
+
+Related commands:
+-----------------
+
+ * bzr commit-notify. This command, shipped in the 'bzr-gtk' plugin, will
+   provide a gui notification when a branch has changed. When combined with
+   lan-notify commits made to published branches become visible to your
+   peers on a local network.
+ * bzr serve: Running a bzr server provides a convenient way to share your
+   branches locally. When you commit into a branch which is currently served
+   by a bzr server, then the address of the server is used in the D-Bus
+   notifications. This can be very useful for ad-hoc sharing of branches when
+   accessing the original data over the internet is slow and or expensive.
+   Note that ``bzr server`` does not currently calculate the URL it is running
+   at correctly *by default*, so check your machines ip address and then run
+   bzr serve manually. e.g.  ``cd ~/source/project-foo; bzr serve
+   --port=192.168.1.2:4155``.
 """
 
 from bzrlib import commands

=== modified file 'hook.py'
--- a/hook.py	2007-04-23 05:28:58 +0000
+++ b/hook.py	2007-07-08 06:41:28 +0000
@@ -41,11 +41,13 @@
     activity.Activity().advertise_branch(branch)
 
 
-def on_server_start(local_url, public_url):
+def on_server_start(local_urls, public_url):
     """Add the servers local and public urls to the session Broadcaster."""
-    activity.Activity().add_url_map(local_url, public_url)
-
-
-def on_server_stop(local_url, public_url):
+    for local_url in local_urls:
+        activity.Activity().add_url_map(local_url, public_url)
+
+
+def on_server_stop(local_urls, public_url):
     """The server has shutdown, so remove the servers local and public urls."""
-    activity.Activity().remove_url_map(local_url, public_url)
+    for local_url in local_urls:
+        activity.Activity().remove_url_map(local_url, public_url)




More information about the bazaar-commits mailing list