USourceControlHelpers

Editor source control common functionality.

Windows
MacOS
Linux

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.

@note 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

Name Description

Public function Static

TArray< FStr...

 

AbsoluteFilenames

(
    const TArray< FString >& InFileNam...
)

Helper function to convert a filename array to absolute paths.

Public function Static

bool

 

AnnotateFile

(
    ISourceControlProvider& InProvider,
    int32 InCheckInIdentifier,
    const FString& InFile,
    TArray< FAnnotationLine >& OutLine...
)

Helper function to annotate a file using a changelist/checkin identifier

Public function Static

bool

 

AnnotateFile

(
    ISourceControlProvider& InProvider,
    const FString& InLabel,
    const FString& InFile,
    TArray< FAnnotationLine >& OutLine...
)

Helper function to annotate a file using a label

Public function Static

bool

 

BranchPackage

(
    UPackage* DestPackage,
    UPackage* SourcePackage,
    EStateCacheUsage::Type StateCacheUs...
)

Helper function to branch/integrate packages from one location to another

Public function Static

bool

 

CheckInFile

(
    const FString& InFile,
    const FString& InDescription,
    bool bSilent
)

Use currently set source control provider to check in a file.

Public function Static

bool

 

CheckInFiles

(
    const TArray< FString >& InFiles,
    const FString& InDescription,
    bool bSilent
)

Use currently set source control provider to check in specified files.

Public function Static

bool

 

CheckOutFile

(
    const FString& InFile,
    bool bSilent
)

Use currently set source control provider to check out a file.

Public function Static

bool

 

CheckOutFiles

(
    const TArray< FString >& InFiles,
    bool bSilent
)

Use currently set source control provider to check out specified files.

Public function Static

bool

 

CheckOutOrAddFile

(
    const FString& InFile,
    bool bSilent
)

Use currently set source control provider to check out file or mark it for add.

Public function Static

bool

 

CheckOutOrAddFiles

(
    const TArray< FString >& InFiles,
    bool bSilent
)

Use currently set source control provider to check out files or mark them for add.

Public function Static

bool

 

CheckoutOrMarkForAdd

(
    const FString& InDestFile,
    const FText& InFileDescription,
    const FOnPostCheckOut& OnPostCheck...,
    FText& OutFailReason
)

Helper function perform an operation on files in our 'source controlled' directories, handling checkout/add etc.

Public function Static

bool

 

CopyFile

(
    const FString& InSourceFile,
    const FString& InDestFile,
    bool bSilent
)

Use currently set source control provider to copy a file. @note Blocks until action is complete.

Public function Static

bool

 

CopyFileUnderSourceControl

(
    const FString& InDestFile,
    const FString& InSourceFile,
    const FText& InFileDescription,
    FText& OutFailReason
)

Helper function to copy a file into our 'source controlled' directories, handling checkout/add etc.

Public function Static

FString

 

CurrentProvider()

Determine the name of the current source control provider.

Public function Static

const FStrin...

 

GetGlobalSettingsIni()

Helper function to get the ini filename for storing global source control settings

Public function Static

const FStrin...

 

GetSettingsIni()

Helper function to get the ini filename for storing source control settings

Public function 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)

Public function Static

bool

 

IsEnabled()

Determine if there is a source control system enabled

Public function Static

FText

 

LastErrorMsg()

Get status text set by SourceControl system if an error occurs regardless whether bSilent is set or not.

Public function Static

bool

 

MarkFileForAdd

(
    const FString& InFile,
    bool bSilent
)

Use currently set source control provider to mark a file for add.

Public function Static

bool

 

MarkFileForDelete

(
    const FString& InFile,
    bool bSilent
)

Use currently set source control provider to remove file from source control and delete the file.

Public function Static

bool

 

MarkFilesForAdd

(
    const TArray< FString >& InFiles,
    bool bSilent
)

Use currently set source control provider to mark files for add.

Public function Static

bool

 

MarkFilesForDelete

(
    const TArray< FString >& InFiles,
    bool bSilent
)

Use currently set source control provider to remove files from source control and delete the files.

Public function Static

FString

 

PackageFilename

(
    const FString& InPackageName
)

Helper function to get a filename for a package name.

Public function Static

FString

 

PackageFilename

(
    const UPackage* InPackage
)

Helper function to get a filename for a package.

Public function Static

TArray< FStr...

 

PackageFilenames

(
    const TArray< FString >& InPackage...
)

Helper function to convert package name array into a filename array.

Public function Static

TArray< FStr...

 

PackageFilenames

(
    const TArray< UPackage* >& In...
)

Helper function to convert package array into filename array.

Public function Static

FSourceContr...

 

QueryFileState

(
    const FString& InFile,
    bool bSilent
)

Use currently set source control provider to query a file's source control state.

Public function Static

bool

 

RevertFile

(
    const FString& InFile,
    bool bSilent
)

Use currently set source control provider to revert a file regardless whether any changes will be lost or not.

Public function Static

bool

 

RevertFiles

(
    const TArray< FString >& InFiles,
    bool bSilent
)

Use currently set source control provider to revert files regardless whether any changes will be lost or not.

Public function Static

bool

 

RevertUnchangedFile

(
    const FString& InFile,
    bool bSilent
)

Use currently set source control provider to revert a file provided no changes have been made.

Public function Static

bool

 

RevertUnchangedFiles

(
    const TArray< FString >& InFiles,
    bool bSilent
)

Use currently set source control provider to revert files provided no changes have been made.

Public function Static

void

 

RevertUnchangedFiles

(
    ISourceControlProvider& InProvider,
    const TArray< FString >& InFiles
)

Helper function to get a list of files that are unchanged & revert them.

Public function Static

bool

 

SyncFile

(
    const FString& InFile,
    bool bSilent
)

Use currently set source control provider to sync a file or directory to the head revision.

Public function Static

bool

 

SyncFiles

(
    const TArray< FString >& InFiles,
    bool bSilent
)

Use currently set source control provider to sync files or directories to the head revision.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss