animekun
animekun

Reputation: 1869

SharpSVN doesn't update files

                    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!

Upvotes: 6

Views: 1098

Answers (1)

Henry
Henry

Reputation: 36

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;
}

Upvotes: 1

Related Questions