示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Git" /> class.
 /// </summary>
 /// <param name="historyParser">The history parser.</param>
 /// <param name="executor">The executor.</param>
 /// <param name="fileSystem">The file system.</param>
 /// <param name="fileDirectoryDeleter">The file directory deleter.</param>
 /// <remarks></remarks>
 public Git(IHistoryParser historyParser, ProcessExecutor executor, IFileSystem fileSystem, IFileDirectoryDeleter fileDirectoryDeleter)
     : base(historyParser, executor)
 {
     _fileSystem           = fileSystem;
     _fileDirectoryDeleter = fileDirectoryDeleter;
     this.AutoGetSource    = true;
     this.Executable       = "git";
     this.Branch           = "master";
     this.TagCommitMessage = "CCNet Build {0}";
     this.TagNameFormat    = "CCNet-Build-{0}";
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Git" /> class.
 /// </summary>
 /// <param name="historyParser">The history parser.</param>
 /// <param name="executor">The executor.</param>
 /// <param name="fileSystem">The file system.</param>
 /// <param name="fileDirectoryDeleter">The file directory deleter.</param>
 /// <remarks></remarks>
 public Git(IHistoryParser historyParser, ProcessExecutor executor, IFileSystem fileSystem, IFileDirectoryDeleter fileDirectoryDeleter)
     : base(historyParser, executor)
 {
     _fileSystem                          = fileSystem;
     _fileDirectoryDeleter                = fileDirectoryDeleter;
     this.AutoGetSource                   = true;
     this.CleanUntrackedFiles             = true;
     this.Executable                      = "git";
     this.Branch                          = "master";
     this.TagCommitMessage                = "CCNet Build {0}";
     this.TagNameFormat                   = "CCNet-Build-{0}";
     this.MaxAmountOfModificationsToFetch = 100;
 }
示例#3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Mercurial"/> class.
        /// </summary>
        /// <param name="historyParser">The history parser.</param>
        /// <param name="executor">The executor.</param>
        /// <param name="fileSystem">The file system.</param>
        /// <param name="fileDirectoryDeleter">The file directory deleter.</param>
        public Mercurial(IHistoryParser historyParser, ProcessExecutor executor, IFileSystem fileSystem, IFileDirectoryDeleter fileDirectoryDeleter)
            : base(historyParser, executor)
        {
            Executable    = DefaultExecutable;
            AutoGetSource = true;
            // Do not initialize the branch because the default branch does not exist before the first commit
            //Branch = DefaultBranch;
            CommitterName              = DefaultCommitterName;
            CommitModifications        = false;
            CommitUntracked            = false;
            ModificationsCommitMessage = DefaultModificationsCommitMessage;
            MultipleHeadsFail          = false;
            TagOnSuccess        = false;
            TagNameFormat       = DefaultTagNameFormat;
            TagCommitMessage    = DefaultTagCommitMessage;
            PurgeModifications  = false;
            PushModifications   = false;
            RevertModifications = false;

            _fileSystem           = fileSystem;
            _fileDirectoryDeleter = fileDirectoryDeleter;
        }
示例#4
0
		private void SetupGit(IFileSystem filesystem, IFileDirectoryDeleter fileDirectoryDeleter)
		{
			git = new Git((IHistoryParser)mockHistoryParser.MockInstance, (ProcessExecutor)mockProcessExecutor.MockInstance, filesystem, fileDirectoryDeleter);
			git.Repository = @"xyz.git";
			git.WorkingDirectory = DefaultWorkingDirectory;
		}
示例#5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Git" /> class.	
        /// </summary>
        /// <param name="historyParser">The history parser.</param>
        /// <param name="executor">The executor.</param>
        /// <param name="fileSystem">The file system.</param>
        /// <param name="fileDirectoryDeleter">The file directory deleter.</param>
        /// <remarks></remarks>
		public Git(IHistoryParser historyParser, ProcessExecutor executor, IFileSystem fileSystem, IFileDirectoryDeleter fileDirectoryDeleter)
			: base(historyParser, executor)
		{
			_fileSystem = fileSystem;
			_fileDirectoryDeleter = fileDirectoryDeleter;
            this.AutoGetSource = true;
            this.Executable = "git";
            this.Branch = "master";
            this.TagCommitMessage = "CCNet Build {0}";
            this.TagNameFormat = "CCNet-Build-{0}";
		}
示例#6
0
 private void SetupGit(IFileSystem filesystem, IFileDirectoryDeleter fileDirectoryDeleter)
 {
     git                  = new Git((IHistoryParser)mockHistoryParser.MockInstance, (ProcessExecutor)mockProcessExecutor.MockInstance, filesystem, fileDirectoryDeleter);
     git.Repository       = @"xyz.git";
     git.WorkingDirectory = DefaultWorkingDirectory;
 }
示例#7
0
 public Git(IHistoryParser historyParser, ProcessExecutor executor, IFileSystem fileSystem, IFileDirectoryDeleter fileDirectoryDeleter)
     : base(historyParser, executor)
 {
     _fileSystem = fileSystem;
     _fileDirectoryDeleter = fileDirectoryDeleter;
 }
示例#8
0
		/// <summary>
		/// Initializes a new instance of the <see cref="Mercurial"/> class.
		/// </summary>
		/// <param name="historyParser">The history parser.</param>
		/// <param name="executor">The executor.</param>
		/// <param name="fileSystem">The file system.</param>
		/// <param name="fileDirectoryDeleter">The file directory deleter.</param>
		public Mercurial(IHistoryParser historyParser, ProcessExecutor executor, IFileSystem fileSystem, IFileDirectoryDeleter fileDirectoryDeleter)
			: base(historyParser, executor)
		{
			Executable = DefaultExecutable;
			AutoGetSource = true;
			// Do not initialize the branch because the default branch does not exist before the first commit
			//Branch = DefaultBranch;
			CommitterName = DefaultCommitterName;
			CommitModifications = false;
			CommitUntracked = false;
			ModificationsCommitMessage = DefaultModificationsCommitMessage;
			MultipleHeadsFail = false;
			TagOnSuccess = false;
			TagNameFormat = DefaultTagNameFormat;
			TagCommitMessage = DefaultTagCommitMessage;
			PurgeModifications = false;
			PushModifications = false;
			RevertModifications = false;

			_fileSystem = fileSystem;
			_fileDirectoryDeleter = fileDirectoryDeleter;
		}
示例#9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Git" /> class.	
 /// </summary>
 /// <param name="historyParser">The history parser.</param>
 /// <param name="executor">The executor.</param>
 /// <param name="fileSystem">The file system.</param>
 /// <param name="fileDirectoryDeleter">The file directory deleter.</param>
 /// <remarks></remarks>
 public Git(IHistoryParser historyParser, ProcessExecutor executor, IFileSystem fileSystem, IFileDirectoryDeleter fileDirectoryDeleter)
     : base(historyParser, executor)
 {
     _fileSystem = fileSystem;
     _fileDirectoryDeleter = fileDirectoryDeleter;
     this.AutoGetSource = true;
     this.CleanUntrackedFiles = true;
     this.Executable = "git";
     this.Branch = "master";
     this.TagCommitMessage = "CCNet Build {0}";
     this.TagNameFormat = "CCNet-Build-{0}";
     this.MaxAmountOfModificationsToFetch = 100;
 }