Files
UnrealEngineUWP/Engine/Source/Programs/BuildAgent/Workspace/SyncMode.cs
Ryan Durand 9ef3748747 Updating copyrights for Engine Programs.
#rnx
#rb none
#jira none

#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869242 in //Fortnite/Release-12.00/... via CL 10869536
#ROBOMERGE-BOT: FORTNITE (Main -> Dev-EngineMerge) (v613-10869866)

[CL 10870955 by Ryan Durand in Main branch]
2019-12-26 23:01:54 -05:00

50 lines
1.6 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using BuildAgent.Workspace.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tools.DotNETCommon;
namespace BuildAgent.Workspace
{
[ProgramMode("Sync", "Syncs the files for a particular stream and changelist")]
class SyncMode : WorkspaceMode
{
[CommandLine("-Client=", Required = true)]
[Description("Name of the client to sync. Will be created if it does not exist.")]
public string ClientName = null;
[CommandLine("-Stream=", Required = true)]
[Description("The stream to sync")]
public string StreamName = null;
[CommandLine("-Change=")]
[Description("The change to sync. May be a changelist number, or 'Latest'")]
public string Change = "Latest";
[CommandLine]
[Description("Optional path to a cache file used to store workspace metadata. Using a location on a network share allows multiple machines syncing the same CL to only query Perforce state once.")]
FileReference CacheFile = null;
[CommandLine("-Filter=")]
[Description("Filters for the files to sync, in P4 syntax (eg. /Engine/...)")]
public List<string> Filters = new List<string>();
[CommandLine("-FakeSync")]
[Description("Simulates the sync without actually fetching any files")]
public bool bFakeSync = false;
protected override void Execute(Repository Repo)
{
int ChangeNumber = ParseChangeNumberOrLatest(Change);
List<string> ExpandedFilters = ExpandFilters(Filters);
Repo.Sync(ClientName, StreamName, ChangeNumber, ExpandedFilters, bFakeSync, CacheFile);
}
}
}