本文整理汇总了C#中BranchInfo类的典型用法代码示例。如果您正苦于以下问题:C# BranchInfo类的具体用法?C# BranchInfo怎么用?C# BranchInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BranchInfo类属于命名空间,在下文中一共展示了BranchInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BranchInfoActor
public BranchInfoActor()
{
Receive<GetBranchInfo>(message =>
{
Logger.WriteLine($"Starting Branch info {message.DirPath} -> {message.BranchName}");
using (var repository = new Repository(message.RepositoryPath))
{
var branch = repository.Branches[message.BranchName];
var branchLastCommit = branch.Tip;
var branchInfo = new BranchInfo
{
Name = branch.Name,
CommitterDate = branchLastCommit.Committer.When,
CommitterName = branchLastCommit.Committer.Name,
CommitterEmail = branchLastCommit.Committer.Email,
Message = branchLastCommit.Message,
Sha = branchLastCommit.Sha,
};
var repoAndBranchInfo = new RepoAndBranchInfo(message.DirPath, branchInfo);
Context.ActorSelection(ActorSelectionRouting.BranchInfoAggregationActorPath)
.Tell(new RepositoryAndBranchInfo(repoAndBranchInfo));
}
});
}
示例2: Reset
public void Reset(BranchInfo branch)
{
string strAblagePath = this.Convention.GetAblagePath(branch);
if(this.FileSystemAdapter.Exists(strAblagePath)) this.FileSystemAdapter.EmptyDirectory(strAblagePath);
else this.FileSystemAdapter.CreateDirectory(strAblagePath);
}
示例3: BranchCoverageDetail
public BranchCoverageDetail(BranchInfo branchInfo, int coveredTimes, BranchInfo targetLocation, int targetCoveredTimes, string type)
{
BranchInfo = branchInfo;
CoveredTimes = coveredTimes;
TargetLocation = targetLocation;
this.targetCoveredTimes = targetCoveredTimes;
Type = type;
}
示例4: BoundaryProblem
public BoundaryProblem(string kind, string targetName, string message, BranchInfo flippedLocation, string flippedCondition)
{
Kind = kind;
TargetName = targetName;
Message = message;
FlippedLocation = flippedLocation;
FlippedCondition = flippedCondition;
}
示例5: GUBPBranchConfig
public GUBPBranchConfig(IEnumerable<UnrealTargetPlatform> InHostPlatforms, string InBranchName, BranchInfo InBranch, GUBPBranchHacker.BranchOptions InBranchOptions, bool bInForceIncrementalCompile, JobInfo JobInfo)
{
HostPlatforms = new List<UnrealTargetPlatform>(InHostPlatforms);
BranchName = InBranchName;
Branch = InBranch;
BranchOptions = InBranchOptions;
bForceIncrementalCompile = bInForceIncrementalCompile;
this.JobInfo = JobInfo;
}
示例6: GUBPBranchConfig
public GUBPBranchConfig(int InCL, IEnumerable<UnrealTargetPlatform> InHostPlatforms, string InBranchName, BranchInfo InBranch, GUBPBranchHacker.BranchOptions InBranchOptions, bool bInForceIncrementalCompile, bool bInPreflightBuild, string InPreflightMangleSuffix)
{
CL = InCL;
HostPlatforms = new List<UnrealTargetPlatform>(InHostPlatforms);
BranchName = InBranchName;
Branch = InBranch;
BranchOptions = InBranchOptions;
bForceIncrementalCompile = bInForceIncrementalCompile;
bPreflightBuild = bInPreflightBuild;
PreflightMangleSuffix = InPreflightMangleSuffix;
}
示例7: InstallPackages
public void InstallPackages(BranchInfo branch)
{
this.FileExecution.ExecuteInCmd(this.Settings.AdeNetExePath, string.Format("-workingdirectory {0} -deploy -development", this.Convention.GetLocalPath(branch)));
}
示例8: DeployTestData
public void DeployTestData(BranchInfo branch, string strConnectionString)
{
this.FileExecution.ExecuteInCmd(this.Settings.AdeNetExePath,
string.Format(@"-workingdirectory {0} -dd Test {1} -development -connectionstring ""{2}""", this.Convention.GetLocalPath(branch), branch.TeamProject,
strConnectionString));
}
示例9: FixupBranches
internal void FixupBranches(BlobBuilder srcBuilder, BlobBuilder dstBuilder)
{
int srcOffset = 0;
var branch = _branches[0];
int branchIndex = 0;
int blobOffset = 0;
foreach (Blob blob in srcBuilder.GetBlobs())
{
Debug.Assert(blobOffset == 0 || blobOffset == 1 && blob.Buffer[blobOffset - 1] == 0xff);
while (true)
{
// copy bytes preceding the next branch, or till the end of the blob:
int chunkSize = Math.Min(branch.ILOffset - srcOffset, blob.Length - blobOffset);
dstBuilder.WriteBytes(blob.Buffer, blobOffset, chunkSize);
srcOffset += chunkSize;
blobOffset += chunkSize;
// there is no branch left in the blob:
if (blobOffset == blob.Length)
{
blobOffset = 0;
break;
}
Debug.Assert(blob.Buffer[blobOffset] == branch.ShortOpCode && (blobOffset + 1 == blob.Length || blob.Buffer[blobOffset + 1] == 0xff));
srcOffset += sizeof(byte) + sizeof(sbyte);
// write actual branch instruction:
int branchDistance;
if (branch.IsShortBranchDistance(_labels, out branchDistance))
{
dstBuilder.WriteByte(branch.ShortOpCode);
dstBuilder.WriteSByte((sbyte)branchDistance);
}
else
{
dstBuilder.WriteByte((byte)((ILOpCode)branch.ShortOpCode).GetLongBranch());
dstBuilder.WriteInt32(branchDistance);
}
// next branch:
branchIndex++;
if (branchIndex == _branches.Count)
{
branch = new BranchInfo(int.MaxValue, default(LabelHandle), 0);
}
else
{
branch = _branches[branchIndex];
}
// the branch starts at the very end and its operand is in the next blob:
if (blobOffset == blob.Length - 1)
{
blobOffset = 1;
break;
}
// skip fake branch instruction:
blobOffset += sizeof(byte) + sizeof(sbyte);
}
}
}
示例10: StaticGetFullName
public static string StaticGetFullName(UnrealTargetPlatform InHostPlatform, BranchInfo.BranchUProject InGameProj, string InAggregateName)
{
return InGameProj.GameName + "_" + InAggregateName + StaticGetHostPlatformSuffix(InHostPlatform);
}
示例11: UATTestNode
public UATTestNode(GUBPBranchConfig BranchConfig, UnrealTargetPlatform InHostPlatform, BranchInfo.BranchUProject InGameProj, string InTestName, string InUATCommandLine, string InAgentSharingGroup, bool InDependsOnEditor = true, List<UnrealTargetPlatform> InDependsOnCooked = null, float InECPriority = 0.0f)
: base(InHostPlatform)
{
AgentSharingGroup = InAgentSharingGroup;
ECPriority = InECPriority;
GameProj = InGameProj;
TestName = InTestName;
UATCommandLine = InUATCommandLine;
bool bWillCook = InUATCommandLine.IndexOf("-cook") >= 0;
DependsOnEditor = InDependsOnEditor || bWillCook;
if (InDependsOnCooked != null)
{
DependsOnCooked = InDependsOnCooked;
}
else
{
DependsOnCooked = new List<UnrealTargetPlatform>();
}
if (DependsOnEditor)
{
AddDependency(EditorAndToolsNode.StaticGetFullName(HostPlatform));
if (GameProj.GameName != BranchConfig.Branch.BaseEngineProject.GameName)
{
if (GameProj.Properties.Targets.ContainsKey(TargetRules.TargetType.Editor))
{
AddDependency(EditorGameNode.StaticGetFullName(HostPlatform, GameProj));
}
}
}
foreach (var Plat in DependsOnCooked)
{
AddDependency(GamePlatformCookedAndCompiledNode.StaticGetFullName(HostPlatform, GameProj, Plat));
}
AddPseudodependency(WaitForTestShared.StaticGetFullName());
// If the same test fails for the base engine, don't bother trying
if (InGameProj.GameName != BranchConfig.Branch.BaseEngineProject.GameName)
{
if (BranchConfig.HasNode(UATTestNode.StaticGetFullName(HostPlatform, BranchConfig.Branch.BaseEngineProject, TestName)))
{
AddPseudodependency(UATTestNode.StaticGetFullName(HostPlatform, BranchConfig.Branch.BaseEngineProject, InTestName));
}
else
{
bool bFoundACook = false;
foreach (var Plat in DependsOnCooked)
{
var PlatTestName = "CookedGameTest_" + Plat.ToString();
if (BranchConfig.HasNode(UATTestNode.StaticGetFullName(HostPlatform, BranchConfig.Branch.BaseEngineProject, PlatTestName)))
{
AddPseudodependency(UATTestNode.StaticGetFullName(HostPlatform, BranchConfig.Branch.BaseEngineProject, PlatTestName));
bFoundACook = true;
}
}
if (!bFoundACook && BranchConfig.HasNode(UATTestNode.StaticGetFullName(HostPlatform, BranchConfig.Branch.BaseEngineProject, "EditorTest")))
{
AddPseudodependency(UATTestNode.StaticGetFullName(HostPlatform, BranchConfig.Branch.BaseEngineProject, "EditorTest"));
}
}
}
if (InGameProj.GameName == BranchConfig.Branch.BaseEngineProject.GameName)
{
ECPriority = ECPriority + 1.0f;
}
if (UATCommandLine.IndexOf("-RunAutomationTests", StringComparison.InvariantCultureIgnoreCase) >= 0)
{
ECPriority = ECPriority - 4.0f;
if (UATCommandLine.IndexOf("-EditorTest", StringComparison.InvariantCultureIgnoreCase) >= 0)
{
ECPriority = ECPriority - 4.0f;
}
}
else if (UATCommandLine.IndexOf("-EditorTest", StringComparison.InvariantCultureIgnoreCase) >= 0)
{
ECPriority = ECPriority + 2.0f;
}
}
示例12: FormalBuildTestNode
public FormalBuildTestNode(GUBP.GUBPBranchConfig InBranchConfig,
BranchInfo.BranchUProject InGameProj,
UnrealTargetPlatform InHostPlatform,
UnrealTargetPlatform InClientTargetPlatform,
UnrealTargetConfiguration InClientConfig
)
: base(InHostPlatform)
{
BranchConfig = InBranchConfig;
GameProj = InGameProj;
ClientTargetPlatform = InClientTargetPlatform;
ClientConfig = InClientConfig;
GameOrClient = TargetRules.TargetType.Game;
// verify we actually built these
var WorkingGameProject = InGameProj;
if (!WorkingGameProject.Properties.Targets.ContainsKey(TargetRules.TargetType.Editor))
{
// this is a codeless project, use the base project
WorkingGameProject = BranchConfig.Branch.BaseEngineProject;
}
if (!WorkingGameProject.Properties.Targets.ContainsKey(GameOrClient))
{
throw new AutomationException("Can't make a game build for {0} because it doesn't have a {1} target.", WorkingGameProject.GameName, GameOrClient.ToString());
}
if (!WorkingGameProject.Properties.Targets[GameOrClient].Rules.GUBP_GetPlatforms_MonolithicOnly(HostPlatform).Contains(ClientTargetPlatform))
{
throw new AutomationException("Can't make a game/client build for {0} because we didn't build platform {1}.", WorkingGameProject.GameName, ClientTargetPlatform.ToString());
}
if (!WorkingGameProject.Properties.Targets[GameOrClient].Rules.GUBP_GetConfigs_MonolithicOnly(HostPlatform, ClientTargetPlatform).Contains(ClientConfig))
{
throw new AutomationException("Can't make a game/client build for {0} because we didn't build platform {1} config {2}.", WorkingGameProject.GameName, ClientTargetPlatform.ToString(), ClientConfig.ToString());
}
AddDependency(FormalBuildNode.StaticGetFullName(GameProj, HostPlatform, new List<UnrealTargetPlatform>() { ClientTargetPlatform }, InClientConfigs: new List<UnrealTargetConfiguration>() { ClientConfig }, InClientNotGame: GameOrClient == TargetRules.TargetType.Client));
}
示例13: GetMonolithicPlatformsForUProject
public static List<UnrealTargetPlatform> GetMonolithicPlatformsForUProject(UnrealTargetPlatform HostPlatform, List<UnrealTargetPlatform> ActivePlatforms, BranchInfo.BranchUProject GameProj, bool bIncludeHostPlatform, bool bNoIOSOnPC)
{
UnrealTargetPlatform AltHostPlatform = GUBP.GetAltHostPlatform(HostPlatform);
var Result = new List<UnrealTargetPlatform>();
foreach (var Kind in BranchInfo.MonolithicKinds)
{
if (GameProj.Properties.Targets.ContainsKey(Kind))
{
var Target = GameProj.Properties.Targets[Kind];
var Platforms = Target.Rules.GUBP_GetPlatforms_MonolithicOnly(HostPlatform);
var AdditionalPlatforms = Target.Rules.GUBP_GetBuildOnlyPlatforms_MonolithicOnly(HostPlatform);
var AllPlatforms = Platforms.Union(AdditionalPlatforms);
foreach (var Plat in AllPlatforms)
{
if (bNoIOSOnPC && Plat == UnrealTargetPlatform.IOS && HostPlatform == UnrealTargetPlatform.Win64)
{
continue;
}
if (ActivePlatforms.Contains(Plat) && Target.Rules.SupportsPlatform(Plat) &&
((Plat != HostPlatform && Plat != AltHostPlatform) || bIncludeHostPlatform))
{
Result.Add(Plat);
}
}
}
}
return Result;
}
示例14: IsSample
public static bool IsSample(GUBPBranchConfig BranchConfig, BranchInfo.BranchUProject GameProj)
{
return (GameProj.GameName != BranchConfig.Branch.BaseEngineProject.GameName && (GameProj.FilePath.Contains("Samples") || GameProj.FilePath.Contains("Templates")));
}
示例15: GetArchiveDirectory
public static string GetArchiveDirectory(GUBP.GUBPBranchConfig BranchConfig, BranchInfo.BranchUProject InGameProj, UnrealTargetPlatform InHostPlatform, List<UnrealTargetPlatform> InClientTargetPlatforms = null, List<UnrealTargetConfiguration> InClientConfigs = null, List<UnrealTargetPlatform> InServerTargetPlatforms = null, List<UnrealTargetConfiguration> InServerConfigs = null, bool InClientNotGame = false)
{
string BaseDir = TempStorage.ResolveSharedBuildDirectory(InGameProj.GameName);
string NodeName = StaticGetFullName(InGameProj, InHostPlatform, InClientTargetPlatforms, InClientConfigs, InServerTargetPlatforms, InServerConfigs, InClientNotGame);
string Inner = P4Env.BuildRootEscaped + "-CL-" + P4Env.ChangelistString + BranchConfig.JobInfo.GetPreflightSuffix();
string ArchiveDirectory = CombinePaths(BaseDir, NodeName, Inner);
return ArchiveDirectory;
}