1

We have a custom project management tool built in ASP,net 3.5 and we use VisualSVN for our version management. However, we are looking a way to report the version changes through the project management tool by integrating VisualSVN with our project management tool, i.e. pretty much similar to what Trac [python based SCM tool] provides.

Basically looking for a simple VisualSVN Client API to be able to detect & report the file changes based on the revision set provided.

3 Answers3

3

There is also SharpSvn wich encapsulates the whole Subversion 1.5 client api. It's is licensed under the Apache 2.0 license and it's from CollabNet.

Michel
  • 706
  • 3
  • 6
0

Check Svn.NET I think is the best solution for right now .NET bindings of the Subversion client system libraries.

Christian C. Salvadó
  • 807,428
  • 183
  • 922
  • 838
0

If you're happy with some scripting, you can use svnlook, which is the tool that provides reports on changes and repository modifications.

I use it in a post-commit hook to send the changes of all files to my bugtracker, so it can display which files were changed given a revision number. I add a specific text to the log, and it picks that up to know which bug to associate the data with.

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 writes 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
gbjbaanb
  • 51,617
  • 12
  • 104
  • 148