You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ma...@bnpparibas.com on 2010/07/22 14:48:41 UTC

svn

Hi, 

Is there a way so when i commited a project, an automatic 
message(alert,..) could be send to different persons
Thanks
Mahmoud




This message and any attachments (the "message") is
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and 
immediately notify the sender. Any use not in accord with 
its purpose, any dissemination or disclosure, either whole 
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message. 
BNP PARIBAS (and its subsidiaries) shall (will) not 
therefore be liable for the message if modified. 
Do not print this message unless it is necessary,
consider the environment.

                ---------------------------------------------

Ce message et toutes les pieces jointes (ci-apres le 
"message") sont etablis a l'intention exclusive de ses 
destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le detruire et d'en avertir 
immediatement l'expediteur. Toute utilisation de ce 
message non conforme a sa destination, toute diffusion 
ou toute publication, totale ou partielle, est interdite, sauf 
autorisation expresse. L'internet ne permettant pas 
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce 
message, dans l'hypothese ou il aurait ete modifie.
N'imprimez ce message que si necessaire,
pensez a l'environnement.

Re: svn

Posted by David Weintraub <qa...@gmail.com>.
On Thu, Jul 22, 2010 at 10:48 AM,  <Ma...@bnpparibas.com> wrote:
>
> Is there a way so when i commited a project, an automatic message(alert,..)
> could be send to different persons

You can be the first on your block to try out a new and not so
thoroughly tested post-commit hook written in that unreadable Perl
script no one uses any more!

I wrote a post-commit hook that does exactly what you want and does
something many of these other scripts don't do: It allows users to set
their own notifications.

One of the things I hated about all the other notification hooks out
there is that they all require one person (namely you) to setup the
configuration file. If a developer wants to change what files they get
notified on, they have to ask you to change the configuration file.

Being a lazy sort of person who'd rather watch YouTube videos all day,
I wrote a Subversion notification script that stores the notification
configuration files inside your Subversion repository. Each user gets
their own configuration file to play with. Since the files are in the
Subversion repository, users have access to them without having to
have access to the Subversion server itself.

The syntax of the configuration file is quite simple: Users enter in
the email addresses they want the notification sent to. (That's right,
they can enter in more than one!). Users also specify what files they
want to watch using either Perl's Regular Expression sytax or the
syntax Ant uses when specifying files using <fileset> and <include>
and <exclude> tasks.

The main caveat is that this script isn't as thoroughly tested as I'd
like. Normally, I foist my stuff on several companies and when the
developers stop whining that it doesn't work, I consider it good
enough for general distribution. This script has been only tested on
one company.

The other is that it isn't "complete". I showed the hook to someone
else, and they commented that it would be great if I could get it to
work with svn-notify. That I never did. The script has an "internal"
notification method. You can specify the format of that notification
and that is quite flexible, but it doesn't do groovy things like send
you multi colored diffs as you can via svn-notify.

As for the unreadable Perl, I generally write my code for readability
-- even in Perl. In fact, several Python programmers have commented to
me how easy it is to read my Perl code. I've been known to take a
working script and simply rewrite the whole thing from scratch just to
make it easier to understand and maintain. I do use the Object
Oriented Perl coding style which does throw off Perl developers who
never used Object Oriented Perl code, but if you're a Perl developer,
it's about time to learn how to write in a OOP fashion. I find OOP
Perl code tends to be easier to maintain and use.

I also try to write my code not to require non-standard Perl modules
because I know that on many sites, it is impossible to install
optional Perl modules without having to jumpt through a lot of
administrative hoops.

If you're interested, you can download this hook via:
http://dl.dropbox.com/u/433257/new_svn_hooks.zip. The hook you're
interested in is called svn-watch.pl. The script is fully documented
via Perl POD. If you look at the first few lines of the script,
(Specifically lines 14 to 22) it will tell you how to generate the
documentation.

The script is open source via the BMAB license.

-- 
David Weintraub
qazwart@gmail.com

Re: svn

Posted by vishwajeet singh <de...@gmail.com>.
On Thu, Jul 22, 2010 at 8:21 PM, Ryan Schmidt <
subversion-2010b@ryandesign.com> wrote:

>
> On Jul 22, 2010, at 09:48, MahmoudHAMLAOUI@bnpparibas.com wrote:
>
> > Is there a way so when i commited a project, an automatic
> message(alert,..) could be send to different persons
>
> Sure. You'd write a post-commit hook to accomplish that. You should be able
> to find some information about that by searching.
>
>
>
you can look at this project http://freshmeat.net/projects/svnmailer/


-- 
Vishwajeet Singh
+91-9657702154 | dextrous85@gmail.com | http://bootstraptoday.com
Twitter: http://twitter.com/vishwajeets | LinkedIn:
http://www.linkedin.com/in/singhvishwajeet

Re: svn

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 22, 2010, at 09:48, MahmoudHAMLAOUI@bnpparibas.com wrote:

> Is there a way so when i commited a project, an automatic message(alert,..) could be send to different persons 

Sure. You'd write a post-commit hook to accomplish that. You should be able to find some information about that by searching.