本文整理汇总了C#中IIntegrationResult.SetRevision方法的典型用法代码示例。如果您正苦于以下问题:C# IIntegrationResult.SetRevision方法的具体用法?C# IIntegrationResult.SetRevision怎么用?C# IIntegrationResult.SetRevision使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IIntegrationResult
的用法示例。
在下文中一共展示了IIntegrationResult.SetRevision方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetModifications
public override Modification[] GetModifications(IIntegrationResult from, IIntegrationResult to)
{
if (from == null)
{
throw new ArgumentNullException("from");
}
if (to == null)
{
throw new ArgumentNullException("to");
}
var progressInformation = to.BuildProgressInformation;
progressInformation.SignalStartRunTask("Hg: Get Modifications");
var lastBuilt = from.GetRevision();
Log.Debug("Last built from revision '{0}'", lastBuilt);
var workingDirectory = WorkingDirectoryOrDefault(to.WorkingDirectory);
progressInformation.AddTaskInformation("Hg: Initializing working directory");
InitializeWorkingDirectory(workingDirectory);
var hg = new Hg(new CruiseControlHgProcess(ProcessExecutor), _hgXmlLogParser, workingDirectory);
progressInformation.AddTaskInformation("Hg: Pulling changes");
PullChanges(hg);
progressInformation.AddTaskInformation("Hg: Verifying repository");
VerifyRepository(hg);
progressInformation.AddTaskInformation("Hg: Getting target revision");
var targetRevision = GetTargetRevision(hg);
progressInformation.AddTaskInformation("Hg: Getting changesets");
var changesets = GetChangesets(hg, lastBuilt, targetRevision);
Log.Debug("{0} Hg changeset(s) found", changesets.Count());
to.SetRevision(targetRevision);
progressInformation.AddTaskInformation("Hg: Generating modifications");
return ConvertChangesetsToModifications(changesets)
.TapIf(() => WebUrlBuilder != null, ems => WebUrlBuilder.SetupModification(ems))
.Tap(FillIssueUrl);
}