Navigation
API > API/Developer > API/Developer/SourceControl
Interface to talking with source control providers.
| Name | ISourceControlProvider |
| Type | class |
| Header File | /Engine/Source/Developer/SourceControl/Public/ISourceControlProvider.h |
| Include Path | #include "ISourceControlProvider.h" |
Syntax
class ISourceControlProvider : public IModularFeature
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~ISourceControlProvider() |
Virtual destructor | ISourceControlProvider.h |
Structs
| Name | Remarks |
|---|---|
| FInitResult | The result info returned form calls to ISourceControlProvider::Init |
Enums
Public
| Name | Remarks |
|---|---|
| EInitFlags | Flags used when calling ISourceControlProvider::Init |
| EStatus | Key value for common source control provider statuses |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AllowsDiffAgainstDepot() |
Whether the provider allow a diff between a changed file and the depot | ISourceControlProvider.h | |
bool CanCancelOperation
(
const FSourceControlOperationRef& InOperation |
Check to see if we can cancel an operation. | ISourceControlProvider.h | |
void CancelOperation
(
const FSourceControlOperationRef& InOperation |
Attempt to cancel an operation in progress. | ISourceControlProvider.h | |
bool CanExecuteOperation
(
const FSourceControlOperationRef& InOperation |
Check to see if we can execute an operation. | ISourceControlProvider.h | |
void Close() |
Shut down source control provider. | ISourceControlProvider.h | |
virtual ECommandResult::Type Execute
(
const FSourceControlOperationRef& InOperation, |
Helper overload for operation execution, see Execute(). | ISourceControlProvider.h | |
virtual ECommandResult::Type Execute
(
const FSourceControlOperationRef& InOperation, |
Helper overload for operation execution, see Execute(). | ISourceControlProvider.h | |
ECommandResult::Type Execute
(
const FSourceControlOperationRef& InOperation, |
Attempt to execute an operation on the passed-in files (if any are required). | ISourceControlProvider.h | |
virtual ECommandResult::Type Execute
(
const FSourceControlOperationRef& InOperation, |
Helper overload for operation execution, see Execute(). | ISourceControlProvider.h | |
virtual ECommandResult::Type Execute
(
const FSourceControlOperationRef& InOperation, |
Helper overload for operation execution, see Execute(). | ISourceControlProvider.h | |
virtual ECommandResult::Type Execute
(
const FSourceControlOperationRef& InOperation, |
Helper overload for operation execution, see Execute(). | ISourceControlProvider.h | |
virtual ECommandResult::Type Execute
(
const FSourceControlOperationRef& InOperation, |
Helper overload for operation execution, see Execute(). | ISourceControlProvider.h | |
TArray< FSourceControlStateRef > GetCachedStateByPredicate
(
TFunctionRef< bool(const FSourceControlStateRef&)> Predicate |
Get all cached source control state objects for which the supplied predicate returns true | ISourceControlProvider.h | |
TArray< FSourceControlChangelistRef > GetChangelists
(
EStateCacheUsage::Type InStateCacheUsage |
Returns the list of available changelists if the underlying source control supports the 'changelist' concept. | ISourceControlProvider.h | |
virtual TSharedPtr< class ISourceControlLabel > GetLabel
(
const FString& InLabelName |
Get a label matching the passed-in name. | ISourceControlProvider.h | |
TArray< TSharedRef< class ISourceControlLabel > > GetLabels
(
const FString& InMatchingSpec |
Get an array of labels matching the passed-in spec. | ISourceControlProvider.h | |
const FName & GetName() |
Get the source control provider name | ISourceControlProvider.h | |
TOptional< int > GetNumLocalChanges() |
Returns the number of changes in the local workspace NOTE: This concept is currently only implemented for the Skein source control provider. | ISourceControlProvider.h | |
virtual ECommandResult::Type GetState
(
const TArray< UPackage* >& InPackages, |
Helper overload for state retrieval, see GetState(). | ISourceControlProvider.h | |
virtual FSourceControlChangelistStatePtr GetState
(
const FSourceControlChangelistRef& InChangelist, |
Helper overload for state retrieval, see GetState(). | ISourceControlProvider.h | |
ECommandResult::Type GetState
(
const TArray< FString >& InFiles, |
Get the state of each of the passed-in files. | ISourceControlProvider.h | |
ECommandResult::Type GetState
(
const TArray< FSourceControlChangelistRef >& InChangelists, |
Get the state of each of the passed-in changelists. | ISourceControlProvider.h | |
virtual FSourceControlStatePtr GetState
(
const UPackage* InPackage, |
Helper overload for state retrieval, see GetState(). | ISourceControlProvider.h | |
virtual FSourceControlStatePtr GetState
(
const FString& InFile, |
Helper overload for state retrieval, see GetState(). | ISourceControlProvider.h | |
bool GetStateBranchAtIndex
(
int32 BranchIndex, |
Gets the name of the state branch at the given index, higher index branches are generally closer to releases | ISourceControlProvider.h | |
int32 GetStateBranchIndex
(
const FString& BranchName |
Gets the state index of the specified branch, higher index branches are generally closer to releases | ISourceControlProvider.h | |
| Get the source control status as a series of key value pairs | ISourceControlProvider.h | ||
FText GetStatusText() |
Get the source control status as plain, human-readable text | ISourceControlProvider.h | |
virtual FInitResult Init
(
EInitFlags Flags |
Initialize source control provider. | ISourceControlProvider.h | |
void Init
(
bool bForceConnection |
Initialize source control provider. | ISourceControlProvider.h | |
TOptional< bool > IsAtLatestRevision () |
Whether the current source control client is at the latest version | ISourceControlProvider.h | |
bool IsAvailable() |
Quick check if source control is available for use (server-based providers can use this to return whether the server is available or not) | ISourceControlProvider.h | |
bool IsEnabled () |
Quick check if source control is enabled. | ISourceControlProvider.h | |
virtual ECommandResult::Type Login
(
const FString& InPassword, |
Login to the source control server (if any). This is just a wrapper around Execute(). | ISourceControlProvider.h | |
TSharedRef< class SWidget > MakeSettingsWidget() |
Create a settings widget for display in the login window. | ISourceControlProvider.h | |
| Queries branch configuration from source control | ISourceControlProvider.h | ||
FDelegateHandle RegisterSourceControlStateChanged_Handle
(
const FSourceControlStateChanged::FDelegate& SourceControlStateChanged |
Register a delegate to be called when source control state(s) change | ISourceControlProvider.h | |
void RegisterStateBranches
(
const TArray< FString >& BranchNames, |
Register branches to query for state in addition to the current branch | ISourceControlProvider.h | |
virtual void RegisterStateBranches
(
const TArray< FString >& BranchNames, |
Register branches to query for state in addition to the current branch | ISourceControlProvider.h | |
virtual ECommandResult::Type SwitchWorkspace
(
FStringView NewWorkspaceName, |
Used to switch the provider from one workspace to another. | ISourceControlProvider.h | |
void Tick() |
Called every update. | ISourceControlProvider.h | |
bool TryToDownloadFileFromBackgroundThread
(
const TSharedRef< class FDownloadFile >& InOperation, |
Executes the FDownloadFile operation, but unlike the Execute method this can be called from a background thread, this works because FDownloadFile is thread safe and it does not change the state of source control. | ISourceControlProvider.h | |
virtual bool TryToDownloadFileFromBackgroundThread
(
const TSharedRef< class FDownloadFile >& InOperation, |
Executes the FDownloadFile operation, but unlike the Execute method this can be called from a background thread, this works because FDownloadFile is thread safe and it does not change the state of source control. | ISourceControlProvider.h | |
void UnregisterSourceControlStateChanged_Handle
(
FDelegateHandle Handle |
Unregister a delegate to be called when source control state(s) change | ISourceControlProvider.h | |
bool UsesChangelists() |
Whether the provider uses changelists to identify commits/revisions | ISourceControlProvider.h | |
bool UsesCheckout() |
Whether the provider uses the checkout workflow | ISourceControlProvider.h | |
bool UsesFileRevisions() |
Whether the provider uses individual file revisions | ISourceControlProvider.h | |
bool UsesLocalReadOnlyState() |
Whether the provider uses local read-only state to signal whether a file is editable. | ISourceControlProvider.h | |
bool UsesSnapshots() |
Whether the provider uses snapshots | ISourceControlProvider.h | |
bool UsesUncontrolledChangelists() |
Whether the provider supports uncontrolled changelists to allow work offline | ISourceControlProvider.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TUniquePtr< ISourceControlProvider > Create
(
const FStringView& OwnerName, |
Creates a new instance of the source control provider type. | ISourceControlProvider.h |