private LogEntry GetLogEntry(string dir, string url, long revision) { var xdoc = new XmlDocument(); xdoc.LoadXml( Subversion.GetLog(dir, url, revision)); var messageNode = xdoc.SelectSingleNode("/log/logentry/msg/text()"); var authorNode = xdoc.SelectSingleNode("/log/logentry/author/text()"); if (authorNode == null) { return null; } var logEntry = new LogEntry(revision, CurrentUser) { BaseURL = url, Message = messageNode == null? "Naughty " + authorNode.Value + " didn't leave a log message": messageNode.Value, User = authorNode.Value }; var xmlNodeList = xdoc.SelectNodes("/log/logentry/paths/path"); if (xmlNodeList == null) return null; foreach (XmlElement xnav in xmlNodeList) { //Path: need to remove /example/trunk from path... var item = new SvnPath(logEntry) { Action = Parse(xnav.SelectSingleNode("@action").Value), Path = xnav.SelectSingleNode("text()").Value }; logEntry.Files.Add(item); } return logEntry; }
public SvnPath(LogEntry logEntry) { LogEntry = logEntry; }