C# 如何使用 SharpSVN 正确反向合并

发布于 2024-12-14 04:24:54 字数 816 浏览 4 评论 0原文

通过我的申请,我试图将项目恢复到以前的版本。我有能够获取的修订号、本地目标和存储库的 URL。我的代码如下:

SvnMergeArgs mergeArgs = new SvnMergeArgs();
            mergeArgs.Depth = SvnDepth.Infinity;

        SvnRevisionRange svnRange = new SvnRevisionRange(stLogs[0].Revision, templateRevision);

        string MyRepo = http://myServ:8080/svn/Repo/Project/Development/trunk";

        SvnUriTarget MyTarget = new SvnUriTarget(new Uri(MyRepo));

        client.Merge(LocalProjLocation, MyTarget, svnRange, mergeArgs);

stLogs[0].Revision 是项目的最新修订版,当前修订版位于 LocalProjLocation 目录中。 templateRevision 是我想要反向合并到的修订版本。 MyRepo显然是项目所在的存储库。当我执行此代码时,我在 client.Merge() 上遇到异常“http://myServ:8080/svn/Repo/Project/Development/trunk 与 http://myServ:8080/svn/Repo" 大家有什么想法吗?

With my application, I am trying to revert the project back to a previous revision. I have the revision number that I was able to obtain, I have the local target, and the URL of the repository. My code is as follows:

SvnMergeArgs mergeArgs = new SvnMergeArgs();
            mergeArgs.Depth = SvnDepth.Infinity;

        SvnRevisionRange svnRange = new SvnRevisionRange(stLogs[0].Revision, templateRevision);

        string MyRepo = http://myServ:8080/svn/Repo/Project/Development/trunk";

        SvnUriTarget MyTarget = new SvnUriTarget(new Uri(MyRepo));

        client.Merge(LocalProjLocation, MyTarget, svnRange, mergeArgs);

stLogs[0].Revision is the latest revision of the project, the current revision in the LocalProjLocation directory. templateRevision is the revision that I want to reverse merge to. MyRepo is obviously the repository where the project is located. When I execute this code, I get an exception on the client.Merge() of "http://myServ:8080/svn/Repo/Project/Development/trunk isnt in the same repository as http://myServ:8080/svn/Repo" Any ideas anyone?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

非要怀念 2024-12-21 04:24:54

发现我的问题了。看来回购地址不正确(似乎区分大小写)。它是 http://myServ:8080/svn/Repo 但我指向 http://myServ:8080/svn/repo。希望对其他人有帮助...检查您的 URI 的大小写。

Found my problem. It seemed that the repo address was incorrect (case sensitive it seems). It was http://myServ:8080/svn/Repo but I was pointing to http://myServ:8080/svn/repo. Hope that helps anyone else...check the case of your URI.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文