[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Programming a Watcher File

From: David Weintraub <qazwart_at_gmail.com>
Date: Mon, 8 Mar 2010 15:32:28 -0500

I'm almost finished my second notification scheme. Each user their own
watch file. In my access-control trigger, I can easily set it up, so
that users can only change their own watch files:

    [FILE Lock Watch directory as read-only]
    file = ^/watchers/.*
    access = read-only
    users = @ALL

    [FILE Now allow users to edit their own watch file]
    file = ^/watchers/<USER>.cfg
    access = read-write
    users = <USER>

Watch files will be composed of three lines. The first is the email line:

    email = qazwart_at_gmail.com

Users can have as many email lines as their heart desires, and I'll
email each and every one of them. If the user doesn't have an email
line in their file, I'll email to <user>@<defaultDomain> which is
pretty much what you expect as the default.

There are two other lines in the file:

    file = /foo/trunk/mail/src/java/**/*.java

and

    regex = ^foo/.*\.java$

The "file" line is for Ant glob type expressions where "*" is a series
of any characters except "/" and "**" is any series of characters. It
is automatically anchored at the root of repository it is expected to
match the entire file name. The "regex" is an extended regular
expression that matches the file name. It is not anchored unless you
use the "^" and "$" characters.

Of course, I don't notify the user of self changes.

I am still testing, but I'm willing to give this to anyone who wants to try it.

The other watch file trigger is for a manager to specify who gets
notified of what type of change and by whom. It's a lot more specific
to our circumstance where we want QA people in India to be notified of
changes developers in NY do, and QA people in New York to be notified
of developer changes in India.

-- 
David Weintraub
qazwart_at_gmail.com
Received on 2010-03-08 21:32:57 CET

This is an archived mail posted to the Subversion Users mailing list.