Esempio n. 1
0
 protected override void CheckStartRevision(
     MercurialPluginProfile settings,
     IVersionControlSystem versionControlSystem,
     PluginProfileErrorCollection errors)
 {
     settings.ValidateStartRevision(errors);
 }
Esempio n. 2
0
 public SourceCode(IVersionControlSystem versionControlSystem)
 {
     VersionControlSystem = versionControlSystem;
     _getAll = new Lazy <IEnumerable <string> >(() => VersionControlSystem.SourceCode.Select(FileSystem.NormalizedPath));
     _getAllButCodecovIgnored = new Lazy <IEnumerable <string> >(LoadGetAllButCodecovIgnored);
     _directory = new Lazy <string>(() => VersionControlSystem.RepoRoot);
 }
		public static RevisionInfo[] ArrayOfSvnRevisionToArrayOfRevisionInfo(Collection<SvnLogEventArgs> svnRevisions,
		                                                                     IVersionControlSystem versionControlSystem)
		{
			var tpRevisionInfo = new List<RevisionInfo>(svnRevisions.Count);
			_log.InfoFormat("Process svn revisions...");
			foreach (var svnRevision in svnRevisions)
			{
				_log.InfoFormat("Do processing of revision {0}", svnRevision.Revision);

				if (svnRevision.Revision == 0 ||
				    svnRevision.ChangedPaths == null ||
				    svnRevision.ChangedPaths.Count == 0)
				{
					_log.InfoFormat("Skip processing revision {0}. {1}.", svnRevision.Revision,
						svnRevision.ChangedPaths == null
							? "ChangedPaths == null"
							: $"ChangedPaths.Count == {svnRevision.ChangedPaths.Count}");
					continue;
				}

				_log.Info("Adding revisions infos");

				var info = SvnRevisionToRevisionInfo(svnRevision, versionControlSystem);
				tpRevisionInfo.Add(info);
			}
			return tpRevisionInfo.ToArray();
		}
 public NewRevisionRangeDetectedMessageHandler(IVersionControlSystem versionControlSystem, ILocalBus bus, IActivityLogger logger)
 {
     _versionControlSystem = versionControlSystem;
     _bus    = bus;
     _logger = logger;
     _parser = new CommentParser();
 }
 protected override void CheckStartRevision(SubversionPluginProfile settings,
                                            IVersionControlSystem versionControlSystem,
                                            PluginProfileErrorCollection errors)
 {
     if (settings.RevisionSpecified && settings.ValidateStartRevision(errors))
     {
         versionControlSystem.CheckRevision(settings.StartRevision, errors);
     }
 }
Esempio n. 6
0
 protected VersionControlSystemProcessorBase(IRevisionIdComparer revisionComparer, IStorageRepository storage, ISourceControlConnectionSettingsSource settingsSource, IVersionControlSystem versionControlSystem, ILocalBus bus, IActivityLogger logger)
 {
     RevisionComparer     = revisionComparer;
     Storage              = storage;
     VersionControlSystem = versionControlSystem;
     Bus           = bus;
     Logger        = logger;
     StartRevision = revisionComparer.ConvertToRevisionId(settingsSource.StartRevision);
 }
		protected VersionControlSystemProcessorBase(IRevisionIdComparer revisionComparer, IStorageRepository storage, ISourceControlConnectionSettingsSource settingsSource, IVersionControlSystem versionControlSystem, ILocalBus bus, IActivityLogger logger)
		{
			RevisionComparer = revisionComparer;
			Storage = storage;
			VersionControlSystem = versionControlSystem;
			Bus = bus;
			Logger = logger;
			StartRevision = revisionComparer.ConvertToRevisionId(settingsSource.StartRevision);
		}
Esempio n. 8
0
        public static IEnumerable <IRepository> Create(IVersionControlSystem versionControlSystem, IContinuousIntegrationServer continuousIntegrationServer)
        {
            if (continuousIntegrationServer.Detecter)
            {
                yield return(continuousIntegrationServer);
            }

            yield return(versionControlSystem);
        }
Esempio n. 9
0
 public UploadFacade(IContinuousIntegrationServer continuousIntegrationServer, IVersionControlSystem versionControlSystem, IYaml yaml, ICoverage coverage, IEnviornmentVariables enviornmentVariables, IUrl url, IUpload upload)
 {
     _continuousIntegrationServer = continuousIntegrationServer;
     _versionControlSystem        = versionControlSystem;
     _yaml                 = yaml;
     _coverage             = coverage;
     _enviornmentVariables = enviornmentVariables;
     _url    = url;
     _upload = upload;
 }
