ant svntask 检索修订消息
在构建应用程序之前,我使用 ant 和 svntask 来更新存储库。构建结束时,会发出一封包含构建结果的电子邮件。在该电子邮件中包含 svn 修订版号和消息将非常有帮助,因此如果构建中断,我们知道要查看哪个修订版。
我目前仅显示修订号:
<status path="${main.site}" revisionProperty="sqlUpdateStatus.revision"/>
但我不知道如何(或者是否有办法)获取该修订的消息(提交者输入的消息)。你们知道该怎么做吗?
I'm using ant with svntask to update a repository before I build an application. At the end of the build, an email goes out with the results of the build. It would be very helpful to include the svn revision number and message in that email, so if the build breaks, we know which revision to review.
I am currently displaying only the revision number:
<status path="${main.site}" revisionProperty="sqlUpdateStatus.revision"/>
But I don't know how (or if there is a way) to get that revision's message (the message put in by the commiter). Do you guys know how to do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
这并不完全是您问题的答案,但您是否考虑过使用持续集成(CI)工具,例如 Hudson?
Hudson 开箱即用,支持 SVN 和 ANT,并且能够在构建失败时通过电子邮件发送错误。
It's not exactly an answer to your question, but have you considered using a Continuous Integration (CI) tool, such as Hudson?
Hudson comes out of the box with SVN and ANT support and the ability to email errors when the build fails.
我不认为有内置的方法来获取提交消息,但是您可以使用如下命令将其手动从 svn 中拉出:
这将返回位于 /path/to/ 的存储库的修订版 X 的日志消息回购。您可以将其包装在 ant 的 exec 任务中,以从 ant 执行它...
+1 for Hudson - 部署和设置非常简单
I don't think there's a built in way to get the commit message, but you can pull it manually out of svn with a command like this:
This will return the log message for the revision X for the repository at /path/to/repo. You could wrap this up in ant's exec task to preform it from ant...
+1 for Hudson - very simple to deploy and set up
我不知道用 svnant 获取它的好方法,但是从命令行获取它的一个好方法是:
I don't know of a good way to get this with svnant, but a nice way to get it from the command line is:
使用可执行文件:
Using executable:
使用以下命令
use the following command