subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Corveleyn <>
Subject Re: Programming a Watcher File
Date Wed, 03 Mar 2010 08:57:57 GMT
On Wed, Mar 3, 2010 at 5:39 AM, Andrey Repin <> wrote:
> Greetings, David Weintraub!
>> One of the tech leads wants to be able to program a watch file, so
>> that when a certain set of developers change a particular file,
>> certain other developers get notified. Thus, we need to be able to
>> program what files, what developers do the commit, and what developers
>> receive the notification. I'd like to do this, so this developer can
>> maintain this file himself instead of me having to maintain it which
>> means it can't be a text file on the Subversion server.
> Sorry, my head is a bit crippled for now, and your post contains too much
> cross-references to be understandable in my current state.
> Could you please put it in simple terms, how you see your potential system
> works?
>> I'm working with something like this now. I have a configuration file
>> where you setup the various parameters (specifying files via globbing
>> or regex), who does the commit, and who receives the email. The
>> configuration file sits in the source repository, so this tech lead
>> has access to it.
>> I was wondering if anyone already has a post-commit hook script like
>> this already setup. I know there's one included in Subversion, but
>> this one uses a text file that's accessible to the hook script and its
>> setup isn't that flexible.
>> If not, I'll finish up the one I'm working on.
> If having a custom (and client-customizable) configuration is all you ever
> want, there's a hint: hook script can access repository as easy as any other
> local file. Just do "svn cat" on required file and parse it's content as
> normal.
> However, be very wary of access rights on the mentioned configuration file.

Some time ago, we were thinking of maintaining some
notification-configuration inside versioned properties on directories
in svn. The idea was simply to be able to put a (comma-separated, or
new-line separated or whatever) list of email addresses in some
property (let's call it "watchers") on directories. In the simple
case, just the top level directories actually. Post-commit hook would
then see which top-level directories were affected, and use those
email addresses to send commit mails. This then avoids the need to
setup and maintain mailinglists ... It might be possible to come up
with a more elaborate system to put more configuration in such
properties (like people watching only certain authors on certain
directories/files etc).

I didn't really think it through (there could be some nasty details,
performance issues in crawling up the directory structure, ...),
because we decided not to implement it. In the end, we decided it
would be much easier to just setup some mailinglists, for the simple
stuff we needed...

Just my .02 €


View raw message