README

Fri, 16 Dec 2011 23:42:24 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 16 Dec 2011 23:42:24 +0000
changeset 6
f54217e38365
parent 4
6876a8966aaf
permissions
-rw-r--r--

README: Fix example service name (thanks Florob)

4
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
1 hg2pubsub is a small script to make it easy to post Mercurial commits to an XMPP pubsub (XEP-0060) service.
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
2
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
3 It posts the commits in the standard ATOM format, so they can be easily consumed by existing tools,
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
4 clients (for example, Gajim) and bots (for example, Riddim).
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
5
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
6 Installation:
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
7
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
8 - Requires Verse: http://code.matthewwild.co.uk/verse
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
9 - Run 'make install' to install to /usr/local/bin
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
10
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
11 Usage:
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
12
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
13 hg2pubsub CONFIG SERVICE NODE ID URL
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
14
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
15 Where the parameters are as follows:
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
16
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
17 - CONFIG: The filename of the config file containing the XMPP server credentials. The file
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
18 is a simple text file, with the first line as the JID and the second line as the password.
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
19 Ensure the permissions on this file prevent other users on the system from reading it.
6
f54217e38365 README: Fix example service name (thanks Florob)
Matthew Wild <mwild1@gmail.com>
parents: 4
diff changeset
20 - SERVICE: The pubsub service to publish to, e.g. 'pubsub.example.com'.
4
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
21 - NODE: The pubsub node to publish to, e.g. 'commits'
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
22 - ID: The item id. Use the project name or branch - e.g. 'trunk'.
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
23 - URL: If your repository is accessible via the web, set this to the root of your project,
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
24 e.g. 'http://code.example.com/'.
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
25
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
26 You need to pipe to hg2pubsub the commits you want it to announce as XML. Mercurial supports XML output natively
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
27 using '--style xml'.
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
28
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
29 Here is an example commit hook that would go in ~/.hgrc (system-wide) or project/.hg/hgrc (project only) to
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
30 publish commits:
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
31
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
32 [hooks]
6876a8966aaf README: Added.
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
33 changegroup.pubsub = hg log -r $HG_NODE: --style xml | hg2pubsub ~/.hg2pubsub pubsub.example.com commits $(basename $PWD) http://code.example.com/ >/dev/null

mercurial