polling svn repository and notify by email.
svnpoller watches target SVN repositories regularly and transmits a
commit-mail to the designated notify party about each commit when there
are new commits.
[mail] smtpserver = localhost fromaddr = email@example.com [sample-section] url = http://svn.example.org/path/to/repos/with/sub/path address = firstname.lastname@example.org, email@example.com
Notify mail sample
Notified mail sample:
From: firstname.lastname@example.org To: email@example.com, firstname.lastname@example.org Subject: [sample-section: 1230] * Revision: 1230 * Author: foo * Date: 2009-11-22T17:40:47.287888Z * Message: The commit log message for this revision here. * Paths: M /with/sub/path/somefile1.py A /with/sub/path/somefile2.py * Diff: Index: somefile1.py =================================================================== --- somefile1.py (revision 1230) +++ somefile1.py (revision 1229)
- Python 2.4 or later (not support 3.x)
- polling specified svn repository
- send commit message and diff by email
Make environment (by easy_install):
$ easy_install svnpoller
Make environment (by buildout):
$ hg clone http://bitbucket.org/shimizukawa/svnpoller $ cd svnpoller $ python bootstrap.py $ bin/buildout
Copy and modify ini file. example:
$ cp <svnpoller installed path>/svnpoller/svnpoller.ini . $ vi svnpoller.ini
Please refer to Setting sample section for the format of the
svnpoller.ini configuration file.
Execute svnpoller command:
$ svnpoller svnpoller.ini
or setup cron job:
$ crontab -e 0 0 * * * /path/to/svnpoller /path/to/svnpoller.ini
- Fix: svnpoller exec ‘svn diff -r100 <URL>’ for check revision 10000 that command mean ‘svn diff -r100:HEAD <URL>’ then if HEAD=10000 svnpoller take long time and large svn diff output.
- Fix: commit message include multi-byte charactor cause exception.
lxmldependency, become optional (thanks to ‘Federico’ for the patch!).
- Fix: Exception caused by error status return from svn command when repository was not updated since last check (thanks to ‘Federico’ for the patch!).
- Add: copy-only or delete-only or move-only diff are not attached (thanks to ‘Federico’ for the patch!).
- Fix: Notify mail send only first address when multiple address (comma separated) was specified on ini file.
- Fix: datetime.strptime replaced with time.strptime (for Python-2.4)
lxmldependency. (if python-2.5 or later)
- Change: supported svn external command version: 1.4 or later
- Fix: latest revision’s change ware notified every time.
- Add: some tests.
- Add changed
- first release
- Add debug option ‘–debug / -d’ for processing status output.
- Add log output option ‘–log / -l’ by
- Add filtering option for non-target file at same commit rev.
- Introduce customizable mail template.
- Remove base64 e-mail encoding always.
- Add e-mail encoding (now using base64 encoded utf-8)
- Add notify mechanism when lost target (maybe repository structure was changed)
- Add setting for the filtering of the file which it was saved at the same time, but is uninteresting.
- Add mercurial(hg) support.
- Add bazaar(bzr) support.
- Attach diff without printing in the main text.(config?)
- Speed-up for multi url polling.
- Add generating ini file automatically, or using Paster template.
- Add test: multi url polling
- Add test: Python2.4, 2.5, 2.6 support check.
- “–dry-run” update latest revision config value.