【问题标题】:SharpSVN doesn't update filesSharpSVN 不更新文件
【发布时间】:2013-11-19 12:46:37
【问题描述】:
                    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;
    }

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

我被那些东西弄疯了,请帮助我,我的英雄!

【问题讨论】:

  • 你使用什么版本的SharpSvn?我试过1.8-x86,它似乎工作正常。
  • @johny 看起来像 1.8004.2609.15378 但对于 x64
  • @johny 当然没有结果,问题没有解决,似乎逻辑仍然存在于这个星球上。当前版本:SharpSvn 1.8005.2698。
  • 在您尝试更新之前是否已修改文件? dir 是否指向“干净”的工作副本?
  • 工作副本修订号和远程副本修订号将有助于解决问题

标签: svn sharpsvn svn-update


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-01
    • 2010-11-06
    • 1970-01-01
    • 2012-06-06
    • 2016-08-29
    • 1970-01-01
    相关资源
    最近更新 更多