Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Code to Export an SVN folder

I'm looking for a simple C# script that will export an SVN folder.

note: I have tortoise svn installed on this Win 2008 r2 server.

Thanks for your help!

example:

//SVN: 
string source = c:\project\websiteFiles\

//Export to:
string target = c:\inetpub\hockeyWebsite\

ExportSVNfolder(source, target)
{
// export the files

// wait till export is 100% complete

// return
}
like image 252
aron Avatar asked Dec 22 '22 05:12

aron


2 Answers

Using SharpSvn's SvnClient Export Method it's really easy:

SharpSvn.SvnClient svnclient = new SvnClient();
svnclient.Export(new SvnUriTarget(source),
    target, new SvnExportArgs());
like image 76
jan Avatar answered Jan 04 '23 05:01

jan


I would recommend using SharpSVN.

like image 45
Jeff Yates Avatar answered Jan 04 '23 05:01

Jeff Yates