Not all required changes are specified by sharpsvn

I am trying to do a merge using SharpSVN. A little research and I found out that SharpSVN supports the MergDiff feature, however, when I try to execute the code like below, I get an error about not all required changes.

thank

try
{
    SvnCheckOutArgs argsSVNCheckout = new SvnCheckOutArgs();
    SvnUpdateResult result;
    SvnTarget _rootSVNTarget = null;   // = new SvnTarget();
    string serverUrl = "http://svn.snaffpaw.com:8080/CPM Creator/";


    // The Subversion target to run log against
    SvnTarget target = null;

    // Attempt to create an SvnTarget by parsing the targetPath
    if (string.IsNullOrEmpty(targetPath) ||
        !SvnTarget.TryParse(targetPath, out target))

    if (string.IsNullOrEmpty(serverUrl) || (!SvnTarget.TryParse(serverUrl,out _rootSVNTarget))) 


    //SvnStatusArgs argSVN = new SvnStatusArgs();
    //argSVN.RetrieveRemoteStatus = true;

    //Collection<SvnStatusEventArgs> infos;
    //bool isChecked = client.GetStatus(targetPath, argSVN, out infos);

    // Attempt to create an SvnTarget by parsing the targetPath
    if (string.IsNullOrEmpty(targetPath) ||
        !SvnTarget.TryParse(targetPath, out target))


        if (string.IsNullOrEmpty(serverUrl) || !SvnTarget.TryParse(serverUrl, out _rootSVNTarget))



    client.Authentication.DefaultCredentials = new NetworkCredential("guest", "guestpwd");



    client.DiffMerge(targetPath, _rootSVNTarget, target); //<<<-- errors here
}
// ...

      

+1


source to share


1 answer


As pointed out in the SharpSvn user list, the following example would resolve the missing changes:

using (SvnClient client = new SvnClient())
{
 client.DiffMerge(
     "CHANGES",  // Target to merge to
     new SvnUriTarget(new Uri("http://svn.collab.net/repos/svn/tags/1.5.0/CHANGES")), SvnRevision.Head),
     new SvnUriTarget(new Uri("http://svn.collab.net/repos/svn/tags/1.5.5/CHANGES"), SvnRevision.Head));
 }

      



The error was that the passed Uris was not the default HEAD version, but had to explicitly use the head revision.

This is fixed in the current daily build available at http://sharpsvn.net/daily/

+1


source







All Articles