SharpSVN doesn't update files
Asked Answered
P

1

6
                    SvnUpdateArgs asdf = new SvnUpdateArgs();
                    asdf.AllowObstructions = false;
                    asdf.Depth = SvnDepth.Infinity;
                    asdf.IgnoreExternals = false;
                    asdf.UpdateParents = true;
                    asdf.Revision = SvnRevision.Head;
                    asdf.Conflict += new EventHandler<SvnConflictEventArgs>(asdf_Conflict);

                    asdf.Notify += new EventHandler<SvnNotifyEventArgs>(asdf_Notify);
                    asdf.Progress += new EventHandler<SvnProgressEventArgs>(asdf_Progress);


                    SvnUpdateResult res;

                    client.Status(dir, new EventHandler<SvnStatusEventArgs>(Status_Hook));



                    if (client.Update(dir, asdf, out res))
                    {
                        Console.WriteLine("Updated");
                        Console.WriteLine(res.Revision);
                        Console.WriteLine(res.ResultMap);
                    }

    static void asdf_Conflict(object sender, SvnConflictEventArgs e)
    {
        e.Choice = SvnAccept.TheirsFull;
    }

so i see Updated written, but existing files aren't updated. if some files missing - they will be downloaded. but existing files doesn't updated.

i m going mad with that stuff, please help me, my hero!

Primitive answered 7/11, 2013 at 18:0 Comment(7)
What version of SharpSvn do you use? I've tried with 1.8-x86 and it seems to be working.Asterism
@johny seems like 1.8004.2609.15378 but for x64Primitive
@johny of course no result, problem NOT solved, seems like the logic still lives on this planet. current version: SharpSvn 1.8005.2698.Primitive
Is file(s) modified before you try to update? Does dir point on 'clean' working copy?Asterism
working copy revision number and remote copy revision number will help to figure problem outAsterism
@mayer06 can't do that coz my lead but thanks, you chereed my today up C:Primitive
Are you checking res to see what results were returned by the update attempt?Jahveh
F
1

You have to set the MergedFile property. If not, SharpSVN won't be merging the file as you described.

static void asdf_Conflict(object sender, SvnConflictEventArgs e)
{
    e.Choice = SvnAccept.TheirsFull;
    e.MergedFile = e.TheirFile;
}
Forwardness answered 1/10, 2019 at 11:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.