Subversion mail
Hi,
I want to configure subversion to send mails on each commit. Please suggest me how to achieve this. Regards, Prayag |
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 |
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 |
Quote:
Quote:
Jump to the line stated in the error or grep for "mailer.conf" to see where this file should reside |
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 |
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, |
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 |
All times are GMT -5. The time now is 10:11 PM. |