예제 #1
0
파일: DirModel.cs 프로젝트: SteGriff/NCover
 public void RaiseConflictDetected(SvnPath path, string file, WatcherChangeTypes changeType)
 {
     if (ConflictDetected != null)
     {
         ConflictDetected(path, file, changeType);
     }            
 }
예제 #2
0
 void model_ConflictDetected(SvnPath filename, string file, WatcherChangeTypes changeType)
 {
     notifyIcon.ShowBalloonTip(10 * 1000, "Conflict warning!", file + " was " + filename.Action + " by " + filename.LogEntry.User + " for:\r\n"  + filename.LogEntry.Message, BalloonTipIcon.Warning);
 }
예제 #3
0
파일: DirModel.cs 프로젝트: SteGriff/NCover
        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;
        }