Вопрос

I would like to receive email notifications of updates on an svn repository. I know that the standard solution for this is to use hooks, but I do not have access to the machine which hosts to the repository.

Right now, I have written a one-liner to update the working copy every hour and email me if a new revision exists. This is primitive, however, and I would like a solution allowing me to filter out my own commits, to provide a diff in the email, to run a command on the revision to identify build errors and notify me differently if the build was broken, etc.

Does there already exist a clean script to provide email notifications for updates to an SVN repository without relying on hooks, with the kind of features I describe?

(I am thinking of a command-line script or program for Unix systems, free as in free speech.)

Это было полезно?

Решение 3

I now use a bunch of custom scripts that retrieve the latest version of an SVN repository and, if it is higher than the previously seen version, emails me a diff of the changes. For each repository, the email is only triggered the first time that there is a change after one of my changes, so I don't get diffs for my own changes, and I don't get many diffs in succession for changes made by others. Specifically, for each repository, when a diff is sent, alerts are silenced until the script sees a commit by me in the repository, or I manually call a script to re-activate alerts on this repository. My script also caches SVN errors and only complains about them if they have happened too often in a row, to avoid receiving one mail each time there is a transient network problem that prevents accessing a repository.

Specifically, I use cron to regularly invoke the script svn-poll-myrepos which runs the polling on all SVN repositories registered in myrepos. The script svn-poll does the polling as described above, and the script svn-poll-drop is what can be called manually to re-activate an alert.

Другие советы

If you are on Windows, you may want to consider using CommitMonitor tool.

You could also look at a CI server. They're already set up to poll a source repository and many of them have their own notification systems. Jenkins is free and many of the commercial tools are free or cheap for personal use.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top