如何查明每个用户最后一次提交颠覆的时间?
我有一个正在运行 subversion 的存储库。一些用户没有定期提交。我想向那些上周没有承诺的人发出每周提醒。有没有办法确定每个用户上次提交日期是什么时候?
I have a repository that is running subversion. Some users have not been committing regularly. I'd like to send out a weekly reminder to those that have not committed during the last week. Is there a way to determine when each users last submit date was?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请注意你所测量的内容,因为你肯定会收到它。
有两种技术是可能的。您可以编写一个小程序来调用“svn log”并提取相关的开发人员名称和上次提交时间。您可以将脚本添加到适当的提交后挂钩,该脚本可以将开发人员从每周重新生成的电子邮件列表中删除,或者替换开发人员在稍后处理的文件中的上次提交时间。
主要问题是,通过衡量提交,您将获得更多提交。那些玩弄系统的人会大大降低提交的质量。我预见评论只会在不久的将来提交,或者是最琐碎性质的提交。
Beware what you measure, because you will receive it in spades.
Two techniques are possible. You could write a small program to either call "svn log" and pull out the relevant developer names and last commit times. You could add a script to the appropriate post-commit hook which either removes the developer from the email list which is regenerated weekly, or replaces the developer's last commit time in a file that is processed later.
The main problem is that by measuring commits, you'll get more commits. The quality of the commits will decrease dramatically by those who game the system. I foresee comment only commits, or commits of the most trivial nature in your near future.
在不尝试解决您是否应该这样做的情况下,以下内容将为您提供在
DATE1
和DATE2
之间提交的用户的唯一列表,其中
DATE1
和DATE2
的格式为yyyymmdd
。我认为,一旦您拥有了已提交的用户列表,您就会知道谁没有提交,因为您可以将其与完整列表进行比较(例如
diff Commited_users.txt all_users.txt
)。Without trying to address whether you should do it or not, the following will give you a unique list of users who committed between
DATE1
andDATE2
Where
DATE1
andDATE2
are formatted asyyyymmdd
.I presume that once you have a list of users who committed, you'll know who didn't as you could compare it against a full list (e.g.
diff committed_users.txt all_users.txt
).