简体   繁体   中英

How do i list all existing revisions of a SVN Repository in c# using SharpSvn

I want to get a list of all revisions from a given Svn repository. But i am pretty new to SharpSvn and Svn in general. Is there an easy way to get this list?

If this question has already been answered, i would apreciate it if you linked the question.

Would something like this be an adequate answer?

SvnTarget target = SvnTarget.FromUri(Path);
Collection<SvnLogEventArgs> logEventArgs;
List<Int64> revisionNumbersList = new List<Int64>;
SvnLogArgs logArgs = new SvnLogArgs();
DPISVN_CLNT.GetLog(path, logArgs, out logEventArgs);

Int64 latestRev = logEventArgs[0].Revision;
foreach(var arg in logEventArgs)
{
    revisionNumbersList.Add(arg.Revision)
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM