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

所以我看到已更新,但现有文件未更新。如果某些文件丢失 - 它们将被下载。但现有文件不会更新。

我对那些东西很生气,请帮助我,我的英雄!

4

1 回答 1

1

您必须设置 MergedFile 属性。如果没有,SharpSVN 将不会像您描述的那样合并文件。

static void asdf_Conflict(object sender, SvnConflictEventArgs e)
{
    e.Choice = SvnAccept.TheirsFull;
    e.MergedFile = e.TheirFile;
}
于 2019-10-01T11:38:40.560 回答