简体   繁体   English

合并Subversion签入电子邮件

[英]consolidate subversion checkin emails

I just started hacking on a script to consolidate check-in emails into a ten min window to reduce the amount of svn email people get (and make it more readable). 我刚刚开始破解一个脚本,将检入电子邮件合并到一个10分钟的窗口中,以减少人们收到的SVN电子邮件数量(并使其更具可读性)。 This sounds like the kind of common problem that may have been solved before. 这听起来像是以前可能已经解决的常见问题。

How can I reduce the number of individual checkin notification emails my colligues get? 如何减少同事收到的个人签到通知电子邮件的数量?

Instead of having your commit hook send e-mails, how about running a cron task every ten minutes, hour, or whatever interval, to check for commits in the preceding however-many-minutes and send a notification about them? 不用让您的提交钩子发送电子邮件,而是每十分钟,一小时或任何间隔运行一次cron任务,以检查之前但很多分钟内的提交并发送有关它们的通知,该怎么办? How this would work depends somewhat on what information you have in the e-mails, who is supposed to get which e-mails, etc. 它如何工作在某种程度上取决于您在电子邮件中拥有哪些信息,应该由谁获得哪些电子邮件等。

An alternative would be to have the commit hook store information about the commit in a database, then have the cron task pick up that information and do the mailing. 另一种选择是让提交挂钩将有关提交的信息存储在数据库中,然后让cron任务获取该信息并进行邮件发送。 However, this may be less clean than the first idea I mentioned. 但是,这可能不如我提到的第一个想法干净。

Picking up on previous suggestions. 接听以前的建议。 I'd run a cron job every hour / 10 mins which svn log command and pipes that to an email list / addresses. 我每小时10分钟运行一次cron作业,该作业使用svn log命令并将其通过管道发送到电子邮件列表/地址。

ie

svn log --verbose --revision "fromdate:todate" file:///path/to/repo svn log --verbose --revision“ fromdate:todate” file:/// path / to / repo

you'll need to wrap this command up with a perl/bash script to insert the date/time range 您将需要使用perl / bash脚本来包装此命令,以插入日期/时间范围

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM