Files
UnrealEngineUWP/Engine/Source/Developer/SourceControl/Public/SourceControlHelpers.h
Bob Tellez b51555abf7 Copying //UE4/Fortnite-Staging to //UE4/Main
#lockdown nick.penwarden

==========================
MAJOR FEATURES + CHANGES
==========================

Change 2806454 on 2015/12/16 by Bob.Tellez

	#UE4 Getting crash reporting working again on linux servers. Since -Unattended is now being passed BEFORE the target folder, the cmd line parsing code was failing so now it parses tokens and switches in a more general way. Also, diagnostics.txt had the incorrect case, since the d is supposed to be capitolized and the crash report processor is case sensitive.

	#rb Ben.Zeigler

	#codereview Dmitry.Rekman

Change 2805502 on 2015/12/16 by Ben.Zeigler

	#UE4 Move ValidateEnumProperties into ValidateGeneratedClass, it was happening too early in the generation process so was being called at an invalid time.
	As a result of this ValidateEnumProperties will not be called correctly for compile on load blueprints, that issue is covered in UE-24569
	#codereview mike.beach, bob.tellez

Change 2805288 on 2015/12/16 by David.Nikdel

	#HTTP #HttpRetry
	- Add new Failed_ConnectionError code to EHttpRequestStatus to distinguish between connection errors and protocol errors.
	- Changed HTTP retry logic a little bit
	  * If a response was received, retry on service-specific explicit HTTP codes (defaults to empty)
	  * If a response was not received and we did not send a full request, automatically retry
	  * If a response was not received and a request may have been sent, retry if the verb is GET or HEAD (should be idempotent)
	- Adjusted Curl/IOS/Mac/PS4/WinInet to try and distinguish Failed_ConnectionError where possible
	  * Other systems will default to Failed which is ok (ConnectionError is an opportunistic categorization)
	  * Opened a PS4 ticket to try to improve detection, but unfortunately there's no way (currently) to distinguish between send timeout, connection timeout, and receive timeout, the latter being the problematic case.
	- Removed the concept of global/default HTTP retry status codes. No system has enough knowledge to set those globally.
	  * Individual requests still specify explicit "retryable" codes and McpServiceBase sets that on each request on a per-service basis
	#RB: Sam.Zamani
	#CodeReview: Sam.Zamani, Josh.Markiewicz, Alex.Fennell, Dmitry.Rekman, Sam.Spiro
	#Fixes: FORT-17804

Change 2803864 on 2015/12/15 by Bob.Tellez

	#UE4 Changed usage of !UE_SERVER to !IsRunningDedicatedServer in cases where we are preventing load attempts on UFonts. This is so running an editor build with -server works the same as running a cooked server.

	#rb Dmitry.Rekman

	#codereview Nick.Darnell

Change 2803677 on 2015/12/15 by Billy.Bramer

	- Expose equality and inequality operators for gameplay attributes

	#rb Todd.Eckert

Change 2802881 on 2015/12/14 by Bob.Tellez

	#UE4 InheritableComponentHandler no longer keeps records for components that we are no longer inheriting.

	#rb Phillip.Kavan, Maciej.Mroz

	#codereview Phillip.Kavan, Maciej.Mroz

Change 2801636 on 2015/12/14 by Bob.Tellez

	#UE4 Returning package insert order for non-imports back to being after those of matching priorities unconditionally since this is what you want even when you are not using the asset registry to preload packages.

	#codereview Graeme.Thornton

Change 2800400 on 2015/12/11 by Jonathan.Lindquist

	Submitting a new Pivot Painter Edition
	- now renders to textures
	- improved workflow
	- greater capabilities

Change 2799579 on 2015/12/11 by John.Abercrombie

	[AUTOMERGE]

	Fixed EQS BP query wrappers getting GCed before wrapped query finishes #UE4

	Fixes FORT-18649 - Patrols don't spawn consistently
	- The patrol blueprint was waiting (endlessly) for an EQS query to finish but because the wrapper could be GC-ed while the EQS query was running the delegate would never fire

	#rb me (this code was written by MieszkoZ)
	(removed code review for integration of Mieszko.Zielinski, Phil.Cole, Dominic.Barile)

	--------
	Integrated using branch UE4-Fortnite-To-UE4-FortniteReleases/0.10 (reversed) of change#2799575 by John.Abercrombie on 2015/12/11 09:55:11.

Change 2799018 on 2015/12/10 by Bob.Tellez

	#UE4 The asset registry tags stripped from cooked builds is now a blacklist by default that includes only the FiB tag. You can opt-in to using the whitelist by flipping the bUseAssetRegistryTagsWhitelistInsteadOfBlacklist flag.

	#rb Fred.Kimberley

	#codereview Peter.Knepley

Change 2798926 on 2015/12/10 by Bob.Tellez

	#UE4 Removed some showflags from the list of "Fixed" showflags since they were actually in use at runtime in Fortnite in a scene capture.

	#jira FORT-18514

	#codereview Martin.Mittring

Change 2797758 on 2015/12/10 by Mark.Satterthwaite

	Defer calls to AUGraphUpdate into FCoreAudioDevice::UpdateHardware - this call will synchronise the calling thread with the CoreAudio thread/run-loop so that the CoreAudio graph is safe to modify and this may incur a significant stall. This means it is far more efficient to amortise the cost of all changes to the graph with a single call. To ensure correctness the audio format conversion components are cached and disposed of after the call to AUGraphUpdate so that any existing operations on the CoreAudio thread are completed prior to disposal.

Change 2781204 on 2015/11/25 by Dmitry.Rekman

	Linux: use jemalloc by default if available.

	- Alleviates one of the reasons for player disconnect (FORT-18048), which was machines running OOM.

	#rb Bob.Tellez
	#codereview Bob.Tellez, Ben.Zeigler

Change 2779398 on 2015/11/24 by Mark.Satterthwaite

	Switch the default graphics API on Mac back to OpenGL, but allow Metal to run with -metal (or -metalsm5 for experimental SM5 support).
2016-01-08 19:10:43 -05:00

