You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Harvey, Edward" <Ed...@patni.com> on 2007/11/02 17:06:38 UTC
Email postcommit hook, subscription, properties ....
Hey y'all. I have a few repositories with a bunch of users, and a
zillion files/folders inside.
The users wish to have email alerts when somebody changes a file of
interest. So I'm trying to provide something like "watch this item" ...
It is natural to look at post commit hooks, but it is not appropriate
for every user to get email about every change. It would simply be too
much.
I read through archives of this mailing list, and in the past the answer
was "use subnant, you can set email properties on files & folders."
Unfortunately, subnant requires mono, Nant (which requires pkg-config
and mono), and Nant contrib (which requires I don't know what.) I am
having trouble satisfying the dependencies of subnant (though I'm still
trying.)
So I'm looking for suggestions and/or alternatives. Any ideas?
Here's a typical behavior, that I think would be ideal:
- Suppose Matt is interested in the
svn://svn/repo/project/excalibur/dac1 tree, full of files & subfolders.
- Matt would like to set a property on that folder, so all changes to
that folder (or any of its subfiles & subfolders) would generate an
email to him.
- When Matt is no longer interested in that folder (presumably he
finishes that project) he would like to discontinue watching it, so he
could simply remove that property.
Suppose the above behavior is similarly true for many users, and many
files / folders.
Thanks for your advice.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: Re: Email postcommit hook, subscription, properties ....
Posted by "Bicking, David (HHoldings, IT)" <Da...@thehartford.com>.
> -----Original Message-----
> From: Micah Elliott [mailto:mde@micahelliott.com]
> On 2007-11-02 Harvey, Edward wrote:
>
> > The users wish to have email alerts when somebody changes a file of
> > interest. So I'm trying to provide something like "watch
> this item"
> > ... It is natural to look at post commit hooks, but it is not
> > appropriate for every user to get email about every change.
> It would
> > simply be too much.
>
> It's a Best Practice to have a "commits" mailing list. (See
> Karl's new book, Producing Open Source Software
> (http://producingoss.com/) for details.)
>
> I like Mailman (http://www.gnu.org/software/mailman/index.html)
> quite a bit for hosting my commits lists. I haven't set up
> the topical granularity you've mentioned but it should be
> possible without much tweaking: Mailman provides "topics"
> which let you specify a regex pattern for email subjects.
>
> So you should be able to set up svnnotify
> (http://search.cpan.org/dist/SVN-Notify/) in a hook to put
> the path of the change into the subject. Then you would have
> a topic regex that would capture each top level directory.
> Your users would be "subscribed" only to the topics
> (directories) that really interest them.
>
Alternatively, if you're already in a Windows/C# environment like I am,
you can build C# console applications designed for your pre/post commit
hooks. This gives you all the capabilities of .NET. I would then
define configuration entries to define the paths and mailing lists. When
you want to change rules, just change the configuration.
--
David
*************************************************************************
This communication, including attachments, is
for the exclusive use of addressee and may contain proprietary,
confidential and/or privileged information. If you are not the intended
recipient, any use, copying, disclosure, dissemination or distribution is
strictly prohibited. If you are not the intended recipient, please notify
the sender immediately by return e-mail, delete this communication and
destroy all copies.
*************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Email postcommit hook, subscription, properties ....
Posted by Micah Elliott <md...@micahelliott.com>.
On 2007-11-02 Harvey, Edward wrote:
> The users wish to have email alerts when somebody changes a
> file of interest. So I'm trying to provide something like
> "watch this item" ... It is natural to look at post commit
> hooks, but it is not appropriate for every user to get email
> about every change. It would simply be too much.
It's a Best Practice to have a "commits" mailing list. (See
Karl's new book, Producing Open Source Software
(http://producingoss.com/) for details.)
I like Mailman (http://www.gnu.org/software/mailman/index.html)
quite a bit for hosting my commits lists. I haven't set up the
topical granularity you've mentioned but it should be possible
without much tweaking: Mailman provides "topics" which let you
specify a regex pattern for email subjects.
So you should be able to set up svnnotify
(http://search.cpan.org/dist/SVN-Notify/) in a hook to put the
path of the change into the subject. Then you would have a topic
regex that would capture each top level directory. Your users
would be "subscribed" only to the topics (directories) that
really interest them.
--
_ _ ___
|V|icah |- lliott
" " """
mde@MicahElliott.com <>< http://MicahElliott.com
PGP: 0x7C07CBF0 ICQ: 369060435 Linux/Ubuntu: 417195/12440
HackerKey: v4sw6YUPCJhw5ln5pr7OPck2ma9u8Lw3m5l6Ui2e7t3b8LDMOen6a3XsMRr5
Re: Email postcommit hook, subscription, properties ....
Posted by John Peacock <jo...@havurah-software.org>.
Harvey, Edward wrote:
> Hey y'all. I have a few repositories with a bunch of users, and a
> zillion files/folders inside.
>
> The users wish to have email alerts when somebody changes a file of
> interest. So I'm trying to provide something like "watch this item" ...
> It is natural to look at post commit hooks, but it is not appropriate
> for every user to get email about every change. It would simply be too
> much.
>
> So I'm looking for suggestions and/or alternatives. Any ideas?
If you aren't averse to Perl, then SVN::Notify and SVN::Notify::Config
can do this. The former is the e-mail part and the latter is the "make
it trivial to produce a post-commit script" part. SVN::Notify::Config
can even store the config file itself in the repo, so that the entire
post-commit script becomes:
#!/usr/bin/perl -MSVN::Notify::Config=file://$1/svnnotify.yml
I could easily see scripting that to give people a nice clicky on a web
browser of the repo to select which files they wanted to "watch".
John
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: Email postcommit hook, subscription, properties ....
Posted by "Harvey, Edward" <Ed...@patni.com>.
> > Unfortunately, subnant requires mono, Nant (which requires
pkg-config
> > and mono), and Nant contrib (which requires I don't know what.) I
am
> > having trouble satisfying the dependencies of subnant (though I'm
> still
> > trying.)
>
> I haven't had much chance to test subnant on a Linux box for quite
> a while now, but getting NAnt running was always the tricky bit.
> NAntContrib shouldn't have any dependencies other than NAnt.
>
> Can you be more specific with your problem?
First a little background.
NAnt 0.85 from source
RedHat Enterprise 4u4 x86_64.
mono 1.2.5.1 from source, with defaults
pkg-config from CD rpm, pkgconfig-0.15.0-3.x86_64.rpm
I joined the NAnt users mailing list to ask for help, but there seems to
be very little activity in that list. So far I'm stuck.
To install subnant:
Subnant requires mono, NAnt, NAntContrib.
I installed mono (default instructions) no problem.
To install NAnt:
NAnt requires pkg-config. I installed from RedHat RPM,
no problem.
I try building NAnt, and get failures.
I never even attempted to build NAntContrib, due to previous
failures.
At first, to build NAnt, I just followed the NAnt instructions. e.g.
"sudo make install prefix=/usr/local"
This failed with the error "Unable to locate 'mono' module using
pkg-config." So I "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig" and
then attempt again and here's the result:
> [csc] /tmp/nant-0.85/src/NAnt.Core/Task.cs(404,33):
> error CS0809: Obsolete member
> `NAnt.Core.Task.InitializeElement(System.Xml.XmlNode)' overrides
non-obsolete member
`NAnt.Core.Element.InitializeElement(System.Xml.XmlNode)'
> [csc] Compilation failed: 1 error(s), 0 warnings
>
> BUILD FAILED - 0 non-fatal error(s), 1 warning(s)
>
> /tmp/nant-0.85/src/NAnt.Core/NAnt.Core.build(11,10):
> External Program Failed:
> /usr/local/lib/pkgconfig/../../lib/mono/2.0/gmcs.exe (return code was
> 1)
>
> Total time: 1.9 seconds.
>
>
> BUILD FAILED
>
> Nested build failed. Refer to build log for exact reason.
>
> Total time: 2.2 seconds.
>
> make: *** [install] Error 1
And, when I look into it more, here's what I did:
> [eharvey]$ ls -l /usr/local/lib/mono/2.0/gmcs.exe -rwxr-xr-x 1 root
> root 995328 Nov 2 14:24 /usr/local/lib/mono/2.0/gmcs.exe* [eharvey]$
> /usr/local/lib/mono/2.0/gmcs.exe --help
> -bash: /usr/local/lib/mono/2.0/gmcs.exe: cannot execute binary file
> [eharvey]$ file /usr/local/lib/mono/2.0/gmcs.exe
> /usr/local/lib/mono/2.0/gmcs.exe: MS Windows PE 32-bit Intel 80386
> console executable
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Email postcommit hook, subscription, properties ....
Posted by si <ss...@gmail.com>.
Hi Harvey,
> I read through archives of this mailing list, and in the past the answer
> was "use subnant, you can set email properties on files & folders."
Yes, it looks at directories of committed files (and then recurses up)
searching for the specific properties to determine if and to whom
emails should be sent, as well as the contents of the email,
which is just output from svnlook.
It implements this spec:
http://svn.berlios.de/viewcvs/*checkout*/subnant/trunk/doc/commit-email.html
> Unfortunately, subnant requires mono, Nant (which requires pkg-config
> and mono), and Nant contrib (which requires I don't know what.) I am
> having trouble satisfying the dependencies of subnant (though I'm still
> trying.)
I haven't had much chance to test subnant on a Linux box for quite
a while now, but getting NAnt running was always the tricky bit.
NAntContrib shouldn't have any dependencies other than NAnt.
Can you be more specific with your problem?
Also, I have been contemplating porting Subnant to C# and removing
the NAnt dependency altogether, but the problem :) is it works for us
in its current state, and although performance could be boosted by
such a port, I don't really have the time to commit to such a port
on my own.
If there was sufficient involvement from other (unit test friendly)
developers willing to help, I'd be willing to get the ball rolling.
cheers
si (subnant author)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Email postcommit hook, subscription, properties ....
Posted by Kevin Tomasek <kt...@d2audio.com>.
i have written a couple of little perl scripts to do much less offensive
reporting. the first uses the output from post-commit to add a
transaction to a file. the other send the info to the mailer and clears
the log file. both pretty simple.
every night i have a crontab that executes the second script to the
generate email for the users in the group. that way they, the users,
get only one mail, at the beginning of the day. it is their
responsibility to review the changed list and deal with them appropriately.
Harvey, Edward wrote:
>
> Hey y'all. I have a few repositories with a bunch of users, and a
> zillion files/folders inside.
>
> The users wish to have email alerts when somebody changes a file of
> interest. So I'm trying to provide something like "watch this item" ...
> It is natural to look at post commit hooks, but it is not appropriate
> for every user to get email about every change. It would simply be too
> much.
>
> I read through archives of this mailing list, and in the past the answer
> was "use subnant, you can set email properties on files & folders."
> Unfortunately, subnant requires mono, Nant (which requires pkg-config
> and mono), and Nant contrib (which requires I don't know what.) I am
> having trouble satisfying the dependencies of subnant (though I'm still
> trying.)
>
> So I'm looking for suggestions and/or alternatives. Any ideas?
>
> Here's a typical behavior, that I think would be ideal:
>
> - Suppose Matt is interested in the
> svn://svn/repo/project/excalibur/dac1 tree, full of files & subfolders.
> - Matt would like to set a property on that folder, so all changes to
> that folder (or any of its subfiles & subfolders) would generate an
> email to him.
> - When Matt is no longer interested in that folder (presumably he
> finishes that project) he would like to discontinue watching it, so he
> could simply remove that property.
>
> Suppose the above behavior is similarly true for many users, and many
> files / folders.
>
> Thanks for your advice.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>