svnnotify 与 websvn
我已将 svnnotify 配置为在每次提交后发送电子邮件。现在我想直接在邮件的修改路径字段中提供URL,以通过websvn显示差异,即所有修改的文件都应该直接通过websvn打开以及以前版本和当前版本之间的差异。
请在下面找到要求, 我当前的提交后挂钩脚本是,
#!/bin/sh
REPOS="$1"
REV="$2"
/usr/local/bin/svnnotify --repos-path "$1" --revision "$2" \
--to [email protected]\
--from [email protected] \
--svnweb-url 'http://<svnip>/websvn/revision.php?repname=repos+1&isdir=1&'
--subject-cx \
--subject-prefix 'REPO-NAME ' \
上述脚本的输出是:
Revision: 37
http://<svnip>/websvn/revision.php?repname=repos+1&isdir=1&/revision/?rev=37&view=rev
Author: srikanth
Date: 2011-12-28 13:08:33 +0530 (Wed, 28 Dec 2011)
Log Message:
-----------
Testing for multiple locations checkin
Modified Paths:
--------------
trunk/branch1/test1.java
trunk/branch2/test2.java
我想修改上述脚本,以便每当用户单击修改的路径时,它应该直接在 websvn 中显示差异。请求您对此提出建议。
谢谢你, 斯里坎特B
I have configured svnnotify to send email after every commit. Now I want to directly provide the URL in the modified paths field of the mail to show diff via websvn, i.e., all the modified files should be directly open through websvn along with difference between previous and present version.
Please find below the requirements,
My current post-commit hook script is,
#!/bin/sh
REPOS="$1"
REV="$2"
/usr/local/bin/svnnotify --repos-path "$1" --revision "$2" \
--to [email protected]\
--from [email protected] \
--svnweb-url 'http://<svnip>/websvn/revision.php?repname=repos+1&isdir=1&'
--subject-cx \
--subject-prefix 'REPO-NAME ' \
Output of the above script is:
Revision: 37
http://<svnip>/websvn/revision.php?repname=repos+1&isdir=1&/revision/?rev=37&view=rev
Author: srikanth
Date: 2011-12-28 13:08:33 +0530 (Wed, 28 Dec 2011)
Log Message:
-----------
Testing for multiple locations checkin
Modified Paths:
--------------
trunk/branch1/test1.java
trunk/branch2/test2.java
I want to modify the above script in such a way that whenever the user clicks on modified paths it should display difference directly in websvn. Request your suggestions on this.
Thank you,
srikanth B
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试替换以下网址中的变量(放入 {} 括号中),使其适合您的具体情况:
对于单个文件比较
对于文件夹比较
也许这不起作用,但至少会提示您找到正确的解决方案。
Try replacing variables (placed into {} brackets) in following urls to make it suitable for your specific case:
for single file comparison
for folder comparison
Maybe that will not work, but at least will give you a hint to find proper solution.