开发者

Retrieving the last n log messages with SharpSvn

开发者 https://www.devze.com 2022-12-24 05:32 出处:网络
Does anyone how to retrieve the last n log messages from SVN using SharpSvn? I’ve been calling GetLog with an SvnRevisionRange argument but really just need the 20 most recent messages which I can’t

Does anyone how to retrieve the last n log messages from SVN using SharpSvn? I’ve been calling GetLog with an SvnRevisionRange argument but really just need the 20 most recent messages which I can’t pre开发者_JAVA百科dict on date alone. Thanks!


You want SvnLogArgs.Limit I think.


If you wish to get the last N revisions. You can retreive them by combining LIMIT and RANGE.

# Header - Zero (DESC) , instead of Zero - Head (ASC - DEFAULT)

Dim uri As New Uri(_svnPath)
Dim logs As New Collections.ObjectModel.Collection(Of SvnLogEventArgs)
client.GetLog(uri, New SvnLogArgs() With { _
    .Limit = 250, _
    .Range = New SvnRevisionRange(SvnRevision.Head, SvnRevision.Zero) _
}, logs)
0

精彩评论

暂无评论...
验证码 换一张
取 消