Reputation: 11
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
Upvotes: 1
Views: 675
Reputation: 5949
Try replacing variables (placed into {} brackets) in following urls to make it suitable for your specific case:
http://{websvn_url}/diff.php?repname={reponame}&path={file_to_compare}&rev=PREV
for single file comparison
http://{websvn_url}/comp.php?repname={reponame}&compare[]={folder_to_compare}@$2&compare[]={folder_to_compare}@HEAD
for folder comparison
Maybe that will not work, but at least will give you a hint to find proper solution.
Upvotes: 0