Files
UnrealEngineUWP/Engine/Source/Editor/UnrealEd/Public/PackageSourceControlHelper.h
Patrick Enfedaque 6b7399fa24 PackageSourceControlHelper: Add optional bErrorsAsWarnings param to AddToSourceContro/Checkout/Delete operations (defaults to false)
WorldPartitionHelpers: Add optional callback when releasing ActorReferences to allow caller to batch operations
WorldPartitionBuilder: Add SavePackages/DeletePackages statics that can be used by the different Builders (takes care of the SCC batching)
WorldPartitionRenameDuplicateBuilder & WorldPartitionResaveActorsBuilder use the new new SavePackages/DeletePackages

#jira UE-142940

#rb richard.malo, sebastien.lussier
#preflight 620f9de5a96c65b0d81997e9
#rnx

[CL 19052770 by Patrick Enfedaque in ue5-main branch]
2022-02-18 13:23:27 -05:00

26 lines
1.0 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "SourceControlHelpers.h"
class UNREALED_API FPackageSourceControlHelper
{
public:
bool UseSourceControl() const;
bool Delete(const FString& PackageName) const;
bool Delete(const TArray<FString>& PackageNames, bool bErrorsAsWarnings = false) const;
bool Delete(UPackage* Package) const;
bool Delete(const TArray<UPackage*>& Packages) const;
bool AddToSourceControl(UPackage* Package) const;
bool AddToSourceControl(const TArray<FString>& PackageNames, bool bErrorsAsWarnings = false) const;
bool Checkout(UPackage* Package) const;
bool Checkout(const TArray<FString>& PackageNames, bool bErrorsAsWarnings = false) const;
bool GetDesiredStatesForModification(const TArray<FString>& PackageNames, TArray<FString>& OutPackagesToCheckout, TArray<FString>& OutPackagesToAdd, bool bErrorsAsWarnings = false) const;
private:
ISourceControlProvider& GetSourceControlProvider() const;
FScopedSourceControl SourceControl;
};