hi i want to call subversion from c# i writed code but nothing happens
from command line i can comit but my code not works here is the code :
------------
confiuration file:
----------------------
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="SVNLocation" value="C:\Program Files\Subversion\bin\svn"/>
</appSettings>
</configuration>
-----------
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.Diagnostics;
using System.Windows;
namespace ConsoleApplicationSvn
{
class Program
{
static void Main(string[] args)
{
string arguments = "svn commit ";
string path = "data_files.txt";
string comment = " -m csharpcommit";
arguments = arguments + path + comment;
string stringout;
stringout = ExecuteSVN(arguments);
}
private static string ExecuteSVN(string arguments)
{
try
{
Process process = new Process();
process.StartInfo.FileName = ConfigurationManager.AppSettings["SVNLocation"];
process.StartInfo.Arguments = arguments;
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.WorkingDirectory = @"C:\def\abc\";
Environment.CurrentDirectory = @"C:\def\abc\";
process.Start();
process.WaitForExit();
return process.StandardOutput.ReadToEnd();
}
catch (Exception e)
{
System.Windows.Forms.MessageBox.Show(e.ToString());
return e.ToString();
}
}
}
}