pax_global_header00006660000000000000000000000064126135337510014520gustar00rootroot0000000000000052 comment=191250366c5291335e46ee5c711fc912c3397bd6 git-notifier-0.6-25/000077500000000000000000000000001261353375100142115ustar00rootroot00000000000000git-notifier-0.6-25/.gitignore000066400000000000000000000000661261353375100162030ustar00rootroot00000000000000.*.sw? test-repo.git *.tar.gz README.html version.rst git-notifier-0.6-25/.update-changes.cfg000066400000000000000000000003111261353375100176330ustar00rootroot00000000000000 function new_version_hook { version=$1 replace_version_in_script git-notifier $version replace_version_in_script github-notifier $version replace_version_in_rst README.rst $version } git-notifier-0.6-25/CHANGES000066400000000000000000000276341261353375100152200ustar00rootroot00000000000000 0.6-25 | 2015-10-26 16:31:37 -0700 * Fixing typo in README.rst (Lev Lamberov) * Adding initial version of manpages. (Lev Lamberov) 0.6-22 | 2015-06-19 17:35:36 -0700 * Added a configuration option "gitbasedir" for specifying the base directory in the file system that holds the git repository. (Jed Liu) * Support the following substitutions in user-specified repositories: '%u' for username, '%h' for hostname, '%r' for repo name. (Jed Liu) * Ignore vim swap files. (Jed Liu) * Abstracted the functionality for obtaining the repository name. (Jed Liu) * Added configuration file support. See the README for specifics. (Jed Liu/Robin Sommer) * Use email package to better ensure RFC-compliance, and to better automate QP encoding of message bodies. (Jed Liu) 0.6-11 | 2015-05-17 03:05:08 -0700 * New option --update-only for github-notifier. This only updates the local clones of all repositories, but not no run git-notifier on them. (Robin Sommer) 0.6-10 | 2015-05-14 22:02:35 -0700 * Added 'mailcmd' option to allow non-standard sendmail location and arguments. (Randall S. Becker) * Transfer UTF-8 encoded body as quoted-printable. (Andrei Badea) * Fixed exception from mimify when commit author contains non-latin1 characters. (Andrei Badea) * Allow sending mail via SMTP as an alternative to sendmail. (Wolfgang Schnerring) * Retrieve date of tags properly. (Wolfgang Schnerring) 0.6-5 | 2015-02-23 16:44:14 -0800 * Retrieve author of tags properly. (Wolfgang Schnerring) 0.6-3 | 2015-01-30 13:53:50 -0800 * Add a Date header to the email with the original commit date. (Wolfgang Schnerring) 0.6-1 | 2015-01-17 08:18:16 -0800 * Fixing git-notifier to work with Python 2.6. (Vincent Danen) - Replace code for getting current time with something more reasonable. - Suppress deprecation warning for mimify. 0.6 | 2015-01-08 07:53:04 -0800 * Release 0.6. 0.5-6 | 2014-11-26 17:12:40 -0800 * New option to prevent reporting of old commits. (Robin Sommer) ``--maxage `` Limits the age of commits to report. No commit older than this many days will trigger a commit notification. Default is 30 days; zero disables the age check. This is primarily a safety measure to prevent mail floods when a repository gets messed up. 0.5-5 | 2014-10-24 10:04:04 -0700 * Adding new option --branches to include/exclude individual branches. ``--branches `` Lists branches to include/exclude in reporting. By default, all branches are included. If this option is specified, only branches listed are included. Alternatively, one can prefix a branch with ``-`` to *exclude* it: then all but the excluded ones are reported. ```` is a list of comma-separated names of heads to treat this way. (Robin Sommer) * Changing quoted-printable header encoding so that it works with mutt. (Robin Sommer) * allowing --update to work without existing/creating state file. (Robin Sommer) 0.5-3 | 2014-05-14 20:10:47 -0700 * Encode mail headers according to RFC 2047. (Robin Sommer) * Don't send any emails for commits that aren't on any branch. (Robin Sommer) 0.5 | 2014-01-27 07:42:48 -0800 * New option to skip updates that a remote already knows. ``--ignoreremotes`` If given, ``git-notifier`` will not report any commits tha are already known by any configured remote repository. In addition, github-notifier now also updates all remotes when it runs. (Robin Sommer) * README updates. (Robin Sommer) 0.42-4 | 2013-09-25 22:15:07 -0700 * Updating README for github-notifier. (Robin Sommer) 0.42-3 | 2013-09-19 12:12:58 -0700 * Initial version of new github-notifier script. This script mirrors repositories from GitHub locally to then run git-notifier on them. Still experimental, documentation forthcoming. (Robin Sommer) 0.42-2 | 2013-09-19 12:10:26 -0700 * Emailprefix can now include %r to include repository name into subject. The default emailprefix is now "[git/%r]". (Robin Sommer) * Bugfix for dealing with completely empty repositories. (Robin Sommer) * For mails with an associated revision, git-notifier now takes the commiter's email address to send mails from there if nothing else is specified. (Robin Sommer) 0.42 | 2013-09-18 20:02:03 -0700 * Fix to handle tags with non-standard characters. (Robin Sommer) 0.41-6 | 2013-03-15 08:00:11 -0700 * Switching back to old behaviour on first run (i.e., no mails). The recent updates could easily trigger mail bombs on existing repositories. (Robin Sommer) 0.41-5 | 2013-03-13 08:04:55 -0700 * Sustituting external "whoami" call with something nicer. (Robin Sommer) 0.41-4 | 2013-02-17 15:17:23 -0800 * Falling back to `whoami` if LOGNAME not set. (Robin Sommer) 0.41-3 | 2012-12-17 16:43:13 -0800 * New option --mailsubjectlen to limit length of mail subjects. Based on patch by Fabrizio Buratta. (Robin Sommer) 0.41-2 | 2012-12-17 12:48:24 -0800 * --updateonly now also applies to initial run. (Matthias Vallentin) 0.41-1 | 2012-11-06 08:36:12 -0800 * Removing check preventing mails on initialization. (Robin Sommer) 0.41 | 2012-11-03 14:05:45 -0700 * Version number tweaking. (Robin Sommer) 0.4 | 2012-10-25 15:08:35 -0700 * Fix "1st commit" issue in automatic mode. (Jan Pokorný) * Fix typo/formatting. (Jan Pokorný) 0.3-19 | 2012-09-26 07:50:08 -0700 * The URL given for the --link option can now contain an "%r" placeholder that will be replaced with the name of the repository. (Fabrizio Buratta) 0.3-18 | 2012-07-05 08:32:48 -0700 * When diffs are too large to include, still show a stats summary in the mails. (Vincent Danen) * New option 'mergediffs'. ``--mergediffs `` Lists branches for which merges should include the full diff, including all changes that are already part of branch commits. ```` is a list of command-separated names of heads to treat this way. (Robin Sommer) 0.3-16 | 2011-08-18 10:31:05 -0700 * Now showing diffs for merges as well. (Robin Sommer) 0.3-15 | 2011-08-12 09:07:27 -0700 * Updating CHANGES. (Robin Sommer) 0.3-13 | 2011-08-11 10:15:56 -0700 * Mails are now sent out in chronological order. (Robin Sommer) 0.3-12 | 2011-07-31 21:45:00 -0700 * A number of bug fixes. (Robin Sommer) 0.3-7 | 2011-07-30 10:33:30 -0700 * New option --replyto to set a Reply-To header for mails. (Robin Sommer) 0.3-6 | 2011-07-24 15:52:44 -0700 * Using diff-tree instead of diff as it allows us to give just a single revision. (Robin Sommer) * With --allchanges, a revision previously reported in a branch and now for one of the --allchanges heads, will have only the latter in the mail subject. (Robin Sommer) 0.3-5 | 2011-07-22 15:59:12 -0700 * Further tweaking allchanges. We now don't do real diffs anymore at all, that's just not reliable. Instead, we simply always report new revisions for allchanges heads no matter if they have already been reported. 0.3-4 | 2011-07-19 19:19:46 -0700 * Fixing the 0.3-3 change for diffs, which didn't work right. (Robin Sommer) 0.3-3 | 2011-07-17 22:15:14 -0700 * For heads that get full diffs, we now record which diffs we have already mailed out. This avoid duplicates when stuff is merged into something else later. (Robin Sommer) 0.3-2 | 2011-07-14 11:17:44 -0700 * Removing debugging output. (Robin Sommer) 0.3-1 | 2011-07-12 14:35:53 -0700 * Fixing a problem with diffing potentially skipping revisions when facing merges. (Robin Sommer) 0.3 | 2011-05-08 21:33:08 -0700 * Significant speed improvement: we now query git for the branches reachable from a revision rather than trying to figure it out ourselves. Based on a suggestion by Simon Marlow. * Adding git repository to README. * Compatibility fix to support older git versions. (Simon Marlow) * New option 'link' to define a URL that will be inserted into notification mails. * New option 'repouri' to overide the automatically derived repository location. * All options can now indeed be given via git-config (as the README already claims), and they are now all located in the hooks.* namespace. * Integer options are now correctly converted to ints when read from git-config. * Internal rewrite of how options are implemented. * Removing the update-changes script from the repository. * Now using gitolite's GL_ADMINDIR environment variable to locate the default sender.cfg. * We now keep the previous state file as *.bak. * Fixing a bug with revisions not being part of any head. * Now hooks.allchanges can be specified via "git config". * New options, two of them primarily for debugging and manual generation of notifications. ``--allchanges `` Lists branches for which *all* changes made to them should be mailed out as straight diffs to their previous state, independent of whether the corresponding commit has already been reported in the past. This might for example make sense for ``master`` if one wants to closely track any modification applied. ```` is a list of command-separated names of heads to treat this way. ``--diff [rev1..]rev2`` Mails out diffs between all revisions on the first parent's way from ``rev1`` to ``rev2``. This option produces output similar to that of a head moving forward which is listed with ``--allchanges``. If ``rev1`` is skipped, ``rev2~1`` is assumed. This option is primarily for debugging and retropective (re-)generation of this outut, and does not change the current notifier state in any way. The main difference to ``--manual`` is that it considers only revision on the first parent's path, and mails out actual diffs between these. ``--manual [rev1..]rev2`` Mails out notifications for all revisions on the way from ``rev1`` to ``rev2``. If ``rev1`` is skipped, ``rev2~1`` is assumed. This option is primarily for debugging and retropective (re-)generation of this output, and does not change the current notifier state in any way. 0.2 | 2011-01-07 10:06:31 -0800 * The script now waits a little bit after sending out each mail. Before, mails sent back-to-back could arrive with identical timestamps, making it harder to determine their actual order. 0.1-5 | 2011-01-02 10:18:10 -0800 * Updating update-changes. 0.1-4 | 2011-01-01 22:23:53 -0800 | e201aebe6ab827e2b8b33fb302b9d05bde0d9355 * Now mails are also sent when a head updates to now include further commits that have already been reported earlier (e.g., on fast-forwards). These mails summarize all revisions on the path from its previous state to the new head position. This is experimental at this point. * The script now checks for "-h" or "--help" as a command-line option, and prints a short (and not very helpful) usage message if found. 0.1-3 | 2011-01-01 21:44:11 -0800 | 94154e05ff29522e256803d2cfe9b7d98d28b138 * Renaming the "recipients" options to "mailinglist", as it was already documented. (Matthias Vallentin) 0.1-2 | 2011-01-01 21:41:09 -0800 | b650d20a8d10c9bc8de20c3715c9b1dab9100288 * Adding "[nomail]" option: if that tag is included in a commit message, no mail will be send for that change. Also, documenting the already existing "[nodiff]" option: if included in a commit message, no diff will be included for that change. * Adding update-changes script. 0.1 | 2010-12-19 20:30:38 -0800 | 2606f82b91b0984c9de050c001729ce45dfb69cd * Initial version. git-notifier-0.6-25/COPYING000066400000000000000000000030351261353375100152450ustar00rootroot00000000000000 Copyright (c) 2010-2011, Robin Sommer All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the International Computer Science Institute nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. git-notifier-0.6-25/Makefile000066400000000000000000000011051261353375100156460ustar00rootroot00000000000000# # Makefile is used only for building the distribution. DISTFILES = git-notifier Makefile README.rst COPYING CHANGES VERSION WWW = $(HOME)/www/git-notifier VERSION = `cat VERSION` all: dist: rm -rf git-notifier-$(VERSION) git-notifier-$(VERSION).tar.gz mkdir git-notifier-$(VERSION) cp $(DISTFILES) git-notifier-$(VERSION) tar czvf git-notifier-$(VERSION).tar.gz git-notifier-$(VERSION) rm -rf git-notifier-$(VERSION) doc: rst2html.py README.rst >README.html www: dist doc cp README.html $(WWW)/index.html cp git-notifier-$(VERSION).tar.gz $(WWW) cp CHANGES $(WWW) git-notifier-0.6-25/README.rst000066400000000000000000000360251261353375100157060ustar00rootroot00000000000000.. -*- mode: rst -*- .. |date| date:: .. Version number is filled in automatically. .. |version| replace:: 0.6-25 git-notifier ============ :Version: |version| :Home: http://www.icir.org/robin/git-notifier :Author: Robin Sommer :Date: |date| .. contents:: Introduction ------------ ``git-notifier`` is a script to be used with `git `_ as a *post-receive* hook. Once installed, it emails out a summary of all changes each time a user pushes an update to the repository. Different from other similar scripts, ``git-notifier`` sends exactly one email per change, each of which includes a complete diff of all modifications as well as the set of branches from which the new revision can be reached. The scripts ensure that that each change is mailed out only exactly once by keeping a state file of already reported revisions. ``git-notifier`` integrates nicely with `gitolite `_, and it also comes with a companion script ``github-notifier`` that watches `GitHub `_ repositories for changes. Here's example of a ``git-notifier`` mail:: Subject: [git/git-notifier] master: Adding www target to Makefile. (7dc1f95) Repository : ssh:///git-notifier On branch : master >--------------------------------------------------------------- commit 7dc1f95c97275618d5bde1aaf6760cd7ff6a6ef7 Author: Robin Sommer Date: Sun Dec 19 20:21:38 2010 -0800 Adding www target to Makefile. >--------------------------------------------------------------- Makefile | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index e184c66..9c9951b 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,8 @@ VERSION = 0.1 DISTFILES = git-notifier README COPYING +WWW = $(HOME)/www/git-notifier + all: dist: @@ -13,3 +15,7 @@ dist: cp $(DISTFILES) git-notifier-$(VERSION) tar czvf git-notifier-$(VERSION).tgz git-notifier-$(VERSION) rm -rf git-notifier-$(VERSION) + +www: dist + rst2html.py README >$(WWW)/index.html + cp git-notifier-$(VERSION).tgz $(WWW) In addition, ``git-notifier`` also mails updates when branches or annotated tags are created or removed; and it furthermore mails a revision summary if a head moves to now include commits already reported previously (e.g., on fast-forwards). If a commit message contains ``[nodiff]``, the generated mail will not include a diff. If a commit message contains ``[nomail]``, no mail will be send for that change. Download -------- The current release is `git-notifier 0.6 `_ Not surprisingly, ``git-notifier`` is maintained in a git repository that you can clone:: git clone git://git.icir.org/git-notifier The repository is also `mirrored to GitHub `_. History ------- The `CHANGES `_ file records recent updates to ``git-notifier``. Installation ------------ The basic installation is simple: just run the script from ``hooks/post-receive``, as in:: #!/bin/sh /full/path/to/git-notifier By default, the script will send its mails to the user running the ``git-notifier`` (i.e., the one doing the update). As that's usually not the desired recipient, an alternative email address can be specified via command line or git options, see the ``mailinglist`` option below. Usage ----- ``git-notifier`` supports the options below. Options can be either set on the command line, by editing a configuration file, or on a per-repository basis via ``git config hooks.