设置SVN提交电子邮件的最简单/最佳方法? [英] Easiest/best way to set up SVN commit emails?

查看:341
本文介绍了设置SVN提交电子邮件的最简单/最佳方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我正在处理的项目上设置提交电子邮件,如下所述:
http://productionoss.com/en/vc.html#commit-emails

I'd like to set up commit emails on a project I'm work on, as described here:
http://producingoss.com/en/vc.html#commit-emails

也就是说,使用后提交钩子将电子邮件发送到包含提交标题/日志和更改差异的列表.

That is, use a post commit hook to send an email to a list containing the commit title/log and diff of the changes.

在Linux机器上最简单的设置方法是什么?

What's the easiest way on a Linux machine to set this up?

推荐答案

在创建新存储库时,hooks/post-commit.tmpl中提供了示例提交后钩子.它包含的行或多或少看起来像这样:

When creating new repository a sample post-commit hook is provided in hooks/post-commit.tmpl. It contains a line that looks more or less like this:

/usr/share/subversion/hook-scripts/commit-email.pl "$REPOS" "$REV" commit-watchers@example.org

只需将电子邮件替换为您要向其发送通知的地址,将脚本重命名为hooks/post-commit(删除tmpl扩展名)并使其可执行(chmod a+x).

Just substitute the email with the address you want to send notifications to, rename the script to hooks/post-commit (remove the tmpl extension) and make it executable (chmod a+x).

在不使用任何参数的情况下运行commit-email.pl脚本时,您将看到一个用法屏幕,其中包含一些其他选项,例如,可以修改主题行或发件人"地址.

When you run the commit-email.pl script without any arguments you will see an usage screen with extra options that allow for example to modify the subject line or the From address.

请注意,对于Debian,commit-email.pl脚本位于可选的subversion-tools软件包中.

Please note that is case of Debian the commit-email.pl script is located in an optional subversion-tools package.

这篇关于设置SVN提交电子邮件的最简单/最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