合并颠覆签入电子邮件
我刚刚开始编写一个脚本,将签入电子邮件合并到十分钟的窗口中,以减少人们收到的 svn 电子邮件数量(并使其更具可读性)。这听起来像是以前可能已经解决的常见问题。
如何减少我的同事收到的个人签到通知电子邮件的数量?
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). 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
采纳之前的建议。我每小时/10 分钟运行一次 cron 作业,其中 svn log 命令并将其通过管道传输到电子邮件列表/地址。
即
svn log --verbose --revision "fromdate:todate" file:///path/to/repo
您需要用 perl/bash 脚本包装此命令以插入日期/时间范围
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.
i.e.
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
与其让您的提交挂钩发送电子邮件,不如每隔十分钟、每小时或任何时间间隔运行一次 cron 任务,以检查前面任意分钟内的提交并发送有关它们的通知?这将如何工作在某种程度上取决于您在电子邮件中拥有哪些信息,谁应该收到哪些电子邮件等。
另一种方法是让提交挂钩将有关提交的信息存储在数据库中,然后将cron 任务获取该信息并进行邮件发送。然而,这可能不如我提到的第一个想法干净。
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? 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. However, this may be less clean than the first idea I mentioned.