Navigation
API > API/Developer > API/Developer/SourceControl
Editor source control common functionality.
Many of these source control methods use smart file strings which can be one of:
- fully qualified path
- relative path
- long package name
- asset path
- export text path (often stored on clipboard)
For example:
- D:\Epic\Dev-Ent\Projects\Python3rdBP\Content\Mannequin\Animations\ThirdPersonIdle.uasset
- Content\Mannequin\Animations\ThirdPersonIdle.uasset
- /Game/Mannequin/Animations/ThirdPersonIdle
- /Game/Mannequin/Animations/ThirdPersonIdle.ThirdPersonIdle
- AnimSequence'/Game/Mannequin/Animations/ThirdPersonIdle.ThirdPersonIdle'
| Name | USourceControlHelpers |
| Type | class |
| Header File | /Engine/Source/Developer/SourceControl/Public/SourceControlHelpers.h |
| Include Path | #include "SourceControlHelpers.h" |
Syntax
UCLASS (MinimalAPI, Abstract, Transient, Meta=(ScriptName="SourceControl"))
class USourceControlHelpers : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → USourceControlHelpers
Classes
| Name | Remarks |
|---|---|
| FQueryFileStateDelegate | Delegate to broadcast FileState upon AsyncQueryFileState completion. |
Functions
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Helper function to convert a filename array to absolute paths. | SourceControlHelpers.h | ||
static bool AnnotateFile
(
ISourceControlProvider& InProvider, |
Helper function to annotate a file using a changelist/checkin identifier | SourceControlHelpers.h | |
static bool AnnotateFile
(
ISourceControlProvider& InProvider, |
Helper function to annotate a file using a label | SourceControlHelpers.h | |
static bool ApplyOperationAndReloadPackages
(
const TArray< FString >& InPackagesToApplyOperation, |
Applies the provided function and optionally reloads the world | SourceControlHelpers.h | |
static void AsyncQueryFileState
(
FQueryFileStateDelegate FileStateCallback, |
Query the source control state of the specified file, asynchronously. | SourceControlHelpers.h |
|
static void AsyncQueryFileStates
(
FQueryFileStateDelegate FileStateCallback, |
SourceControlHelpers.h |
|
|
static bool BranchPackage
(
UPackage* DestPackage, |
Helper function to branch/integrate packages from one location to another maintaining a relationship between the files in source control (when possible) | SourceControlHelpers.h | |
| Use currently set source control provider to check in a file. Blocks until action is complete. | SourceControlHelpers.h |
|
|
static bool CheckInFiles
(
const TArray< FString >& InFiles, |
Use currently set source control provider to check in specified files. | SourceControlHelpers.h |
|
static bool CheckOutFile
(
const FString& InFile, |
Use currently set source control provider to check out a file. Blocks until action is complete. | SourceControlHelpers.h |
|
static bool CheckOutFiles
(
const TArray< FString >& InFiles, |
Use currently set source control provider to check out specified files. | SourceControlHelpers.h |
|
static bool CheckOutOrAddFile
(
const FString& InFile, |
Use currently set source control provider to check out file or mark it for add. | SourceControlHelpers.h |
|
static bool CheckOutOrAddFiles
(
const TArray< FString >& InFiles, |
Use currently set source control provider to check out files or mark them for add. | SourceControlHelpers.h |
|
static bool CheckoutOrMarkForAdd
(
const FString& InDestFile, |
Helper function perform an operation on files in our 'source controlled' directories, handling checkout/add etc. | SourceControlHelpers.h | |
| Use currently set source control provider to copy a file. Blocks until action is complete. | SourceControlHelpers.h |
|
|
static bool CopyFileUnderSourceControl
(
const FString& InDestFile, |
Helper function to copy a file into our 'source controlled' directories, handling checkout/add etc. | SourceControlHelpers.h | |
static bool CopyPackage
(
UPackage* DestPackage, |
Helper function to copy a package from one location to another | SourceControlHelpers.h | |
static FString CurrentProvider() |
Determine the name of the current source control provider. | SourceControlHelpers.h |
|
static bool GetAssetData
(
const FString& InFileName, |
Helper function to retrieve the FAssetData associated with a given file | SourceControlHelpers.h | |
static bool GetAssetData
(
const FString& InFileName, |
Helper function to retrieve the FAssetData associated with a given file | SourceControlHelpers.h | |
static bool GetAssetDataFromFileHistory
(
FSourceControlStatePtr InSourceControlState, |
Helper function to get the asset data from a file's history Note: will not query history to prevent recursion | SourceControlHelpers.h | |
static bool GetAssetDataFromFileHistory
(
const FString& InFileName, |
Helper function to get the asset data from a file's history Note: will not query history to prevent recursion | SourceControlHelpers.h | |
static bool GetAssetDataFromPackage
(
const FString& InPackageName, |
Helper function to retrieve the FAssetData associated with a given package name | SourceControlHelpers.h | |
static bool GetFilesInDepotAtPath
(
const FString& Path, |
Use currently set source control provider to query the list of files in the depot under a certain path. | SourceControlHelpers.h | |
static bool GetFilesInDepotAtPaths
(
const TArray< FString >& Paths, |
Use currently set source control provider to query the list of files in the depot under a list of paths. | SourceControlHelpers.h | |
static const FString & GetGlobalSettingsIni() |
Helper function to get the ini filename for storing global source control settings | SourceControlHelpers.h | |
static const FString & GetSettingsIni() |
Helper function to get the ini filename for storing source control settings | SourceControlHelpers.h | |
| Get the list of files and directories that source control should check when looking for changes. | SourceControlHelpers.h | ||
static bool IsAvailable() |
Quick check if currently set source control provider is enabled and available for use (server-based providers can use this to return whether the server is available or not) | SourceControlHelpers.h |
|
static bool IsEnabled() |
Determine if there is a source control system enabled | SourceControlHelpers.h |
|
static FText LastErrorMsg () |
Get status text set by SourceControl system if an error occurs regardless whether bSilent is set or not. | SourceControlHelpers.h |
|
| Find packages that can be reverted in Source Control locations | SourceControlHelpers.h | ||
static bool MarkFileForAdd
(
const FString& InFile, |
Use currently set source control provider to mark a file for add. | SourceControlHelpers.h |
|
static bool MarkFileForDelete
(
const FString& InFile, |
Use currently set source control provider to remove file from source control and delete the file. | SourceControlHelpers.h |
|
static bool MarkFilesForAdd
(
const TArray< FString >& InFiles, |
Use currently set source control provider to mark files for add. | SourceControlHelpers.h |
|
static bool MarkFilesForDelete
(
const TArray< FString >& InFiles, |
Use currently set source control provider to remove files from source control and delete the files. | SourceControlHelpers.h |
|
static FString PackageFilename
(
const UPackage* InPackage |
Helper function to get a filename for a package. | SourceControlHelpers.h | |
static FString PackageFilename
(
const FString& InPackageName |
Helper function to get a filename for a package name. | SourceControlHelpers.h | |
static TArray< FString > PackageFilenames
(
const TArray< UPackage* >& InPackages |
Helper function to convert package array into filename array. | SourceControlHelpers.h | |
static TArray< FString > PackageFilenames
(
const TArray< FString >& InPackageNames |
Helper function to convert package name array into a filename array. | SourceControlHelpers.h | |
static FSourceControlState QueryFileState
(
const FString& InFile, |
Use currently set source control provider to query a file's source control state. | SourceControlHelpers.h |
|
static TArray< FSourceControlState > QueryFileStates
(
TArray< FString > InFiles, |
SourceControlHelpers.h |
|
|
static bool RevertAllChangesAndReloadWorld() |
Reverts all changes and then reloads the world. | SourceControlHelpers.h | |
| Reverts the provided files then reloads packages. | SourceControlHelpers.h |
|
|
static bool RevertFile
(
const FString& InFile, |
Use currently set source control provider to revert a file regardless whether any changes will be lost or not. | SourceControlHelpers.h |
|
static bool RevertFiles
(
const TArray< FString >& InFiles, |
WITH_EDITOR. | SourceControlHelpers.h |
|
static bool RevertUnchangedFile
(
const FString& InFile, |
Use currently set source control provider to revert a file provided no changes have been made. | SourceControlHelpers.h |
|
static bool RevertUnchangedFiles
(
const TArray< FString >& InFiles, |
Use currently set source control provider to revert files provided no changes have been made. | SourceControlHelpers.h |
|
static void RevertUnchangedFiles
(
ISourceControlProvider& InProvider, |
Helper function to get a list of files that are unchanged & revert them. | SourceControlHelpers.h | |
| Use currently set source control provider to sync a file or directory to the head revision. | SourceControlHelpers.h |
|
|
| Use currently set source control provider to sync files or directories to the head revision. | SourceControlHelpers.h |
|