Browse Source
* maint: Prepare for 1.7.11.6 Make the ciabot scripts completely self-configuring in the normal case. Improved documentation for the ciabot scripts.maint

5 changed files with 140 additions and 23 deletions
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
Git v1.7.11.6 Release Notes |
||||
=========================== |
||||
|
||||
Fixes since v1.7.11.5 |
||||
--------------------- |
||||
|
||||
This is primarily documentation and low-impact code clarification. |
||||
|
||||
- "ciabot" script (in contrib/) has been updated with extensive |
||||
documentation. |
||||
|
||||
- The "--rebase" option to "git pull" can be abbreviated to "-r", |
||||
but we didn't document it. |
||||
|
||||
- It was generally understood that "--long-option"s to many of our |
||||
subcommands can be abbreviated to the unique prefix, but it was not |
||||
easy to find it described for new readers of the documentation set. |
||||
|
||||
- The "--topo-order", "--date-order" (and the lack of either means |
||||
the default order) options to "rev-list" and "log" family of |
||||
commands were poorly described in the documentation. |
||||
|
||||
- Older parts of the documentation described as if having a regular |
||||
file in .git/refs/ hierarchy were the only way to have branches and |
||||
tags, which is not true for quite some time. |
||||
|
||||
- A utility shell function test_seq has been added as a replacement |
||||
for the 'seq' utility found on some platforms. |
||||
|
||||
- Fallback 'getpass' implementation made unportable use of stdio API. |
||||
|
||||
- "git commit --amend" let the user edit the log message and then |
||||
died when the human-readable committer name was given |
||||
insufficiently by getpwent(3). |
@ -0,0 +1,54 @@
@@ -0,0 +1,54 @@
|
||||
= 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 |
||||
ciabot.repo = name of the project repo for gitweb/cgit purposes |
||||
ciabot.xmlrpc = if true, ship notifications via XML-RPC |
||||
ciabot.revformat = format in which the revision is shown |
||||
|
||||
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 |
||||
|
||||
ciabot.project defaults to the directory name of the repository toplevel. |
||||
ciabot.repo defaults to ciabot.project lowercased. |
||||
ciabot.xmlrpc defaults to True |
||||
ciabot.revformat defaults to 'describe'. |
||||
|
||||
This means that in the normal case you need not do any configuration at all, |
||||
however setting ciabot.project will allow the hook to run slightly faster. |
||||
|
||||
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. |
||||
|
||||
To live-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. |
||||
|
||||
You should see a notification on the channel for your most recent commit. |
||||
|
||||
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) |
Loading…
Reference in new issue