/* * Created by vincent.tollu@gmail.com * IDE: SharpDevelop * Distributed under the GPL */ /// stCommand may be export or checkout private static void SvnCommand(string stCommand, string stExDir, string stUrl) { try { //check if the tag can be found on the svn server HttpWebRequest request = (HttpWebRequest)WebRequest.Create(stUrl); request.Credentials = new NetworkCredential("login", "password"); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); } catch (Exception e) { Console.WriteLine(e.Message); throw new Exception("Couldnt find any version at " + stUrl); } try { //Export SVN repository to a temporary folder Process proc = new System.Diagnostics.Process(); proc.StartInfo.FileName = @"svn"; proc.StartInfo.Arguments = stCommand + " " + stUrl + @" """ + stExDir + @""""; proc.Start(); proc.WaitForExit(); Console.WriteLine("Export SVN done"); } catch (Exception e) { throw new Exception(e.Message + "\n\nIs svn client installed?"); } }