public IEnumerable <Commit> GetLatestLogs(long lastRevision, int limit) { IList <Commit> commits = new List <Commit>(); var projects = new ProjectService(new UnitOfWork()).GetAll(); using (SvnClient svnClient = new SvnClient()) { svnClient.LoadConfiguration(Path.Combine(Path.GetTempPath(), "Svn"), true); svnClient.Authentication.ForceCredentials(Username, Password); foreach (var project in projects) { var repository = RemoteRepro(project); SvnLogHandler handler = new SvnLogHandler(project, commits); svnClient.Log( repository, new SvnLogArgs() { Range = new SvnRevisionRange(lastRevision + 1, SvnRevision.Head), Limit = limit }, handler.Handler); } } return(commits); }
public IEnumerable <Commit> GetLatestLogs(long lastRevision, int limit) { SvnLogHandler handler = new SvnLogHandler(); using (SvnClient svnClient = new SvnClient()) { svnClient.LoadConfiguration(Path.Combine(Path.GetTempPath(), "Svn"), true); svnClient.Authentication.ForceCredentials(Username, Password); svnClient.Log( RemoteRepro, new SvnLogArgs() { Range = new SvnRevisionRange(lastRevision + 1, SvnRevision.Head), Limit = limit }, handler.Handler); } return(handler.Logs); }