Exemplo n.º 1
0
        public void GetRevisionData_Revision1_AuthorIsChristian()
        {
            var rev = api.GetRevisionData(1, 1);

            Assert.That(rev, Has.Count.EqualTo(1));
            Assert.That(rev[0].Author, Is.EqualTo("Christian"));
            Assert.IsTrue(rev[0].Changes.TrueForAll(c => api.GetPathInfo(c.Path, c.Revision).Author == rev[0].Author));
        }
Exemplo n.º 2
0
        void IndexRevisionRange(int startRevision, int stopRevision)
        {
            foreach (var data in _svn.GetRevisionData(startRevision, stopRevision))
            {
                IndexJobData jobData = new IndexJobData();
                if (!_args.SingleRevision)
                {
                    jobData.Path           = "$Revision " + data.Revision;
                    jobData.RevisionFirst  = data.Revision;
                    jobData.RevisionLast   = data.Revision;
                    jobData.Info           = new PathInfo();
                    jobData.Info.Author    = data.Author;
                    jobData.Info.Timestamp = data.Timestamp;
                    QueueIndexJob(jobData);
                }
                data.Changes.ForEach(QueueAnalyzeJobRecursive);
                _pendingAnalyzeJobs.Wait();
            }

            foreach (var job in _headJobs.Values) // no lock necessary because no analyzeJobs are running
            {
                QueueFetchJob(job);
            }
            _headJobs.Clear();

            _pendingFetchJobs.Wait();
            _indexQueueIsEmpty.WaitOne();

            IndexProperty.SetRevision(_indexWriter, stopRevision);
            Console.WriteLine("Index revision is now " + stopRevision);
        }