I am trying to merge my code into a targetPath using sharpSvn. I am writing the following code:
client.merge(targetPath,source_url,range)
It works successfully when there is no conflict but the merge does not occur if there is a conflict in a merge. I want to get a boolean variable from the code which tells me whether or not there is a conflict while merging the revision_id. Is there any way I can do this?
Edit : I have been trying this by the following way
try
{
String src = "source_url";
String targetPath = "foo/bar";
SvnRevisionRange range = new SvnRevisionRange(839071, 839072);
SvnMergeArgs mergeArgs = new SvnMergeArgs();
mergeArgs.DryRun = true;
mergeArgs.Conflict += new EventHandler<SvnConflictEventArgs>
(Mergeargs_Conflict);
mergeArgs.Force = false;
bool result = client.Merge(targetPath, new SvnUriTarget(src), range, mergeArgs);
}
catch (SvnException e)
{
Console.WriteLine("conflict");
}
and the event is as follow:
static void Mergeargs_Conflict(object sender, SvnConflictEventArgs e)
{
Console.WriteLine("I were called.");
}
But it is not giving me any output on the screen. I am trying to merge a url where I know a conflict exists as trying to merge from tortoise svn is giving me a conflict. Please help in this regard.