153 lines
6.2 KiB
C++

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "ISourceControlRevision.h"
class ISourceControlProvider;
class ISourceControlState;
/**
* Delegate used for performing operation on files that may need a checkout, but before they are added to source control
* @param InDestFile The filename that was potentially checked out
* @param InFileDescription Description of the file to display to the user, e.g. "Text" or "Image"
* @param OutFailReason Text describing why the operation failed
* @return true if the operation was successful
*/
DECLARE_DELEGATE_RetVal_ThreeParams(bool, FOnPostCheckOut, const FString& /*InDestFile*/, const FText& /*InFileDescription*/, FText& /*OutFailReason*/);
namespace SourceControlHelpers
{
/**
* Helper function to get the ini filename for storing source control settings
* @return the filename
*/
SOURCECONTROL_API extern const FString& GetSettingsIni();
/**
* Helper function to get the ini filename for storing global source control settings
* @return the filename
*/
SOURCECONTROL_API extern const FString& GetGlobalSettingsIni();
/**
* Helper function to get a filename for a package name.
* @param InPackageName The package name to get the filename for
* @return the filename
*/
SOURCECONTROL_API extern FString PackageFilename( const FString& InPackageName );
/**
* Helper function to get a filename for a package.
* @param InPackage The package to get the filename for
* @return the filename
*/
SOURCECONTROL_API extern FString PackageFilename( const UPackage* InPackage );
/**
* Helper function to convert package array into filename array.
* @param InPackages The package array
* @return an array of filenames
*/
SOURCECONTROL_API extern TArray<FString> PackageFilenames( const TArray<UPackage*>& InPackages );
/**
* Helper function to convert package name array into a filename array.
* @param InPackageNames The package name array
* @return an array of filenames
*/
SOURCECONTROL_API extern TArray<FString> PackageFilenames( const TArray<FString>& InPackageNames );
/**
* Helper function to convert a filename array to absolute paths.
* @param InFileNames The filename array
* @return an array of filenames, transformed into absolute paths
*/
SOURCECONTROL_API extern TArray<FString> AbsoluteFilenames( const TArray<FString>& InFileNames );
/**
* Helper function to get a list of files that are unchanged & revert them. This runs synchronous commands.
* @param InProvider The provider to use
* @param InFiles The files to operate on
*/
SOURCECONTROL_API extern void RevertUnchangedFiles( ISourceControlProvider& InProvider, const TArray<FString>& InFiles );
/**
* Helper function to annotate a file using a label
* @param InProvider The provider to use
* @param InLabel The label to use to retrieve the file
* @param InFile The file to annotate
* @param OutLines Output array of annotated lines
* @returns true if successful
*/
SOURCECONTROL_API extern bool AnnotateFile( ISourceControlProvider& InProvider, const FString& InLabel, const FString& InFile, TArray<FAnnotationLine>& OutLines );
/**
* Helper function to annotate a file using a changelist/checkin identifier
* @param InProvider The provider to use
* @param InCheckInIdentifier The changelist/check identifier to use to retrieve the file
* @param InFile The file to annotate
* @param OutLines Output array of annotated lines
* @returns true if successful
*/
SOURCECONTROL_API extern bool AnnotateFile( ISourceControlProvider& InProvider, int32 InCheckInIdentifier, const FString& InFile, TArray<FAnnotationLine>& OutLines );
/**
* Helper function to check out a file
* @param InFile The file path to check in
* @return Success or failure of the checkout operation
*/
SOURCECONTROL_API extern bool CheckOutFile( const FString& InFile );
/**
* Helper function to mark a file for add. Does nothing (and returns true) if the file is already under SC
* @param InFile The file path to check in
* @return Success or failure of the mark for add operation
*/
SOURCECONTROL_API extern bool MarkFileForAdd( const FString& InFile );
/**
* Helper function perform an operation on files in our 'source controlled' directories, handling checkout/add etc.
* @param InDestFile The path to the destination file
* @param InFileDescription Description of the file to display to the user, e.g. "Text" or "Image"
* @param OnPostCheckOut Delegate used for performing operation on files that may need a checkout, but before they are added to source control
* @param OutFailReason Text describing why the operation failed
* @return Success or failure of the operation
*/
SOURCECONTROL_API extern bool CheckoutOrMarkForAdd( const FString& InDestFile, const FText& InFileDescription, const FOnPostCheckOut& OnPostCheckOut, FText& OutFailReason );
/**
* Helper function to copy a file into our 'source controlled' directories, handling checkout/add etc.
* @param InDestFile The path to the destination file
* @param InSourceFile The path to the source file
* @param InFileDescription Description of the file to display to the user, e.g. "Text" or "Image"
* @param OutFailReason Text describing why the operation failed
* @return Success or failure of the operation
*/
SOURCECONTROL_API extern bool CopyFileUnderSourceControl( const FString& InDestFile, const FString& InSourceFile, const FText& InFileDescription, FText& OutFailReason );
/**
* Helper function to branch/integrate packages from one location to another
* @param DestPackage The destination package
* @param SourcePackage The source package
* @return true if the file packages were successfully branched.
*/
SOURCECONTROL_API extern bool BranchPackage( UPackage* DestPackage, UPackage* SourcePackage );
}
/**
* Helper class that ensures FSourceControl is properly initialized and shutdown by calling Init/Close in
* its constructor/destructor respectively.
*/
class SOURCECONTROL_API FScopedSourceControl
{
public:
/** Constructor; Initializes Source Control Provider */
FScopedSourceControl();
/** Destructor; Closes Source Control Provider */
~FScopedSourceControl();
/** Get the provider we are using */
ISourceControlProvider& GetProvider();
};