Search code examples
c#svnsharpsvn

SharpSvn Resolve Conflict not works


After updating file from subversion, i try resolve conflict with options: Theirs, Mine or Merged, but the operation not works. I looked the documentation from SharpSvn site and stackoverflow topics, without solution success.

My code

SvnResolveArgs svnResolveArgs = new SvnResolveArgs();
svnResolveArgs.ThrowOnError = true;

SvnAccept accept = SvnAccept.Unspecified;

switch (frmResolve.IdResolve)
{
    case 0:
        accept = SvnAccept.Theirs;
        break;
    case 1:
        accept = SvnAccept.Mine;
        break;
    case 2:
        accept = SvnAccept.Merged;
        break;
}

if (accept != SvnAccept.Unspecified)
{
    client.Resolve(_caminhoGELocal, accept, svnResolveArgs);
    HideInvoke(f);
    this.ShowMsg(Mensagens.SucessoOperacao);
    _isOcorreuConflito = false;
}
else
    this.ShowMsg(Mensagens.OpcaoResolveNaoSelecionada);

After Resolve execution, my file keep with revision files and markup like bellow:

<<<<<<< .mine
<Style id="s_ylw-ccccccccc">
    <IconStyle>
        <scale>1.5</scale>
        <Icon>
            <href>http://maps.google.com/mapfiles/kml/shapes/water.png</href>
        </Icon>
        <hotSpot x="0.5" y="0" xunits="fraction" yunits="fraction"/>
    </IconStyle>
</Style>
||||||| .r4477
=======

How to resolve this bug?


Solution

  • In Subversion it really depends on what kind of conflict you have, which options you can choose. Especially on tree conflicts the list of options is really limited. On text and property conflicts the options you use now should generally work.

    With Subversion 1.10 there will be a new api that provides a list of valid options and descriptions on what these options will do. When that version nears release this support will also be available via that SharpSvn version.