LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-19-2009, 03:15 AM   #1
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,138
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
Smile Subversion mail


Hi,

I want to configure subversion to send mails on each commit.
Please suggest me how to achieve this.

Regards,
Prayag
 
Old 06-19-2009, 03:29 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Thats what I get from the first google with "subversion email"

http://help.joyent.com/index.php?pg=kb.page&id=53

The idea behind this is using hooks. SVN aka subversion uses hooks for commit and alike. they are just mere shell scripts that allow you to interact on nearly every action done to your svn repository.
Heres a link to the subversion documentation explaining hooks

http://svnbook.red-bean.com/en/1.0/s...-ch-5-sect-2.1
 
Old 06-19-2009, 03:47 AM   #3
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,138
Blog Entries: 4

Original Poster
Rep: Reputation: 147Reputation: 147
Smile

Hi

I get the following error while configuring subversion for sending mails using mailer.py script.

Warning: 'post-commit' hook failed with error output:
Traceback (most recent call last):
File "/usr/share/doc/subversion-1.4.2/tools/hook-scripts/mailer/mailer.py", line 1304, in ?
raise MissingConfig(config_fname)
__main__.MissingConfig: mailer.conf


Can any one tell me what i am doing wrong.


Reagrds,

Prayag
 
Old 06-19-2009, 08:20 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by prayag_pjs

I get the following error while configuring subversion for sending mails using mailer.py script.
Where did you get that script from?

Quote:
Originally Posted by prayag_pjs
raise MissingConfig(config_fname)
__main__.MissingConfig: mailer.conf
I read it like the script does not find its configuration file. mailer.conf

Jump to the line stated in the error or grep for "mailer.conf" to see where this file should reside
 
Old 06-22-2009, 12:46 AM   #5
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,138
Blog Entries: 4

Original Poster
Rep: Reputation: 147Reputation: 147
Question

Hi,

The mailer.py script is in : /usr/share/doc/subversion-1.4.2/tools/hook-scripts/mailer..i.e it comes with subvesrion installation...

The line on which i get error in script is:


# Settle on a config file location, and open it.
if config_fname is None:
# Default to REPOS-DIR/conf/mailer.conf.
config_fname = os.path.join(repos_dir, 'conf', 'mailer.conf')
if not os.path.exists(config_fname):
# Okay. Look for 'mailer.conf' as a sibling of this script.
config_fname = os.path.join(os.path.dirname(sys.argv[0]), 'mailer.conf')
if not os.path.exists(config_fname):
raise MissingConfig(config_fname)

svn.core.run_app(main, cmd, config_fname, repos_dir,
sys.argv[3:3+expected_args])


Regards,

Prayag
 
Old 06-22-2009, 11:20 AM   #6
jhcaiced
Member
 
Registered: Mar 2009
Distribution: CentOS - Ubuntu - Debian
Posts: 83

Rep: Reputation: 27
Hi,

In my subversion repositories I use the following script,
it has to be installed as /path_to_repos/hooks/post-commit
the content is:

#!/bin/sh
REPOS="$1"
REV="$2"
LIST="address1@domain1.com address2@domain2.com"
for name in $LIST ; do
/usr/local/bin/commit-email.pl "$REPOS" "$REV" $name -s "Mail Subject"
done
log-commit.py --repository "$REPOS" --revision "$REV"

The script commit-email.pl comes with subversion, i just
copied to /usr/local/bin
/usr/share/doc/subversion-1.1.4/tools/hook-scripts/commit-email.pl


Hope it helps you to get running.

Best regards,
 
Old 06-23-2009, 12:51 AM   #7
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,138
Blog Entries: 4

Original Poster
Rep: Reputation: 147Reputation: 147
Smile

Hi, jhcaiced

Thanks,but i have solved my problem of mailer.conf and mailer.py ... The problem was with exact path of mailer.conf and REPOS...I have resolved the issue by giving exact path of mailer.conf and REPOS.

But the problem now i am facing is the mails are sent as per repository. I want to send mails to specific users as per project name.i.e i have one repository named repos.In repos i have 4 to five projects named project1,project2,... etc.I want that for each commit in project1 emails should go to project1 users only not to all.In the present scenario mails are going to all.

I want mails to be sent project wise not repository wise.

Is it possible to achieve this???


Regards,
Prayag
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
E-Mail Read Receipt E-Mail Delivery Status E-Mail tracking number. ytd Linux - Software 3 02-14-2009 05:02 AM
can mail command be used to send mail onto global mail servers like yahoo etc dale_chip Linux - Newbie 4 08-12-2008 09:33 AM
with the linux proxi, backend pop3 mail client can not receive mail and send mail rubin823 Linux - Networking 0 12-21-2006 11:06 PM
subversion varun_33 Linux - Software 1 04-20-2005 01:37 PM
How to install Subversion(Version Control with Subversion) under RedHat Linux. netkiller Linux - Networking 1 07-01-2004 06:45 AM


All times are GMT -5. The time now is 11:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration