如何在 SharpSVN 中获取 SvnLogEventArgs 子版本号?

发布于 2024-09-09 22:56:31 字数 564 浏览 3 评论 0原文

我最近一直在使用 SharpSVN,目前我正在尝试获取所有修订版儿童的修订版号。我看到使用 SvnLogEventArgs.HasChildren 我可以验证它们是否存在,但它需要它下面的子级的实际数量。我一直在查看 SvnClient 对象并看到 GetMergesMerged() 但无法确定向其提供什么以返回正确的值,现在它不返回任何内容。

System.Collections.ObjectModel.Collection<SvnMergesMergedEventArgs> logitems = null;
SvnTarget target = SvnTarget.FromUri(new Uri(myRepoURL));
SvnUriTarget targetUri = new SvnUriTarget(new Uri(myRepoURL), revision);
client.GetMergesMerged(target, targetUri, out logitems);

这是我目前使用的,但没有返回任何内容,如果有人能指出我正确的方向,我将不胜感激。 -谢谢

I have been working with SharpSVN quite a bit lately and I'm currently trying to obtain all of a revisions children's revision numbers. I see that using SvnLogEventArgs.HasChildren I can verify that they exist but it need the actual numbers of the children below it. I've been looking at the SvnClient object and see a GetMergesMerged() but an unable to determine what to feed it to return it the correct values, right now it does not return anything.

System.Collections.ObjectModel.Collection<SvnMergesMergedEventArgs> logitems = null;
SvnTarget target = SvnTarget.FromUri(new Uri(myRepoURL));
SvnUriTarget targetUri = new SvnUriTarget(new Uri(myRepoURL), revision);
client.GetMergesMerged(target, targetUri, out logitems);

This is what I currently use but is not returning anything, if someone could point me in the right direction it would be appreciated. -Thanks

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

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

发布评论

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

评论(1

爱要勇敢去追 2024-09-16 22:56:31

要执行您想要的操作,您应该使用 Log (或 GetLog)方法。

Client.Log(new Uri(myRepoUrl),
    new SvnLogArgs
    {
        Start = startRevision,
        End = endRevision,
        Limit = numberOfItemsToFetch,
        RetrieveMergedRevisions = true
    },
    (s, e) =>
    {
        // e.MergeLogNestingLevel indicates if this is the first, second or nth level merge
    });

与每个需要委托的 SharpSvn 调用一样,如果您想在委托之外使用 eventargs,请务必在委托/lambda 内部调用 e.Detach()

To do what you want, you should use the Log (or GetLog) method.

Client.Log(new Uri(myRepoUrl),
    new SvnLogArgs
    {
        Start = startRevision,
        End = endRevision,
        Limit = numberOfItemsToFetch,
        RetrieveMergedRevisions = true
    },
    (s, e) =>
    {
        // e.MergeLogNestingLevel indicates if this is the first, second or nth level merge
    });

As with every SharpSvn call that takes a delegate, if you want to use the eventargs outside of the delegate, be sure to call e.Detach() inside the delegate/lambda

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