3

I'd like to build a site which simply displays the top latest (by date, revision?) "n" commit logs plus other associated info.

What's the best way to do this? I started having a quick look at SharpSvn, but the GET seems to be based on Revision ranges rather than date.

I'd like a simple example for .Net in c# based on any available library which gets the job done.

Willi Mentzel
  • 27,862
  • 20
  • 113
  • 121
andy
  • 8,775
  • 13
  • 77
  • 122

1 Answers1

6

Since you mentioned using SharpSVN, I happen to have written this in BuildMaster:

private static IList<string> GetLatestCommitMessages(Uri repository, int count)
{
    using (var client = new SvnClient())
    {
        System.Collections.ObjectModel.Collection<SvnLogEventArgs> logEntries;
        var args = new SvnLogArgs()
        {
            Limit = count
        };

        client.GetLog(repository, args, out logEntries);

        return logEntries.Select(log => log.LogMessage).ToList();
    }
}
John Rasch
  • 62,489
  • 19
  • 106
  • 139