GetRevisions() публичный Метод

public GetRevisions ( RevisionRange revisionRange ) : Tp.SourceControl.VersionControlSystem.RevisionInfo[]
revisionRange Tp.SourceControl.VersionControlSystem.RevisionRange
Результат Tp.SourceControl.VersionControlSystem.RevisionInfo[]
 public void GetLastRevisionInfoOnEmptyLocalRepository()
 {
     using (var s = new Subversion(GetEmptyRepositorySettings(), ObjectFactory.GetInstance <ICheckConnectionErrorResolver>(), ObjectFactory.GetInstance <IActivityLogger>(), ObjectFactory.GetInstance <IDiffProcessor>()))
     {
         var range = s.GetFromTillHead(0.ToString(), 100).Single();
         s.GetRevisions(range).Should(Be.Empty);
     }
 }
        public void GetRevisionInfosForPath()
        {
            using (var s = new Subversion(GetLocalRepositorySettings(), ObjectFactory.GetInstance <ICheckConnectionErrorResolver>(), ObjectFactory.GetInstance <IActivityLogger>(), ObjectFactory.GetInstance <IDiffProcessor>()))
            {
                IEnumerable <RevisionInfo> revisionInfos = s.GetRevisions(new RevisionRange(new SvnRevisionId(1), new SvnRevisionId(5)), "readme.txt");

                Assert.IsNotNull(revisionInfos);
            }
        }
 private static void TestSubversionRepository(string firstFolder, params long[] revisionIds)
 {
     using (var sourceControlService = new Subversion(GetLocalRepositorySettings(firstFolder), ObjectFactory.GetInstance <ICheckConnectionErrorResolver>(), ObjectFactory.GetInstance <IActivityLogger>(), ObjectFactory.GetInstance <IDiffProcessor>()))
     {
         var range             = sourceControlService.GetFromTillHead(0.ToString(), 100).Single();
         var revisionsFromRepo = sourceControlService.GetRevisions(range).Select(x => long.Parse(x.Id.Value)).ToArray();
         revisionsFromRepo.Should(Be.EquivalentTo(revisionIds));
     }
 }
		public void ShouldRetrieve()
		{
			var settings = GetLocalRepositorySettings();
			settings.Uri = new Uri("http://svn.apache.org/repos/asf/spamassassin/trunk").ToString();
			var vcs = new Subversion(settings, ObjectFactory.GetInstance<ICheckConnectionErrorResolver>(), ObjectFactory.GetInstance<IActivityLogger>(), ObjectFactory.GetInstance<IDiffProcessor>());
			var svnRevisionId = new SvnRevisionId(1000000);
			var endRevision = vcs.GetFromTillHead(svnRevisionId, 50);
			var result = vcs.GetRevisions(endRevision.Last());
			result.Should(Be.Not.Empty);
		}
        public void ShouldRetrieveAuthors()
        {
            using (var subversion = new Subversion(GetLocalRepositorySettings(), ObjectFactory.GetInstance <ICheckConnectionErrorResolver>(), ObjectFactory.GetInstance <IActivityLogger>(), ObjectFactory.GetInstance <IDiffProcessor>()))
            {
                var revisions = subversion.GetRevisions(subversion.GetFromTillHead(new SvnRevisionId(0), 100).Single()).OrderBy(x => x.Time);

                var authors = subversion.RetrieveAuthors(new DateRange(revisions.First().Time, revisions.Last().Time));
                authors.Should(Be.EquivalentTo(revisions.Select(x => x.Author).Distinct().ToArray()));
            }
        }
        public void ShouldRetrieve()
        {
            var settings = GetLocalRepositorySettings();

            settings.Uri = new Uri("http://svn.apache.org/repos/asf/spamassassin/trunk").ToString();
            var vcs           = new Subversion(settings, ObjectFactory.GetInstance <ICheckConnectionErrorResolver>(), ObjectFactory.GetInstance <IActivityLogger>(), ObjectFactory.GetInstance <IDiffProcessor>());
            var svnRevisionId = new SvnRevisionId(1000000);
            var endRevision   = vcs.GetFromTillHead(svnRevisionId, 50);
            var result        = vcs.GetRevisions(endRevision.Last());

            result.Should(Be.Not.Empty);
        }
        public void GetRevisionInfos()
        {
            using (var s = new Subversion(GetLocalRepositorySettings(), ObjectFactory.GetInstance <ICheckConnectionErrorResolver>(), ObjectFactory.GetInstance <IActivityLogger>(), ObjectFactory.GetInstance <IDiffProcessor>()))
            {
                IEnumerable <RevisionInfo> revisionInfos = s.GetRevisions(new RevisionRange(new SvnRevisionId(8), new SvnRevisionId(8)));

                Assert.IsNotNull(revisionInfos);

                foreach (RevisionInfo info in revisionInfos)
                {
                    Assert.AreEqual("#112 state:invalid  time :0.25 comment: Linich, Maksim", info.Comment);
                    // Haha, mistaken!!!
                }
            }
        }
		public void GetRevisionInfosForPath()
		{
			using (var s = new Subversion(GetLocalRepositorySettings(), ObjectFactory.GetInstance<ICheckConnectionErrorResolver>(), ObjectFactory.GetInstance<IActivityLogger>(), ObjectFactory.GetInstance<IDiffProcessor>()))
			{
				IEnumerable<RevisionInfo> revisionInfos = s.GetRevisions(new RevisionRange(new SvnRevisionId(1), new SvnRevisionId(5)), "readme.txt");

				Assert.IsNotNull(revisionInfos);
			}
		}
		public void GetRevisionInfos()
		{
			using (var s = new Subversion(GetLocalRepositorySettings(), ObjectFactory.GetInstance<ICheckConnectionErrorResolver>(), ObjectFactory.GetInstance<IActivityLogger>(), ObjectFactory.GetInstance<IDiffProcessor>()))
			{
				IEnumerable<RevisionInfo> revisionInfos = s.GetRevisions(new RevisionRange(new SvnRevisionId(8), new SvnRevisionId(8)));

				Assert.IsNotNull(revisionInfos);

				foreach (RevisionInfo info in revisionInfos)
				{
					Assert.AreEqual("#112 state:invalid  time :0.25 comment: Linich, Maksim", info.Comment);
					// Haha, mistaken!!!
				}
			}
		}
		public void GetLastRevisionInfoOnEmptyLocalRepository()
		{
			using (var s = new Subversion(GetEmptyRepositorySettings(), ObjectFactory.GetInstance<ICheckConnectionErrorResolver>(), ObjectFactory.GetInstance<IActivityLogger>(), ObjectFactory.GetInstance<IDiffProcessor>()))
			{
				var range = s.GetFromTillHead(0.ToString(), 100).Single();
				s.GetRevisions(range).Should(Be.Empty);
			}
		}
		private static void TestSubversionRepository(string firstFolder, params long[] revisionIds)
		{
			using (var sourceControlService = new Subversion(GetLocalRepositorySettings(firstFolder), ObjectFactory.GetInstance<ICheckConnectionErrorResolver>(), ObjectFactory.GetInstance<IActivityLogger>(), ObjectFactory.GetInstance<IDiffProcessor>()))
			{
				var range = sourceControlService.GetFromTillHead(0.ToString(), 100).Single();
				var revisionsFromRepo = sourceControlService.GetRevisions(range).Select(x => long.Parse(x.Id.Value)).ToArray();
				revisionsFromRepo.Should(Be.EquivalentTo(revisionIds));
			}
		}
		public void ShouldRetrieveAuthors()
		{
			using (var subversion = new Subversion(GetLocalRepositorySettings(), ObjectFactory.GetInstance<ICheckConnectionErrorResolver>(), ObjectFactory.GetInstance<IActivityLogger>(), ObjectFactory.GetInstance<IDiffProcessor>()))
			{
				var revisions = subversion.GetRevisions(subversion.GetFromTillHead(new SvnRevisionId(0), 100).Single()).OrderBy(x => x.Time);

				var authors = subversion.RetrieveAuthors(new DateRange(revisions.First().Time, revisions.Last().Time));
				authors.Should(Be.EquivalentTo(revisions.Select(x => x.Author).Distinct().ToArray()));
			}
		}