SVN report in ASP.Net
We have our own project management tool built in ASP, net 3.5, and we use VisualSVN for our version control. However, we are looking for a way to communicate version changes using a project management tool, integrating VisualSVN with our project management tool, which is pretty much similar to what Trac [SCM-based Python-based tool] provides.
Basically looking for a simple VisualSVN Client API to be able to detect and report file changes based on the provided set of revisions.
If you are happy with some of the scenarios, you can use svnlook, which is a tool that provides repository change and change reports.
I use it in a post-commit hook to push all file changes to my bugtracker, so it can display which files have changed based on the version number. I add specific text to the log and it selects that to find out which error is data related.
EDIT, as requested, this perl script is called from the post-commit hook:
$url = `svnlook log -r $ARGV[1] $ARGV[0]`;
# check the string contains the matching regexp,
# quit if it doesn't so we don't waste time contacting the webserver
# this is the g_source_control_regexp value in mantis.
exit 1 if not $url =~ /\b(?:bug|issue|mantis)\s*[#]{0,1}(\d+)\b/i;
$url = $url . "---\nSVN Revision: " . $ARGV[1];
$url = $url . "\n" . `svnlook dirs-changed -r $ARGV[1] $ARGV[0]`;
#urlencode the string
$url =~ s/([^\w\-\.\@])/$1 eq " "?"+": sprintf("%%%2.2x",ord($1))/eg;
print "log=$url";
exit 0;
this is written to the postcommit_mantis.txt file, which is sent to Mantis via curl:
d:\tools\curl -s -d user=svn -d @c:\temp\postcommit_mantis.txt http://<server>/mantis/core/checkincurl.php
source to share