All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Eric S. Raymond" <esr@thyrsus.com>
To: git@vger.kernel.org, gitster@pobox.com
Subject: [PATCH] Improved documentation for the ciabot scripts.
Date: Thu, 23 Aug 2012 00:10:53 -0400	[thread overview]
Message-ID: <20120823041053.GA11353@thyrsus.com> (raw)

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
---
 contrib/ciabot/INSTALL |   39 +++++++++++++++++++++++++++++++++++++++
 contrib/ciabot/README  |   14 ++++++++++++--
 2 files changed, 51 insertions(+), 2 deletions(-)
 create mode 100644 contrib/ciabot/INSTALL

diff --git a/contrib/ciabot/INSTALL b/contrib/ciabot/INSTALL
new file mode 100644
index 0000000..dbfd165
--- /dev/null
+++ b/contrib/ciabot/INSTALL
@@ -0,0 +1,39 @@
+= Installation instructions =
+
+Two scripts are included.  The Python one (ciabot.py) is faster and
+more capable; the shell one (ciabot.sh) is a fallback in case Python
+gives your git hosting site indigestion. (I know of no such sites.)
+
+It is no longer necessary to modify the script in order to put it
+in place; in fact, this is now discouraged. It is entirely
+configurable with the following git config variables:
+
+ciabot.project = name of the project (required)
+ciabot.repo = name of the project repo for gitweb/cgit purposes
+ciabot.xmlrpc  = if true (default), ship notifications via XML-RPC
+ciabot.revformat = format in which the revision is shown
+
+The ciabot.repo value defaults to ciabot.project lowercased.
+
+The revformat variable may have the following values
+raw -> full hex ID of commit
+short -> first 12 chars of hex ID
+describe -> describe relative to last tag, falling back to short
+The default is 'describe'.
+
+Once you've set these variables, try your script with -n to see the
+notification message dumped to stdout and verify that it looks sane.
+
+After verifying correct function, install one of these scripts either
+in a post-commit hook or in an update hook.
+
+In post-commit, run it without arguments. It will query for
+current HEAD and the latest commit ID to get the information it
+needs.
+
+In update, call it with a refname followed by a list of commits:
+You want to reverse the order git rev-list emits because it lists
+from most recent to oldest.
+
+/path/to/ciabot.py ${refname} $(git rev-list ${oldhead}..${newhead} | tac)
+
diff --git a/contrib/ciabot/README b/contrib/ciabot/README
index 3b916ac..9eccca3 100644
--- a/contrib/ciabot/README
+++ b/contrib/ciabot/README
@@ -8,5 +8,15 @@ You probably want the Python version; it's faster, more capable, and
 better documented.  The shell version is maintained only as a fallback
 for use on hosting sites that don't permit Python hook scripts.
 
-You will find installation instructions for each script in its comment
-header.
+To test these scripts, your project needs to have been registered with
+the CIA site.  Here are the steps:
+
+1. Open an IRC window on irc://freenode/commits or your registered 
+   project IRC channel.  
+
+2. Run ciabot.py and/or ciabot.sh from any directory under git
+   control, using the -p option to pass in your project name.
+
+You should see a notification on the channel for your most recent commit.
+
+See the file INSTALL for installation instructions.
-- 
1.7.9.5

-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

                 reply	other threads:[~2012-08-23  4:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120823041053.GA11353@thyrsus.com \
    --to=esr@thyrsus.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.