GetRevisions() public method

public GetRevisions ( RevisionRange revisionRange ) : Tp.SourceControl.VersionControlSystem.RevisionInfo[]
revisionRange Tp.SourceControl.VersionControlSystem.RevisionRange
return Tp.SourceControl.VersionControlSystem.RevisionInfo[]
コード例 #1
0
 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);
     }
 }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
 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);
		}
コード例 #5
0
        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()));
            }
        }
コード例 #6
0
        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);
        }
コード例 #7
0
        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!!!
				}
			}
		}
コード例 #10
0
		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);
			}
		}
コード例 #11
0
		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));
			}
		}
コード例 #12
0
		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()));
			}
		}