Esempio n. 10
0
        public static void Main(string[] args)
        {
            if (args.Length < 2)
            {
                Console.WriteLine("Parameters required");
                Console.ReadLine();
                return;
            }

            IVersionControlSystem system = ClientBuilder.GetClient(ClientBuilder.ClientTypes.TortoiseSVN);

            switch (args[1])
            {
            case "status":
                Console.WriteLine(args[0]);
                Console.WriteLine("Modified locally: " + system.IsModified(args[0]));
                break;

            case "update":
                Console.WriteLine("Updating:");
                Console.WriteLine(args[0]);
                Console.WriteLine("Synchronous operation is complete. Result: " + system.UpdateFile(args[0], true));
                break;

            case "revert":
                Console.WriteLine("Reverting:");
                Console.WriteLine(args[0]);
                Console.WriteLine("Synchronous operation is complete. Result: " + system.RevertFile(args[0], true));
                break;

            case "commit":
                Console.WriteLine("Enter a message:");
                string message = Console.ReadLine();
                Console.WriteLine("Commiting:");
                Console.WriteLine(args[0]);
                Console.WriteLine("Synchronous operation is complete. Result: " + system.CommitFile(args[0], message, true));
                break;

            case "logs":
                Console.WriteLine("Showing logs for:");
                Console.WriteLine(args[0]);
                Console.WriteLine("Synchronous operation is complete. Result: " + system.ShowLogs(args[0], true));
                break;
            }

            Console.WriteLine("Press <Enter> to exit.");
            Console.ReadLine();
        }
		private static RevisionInfo SvnRevisionToRevisionInfo(SvnLoggingEventArgs revision, IVersionControlSystem vcs)
		{
			var infos = SvnChangeItemCollectionToArrayOfRevisionEntryInfo(revision.ChangedPaths);
			var entries = infos.ToArray();

			_log.InfoFormat("Revision Info ctor: {0},{1},{2},{3},{4}", revision.Revision, revision.Author, revision.LogMessage,
			                revision.Time.ToLocalTime(), entries);
			return new RevisionInfo
			{
				Id = revision.Revision.ToString(),
				Author = revision.Author,
				Comment = revision.LogMessage,
				Time = revision.Time.ToLocalTime(),
				Entries = entries
			};
		}
        public static RevisionInfo[] ArrayOfSvnRevisionToArrayOfRevisionInfo(Collection <SvnLogEventArgs> svnRevisions,
                                                                             IVersionControlSystem versionControlSystem)
        {
            var tpRevisionInfo = new List <RevisionInfo>(svnRevisions.Count);

            _log.InfoFormat("Process svn revisions...");
            foreach (var svnRevision in svnRevisions)
            {
                _log.InfoFormat("Do processing of revision {0}", svnRevision.Revision);

                if (svnRevision.Revision == 0 ||
                    svnRevision.ChangedPaths == null ||
                    svnRevision.ChangedPaths.Count == 0)
                {
                    continue;
                }

                _log.Info("Adding revisions infos");

                var info = SvnRevisionToRevisionInfo(svnRevision, versionControlSystem);
                tpRevisionInfo.Add(info);
            }
            return(tpRevisionInfo.ToArray());
        }
Esempio n. 13
0
 public TestSelector(Jenkins jenkins, IProcessManager processManager, IVersionControlSystem versionControlSystem)
 {
     this.jenkins        = jenkins;
     this.processManager = processManager;
     this.vcs            = versionControlSystem;
 }
        private static RevisionInfo SvnRevisionToRevisionInfo(SvnLoggingEventArgs revision, IVersionControlSystem vcs)
        {
            var infos   = SvnChangeItemCollectionToArrayOfRevisionEntryInfo(revision.ChangedPaths);
            var entries = infos.ToArray();

            _log.InfoFormat("Revision Info ctor: {0},{1},{2},{3},{4}", revision.Revision, revision.Author, revision.LogMessage,
                            revision.Time.ToLocalTime(), entries);
            return(new RevisionInfo
            {
                Id = revision.Revision.ToString(),
                Author = revision.Author,
                Comment = revision.LogMessage,
                Time = revision.Time.ToLocalTime(),
                Entries = entries
            });
        }
Esempio n. 15
0
 protected abstract void CheckStartRevision(TVcsPluginProfile settings, IVersionControlSystem versionControlSystem,
                                            PluginProfileErrorCollection errors);
Esempio n. 16
0
 public VersionControlSystemListener(IVersionControlSystem versionControlSystem, IRevisionIdComparer revisionComparer, ILocalBus bus,
                                     IStorageRepository storage, ISourceControlConnectionSettingsSource settingsSource, IActivityLogger logger)
     : base(revisionComparer, storage, settingsSource, versionControlSystem, bus, logger)
 {
 }
Esempio n. 17
0
 public RepositoryRescanInitiatedMessageHandler(IVersionControlSystem versionControlSystem, IRevisionIdComparer revisionComparer, ILocalBus bus, ISourceControlConnectionSettingsSource settingsSource, IStorageRepository storage, IActivityLogger logger)
     : base(revisionComparer, storage, settingsSource, versionControlSystem, bus, logger)
 {
 }