README: Added.

Sun, 11 Dec 2011 02:49:37 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Sun, 11 Dec 2011 02:49:37 +0000
changeset 4
6876a8966aaf
parent 3
e6d20e578df3
child 5
737258ea32e9

README: Added.

README file | annotate | diff | comparison | revisions
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README	Sun Dec 11 02:49:37 2011 +0000
@@ -0,0 +1,33 @@
+hg2pubsub is a small script to make it easy to post Mercurial commits to an XMPP pubsub (XEP-0060) service.
+
+It posts the commits in the standard ATOM format, so they can be easily consumed by existing tools,
+clients (for example, Gajim) and bots (for example, Riddim).
+
+Installation:
+
+  - Requires Verse: http://code.matthewwild.co.uk/verse
+  - Run 'make install' to install to /usr/local/bin
+
+Usage:
+
+   hg2pubsub CONFIG SERVICE NODE ID URL
+
+Where the parameters are as follows:
+
+  - CONFIG: The filename of the config file containing the XMPP server credentials. The file
+    is a simple text file, with the first line as the JID and the second line as the password.
+    Ensure the permissions on this file prevent other users on the system from reading it.
+  - SERVICE: The pubsub service to publish to, e.g. 'example.pubsub.com'.
+  - NODE: The pubsub node to publish to, e.g. 'commits'
+  - ID: The item id. Use the project name or branch - e.g. 'trunk'.
+  - URL: If your repository is accessible via the web, set this to the root of your project,
+    e.g. 'http://code.example.com/'.
+
+You need to pipe to hg2pubsub the commits you want it to announce as XML. Mercurial supports XML output natively
+using '--style xml'.
+
+Here is an example commit hook that would go in ~/.hgrc (system-wide) or project/.hg/hgrc (project only) to
+publish commits:
+
+  [hooks]
+  changegroup.pubsub = hg log -r $HG_NODE: --style xml | hg2pubsub ~/.hg2pubsub pubsub.example.com commits $(basename $PWD) http://code.example.com/ >/dev/null

mercurial