Navigation
API > API/Developer > API/Developer/SourceControl
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- USourceControlHelpers
References
| Module | SourceControl |
| Header | /Engine/Source/Developer/SourceControl/Public/SourceControlHelpers.h |
| Include | #include "SourceControlHelpers.h" |
Syntax
class USourceControlHelpers : public UObject
Remarks
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:-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'
Functions
| Type | Name | Description | |
|---|---|---|---|
| TArray< FString > | AbsoluteFilenames
(
const TArray< FString >& InFileNames |
Helper function to convert a filename array to absolute paths. | |
| bool | AnnotateFile
(
ISourceControlProvider& InProvider, |
Helper function to annotate a file using a changelist/checkin identifier | |
| bool | AnnotateFile
(
ISourceControlProvider& InProvider, |
Helper function to annotate a file using a label | |
| bool | ApplyOperationAndReloadPackages
(
const TArray< FString >& InPackagesToApplyOperation, |
Applies the provided function and optionally reloads the world | |
| void | AsyncQueryFileState
(
FQueryFileStateDelegate FileStateCallback, |
Query the source control state of the specified file, asynchronously. | |
| 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) | |
| bool | CheckInFile
(
const FString& InFile, |
Use currently set source control provider to check in a file. Blocks until action is complete. | |
| bool | CheckInFiles
(
const TArray< FString >& InFiles, |
Use currently set source control provider to check in specified files. | |
| bool | CheckOutFile
(
const FString& InFile, |
Use currently set source control provider to check out a file. Blocks until action is complete. | |
| bool | CheckOutFiles
(
const TArray< FString >& InFiles, |
Use currently set source control provider to check out specified files. | |
| bool | CheckOutOrAddFile
(
const FString& InFile, |
Use currently set source control provider to check out file or mark it for add. | |
| bool | CheckOutOrAddFiles
(
const TArray< FString >& InFiles, |
Use currently set source control provider to check out files or mark them for add. | |
| bool | CheckoutOrMarkForAdd
(
const FString& InDestFile, |
Helper function perform an operation on files in our 'source controlled' directories, handling checkout/add etc. | |
| bool | Use currently set source control provider to copy a file. Blocks until action is complete. | ||
| bool | CopyFileUnderSourceControl
(
const FString& InDestFile, |
Helper function to copy a file into our 'source controlled' directories, handling checkout/add etc. | |
| bool | CopyPackage
(
UPackage* DestPackage, |
Helper function to copy a package from one location to another | |
| FString | Determine the name of the current source control provider. | ||
| bool | GetAssetData
(
const FString& InFileName, |
Helper function to retrieve the FAssetData associated with a given file | |
| bool | GetAssetData
(
const FString& InFileName, |
Helper function to retrieve the FAssetData associated with a given file | |
| bool | GetAssetDataFromFileHistory
(
FSourceControlStatePtr InSourceControlState, |
Helper function to get the asset data from a file's history Note: will not query history to prevent recursion | |
| 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 | |
| bool | GetAssetDataFromPackage
(
const FString& InPackageName, |
Helper function to retrieve the FAssetData associated with a given package name | |
| bool | GetFilesInDepotAtPath
(
const FString& PathToDirectory, |
Use currently set source control provider to query the list of files in the depot under a certain path. | |
| const FString & | Helper function to get the ini filename for storing global source control settings | ||
| const FString & | Helper function to get the ini filename for storing source control settings | ||
| TArray< FString > | GetSourceControlLocations
(
const bool bContentOnly |
Get the list of files and directories that source control should check when looking for changes. | |
| 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) | |
| bool | IsEnabled () |
Determine if there is a source control system enabled | |
| FText | LastErrorMsg () |
Get status text set by SourceControl system if an error occurs regardless whether bSilent is set or not. | |
| bool | ListRevertablePackages
(
TArray< FString >& OutRevertablePackageNames |
Find packages that can be reverted in Source Control locations | |
| bool | MarkFileForAdd
(
const FString& InFile, |
Use currently set source control provider to mark a file for add. | |
| bool | MarkFileForDelete
(
const FString& InFile, |
Use currently set source control provider to remove file from source control and delete the file. | |
| bool | MarkFilesForAdd
(
const TArray< FString >& InFiles, |
Use currently set source control provider to mark files for add. | |
| bool | MarkFilesForDelete
(
const TArray< FString >& InFiles, |
Use currently set source control provider to remove files from source control and delete the files. | |
| FString | PackageFilename
(
const UPackage* InPackage |
Helper function to get a filename for a package. | |
| FString | PackageFilename
(
const FString& InPackageName |
Helper function to get a filename for a package name. | |
| TArray< FString > | PackageFilenames
(
const TArray< UPackage* >& InPackages |
Helper function to convert package array into filename array. | |
| TArray< FString > | PackageFilenames
(
const TArray< FString >& InPackageNames |
Helper function to convert package name array into a filename array. | |
| FSourceControlState | QueryFileState
(
const FString& InFile, |
Use currently set source control provider to query a file's source control state. | |
| bool | Reverts all changes and then reloads the world. | ||
| bool | RevertAndReloadPackages
(
const TArray< FString >& InPackagesToRevert, |
Reverts the provided files then reloads packages. | |
| bool | RevertFile
(
const FString& InFile, |
Use currently set source control provider to revert a file regardless whether any changes will be lost or not. | |
| bool | RevertFiles
(
const TArray< FString >& InFiles, |
WITH_EDITOR. | |
| bool | RevertUnchangedFile
(
const FString& InFile, |
Use currently set source control provider to revert a file provided no changes have been made. | |
| bool | RevertUnchangedFiles
(
const TArray< FString >& InFiles, |
Use currently set source control provider to revert files provided no changes have been made. | |
| void | RevertUnchangedFiles
(
ISourceControlProvider& InProvider, |
Helper function to get a list of files that are unchanged & revert them. | |
| bool | Use currently set source control provider to sync a file or directory to the head revision. | ||
| bool | Use currently set source control provider to sync files or directories to the head revision. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FQueryFileStateDelegate | Delegate to broadcast FileState upon AsyncQueryFileState completion. |