Search code examples
c#svnsharpsvn

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.


Solution

  • 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)
    }