2020-09-01 08:38:42 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
#include "UObject/ObjectMacros.h"
|
|
|
|
|
#include "SourceControlHelpers.h"
|
|
|
|
|
|
2020-09-14 13:54:21 -04:00
|
|
|
class UNREALED_API FPackageSourceControlHelper
|
2020-09-01 08:38:42 -04:00
|
|
|
{
|
|
|
|
|
public:
|
2020-09-11 08:14:37 -04:00
|
|
|
bool UseSourceControl() const;
|
2020-09-01 08:38:42 -04:00
|
|
|
bool Delete(const FString& PackageName) const;
|
2022-02-18 13:23:27 -05:00
|
|
|
bool Delete(const TArray<FString>& PackageNames, bool bErrorsAsWarnings = false) const;
|
2020-09-01 08:38:42 -04:00
|
|
|
bool Delete(UPackage* Package) const;
|
2020-09-11 08:14:37 -04:00
|
|
|
bool Delete(const TArray<UPackage*>& Packages) const;
|
2020-09-01 08:38:42 -04:00
|
|
|
bool AddToSourceControl(UPackage* Package) const;
|
2022-02-18 13:23:27 -05:00
|
|
|
bool AddToSourceControl(const TArray<FString>& PackageNames, bool bErrorsAsWarnings = false) const;
|
2020-09-01 08:38:42 -04:00
|
|
|
bool Checkout(UPackage* Package) const;
|
2022-02-18 13:23:27 -05:00
|
|
|
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;
|
2020-09-01 08:38:42 -04:00
|
|
|
private:
|
2020-09-11 08:14:37 -04:00
|
|
|
ISourceControlProvider& GetSourceControlProvider() const;
|
|
|
|
|
FScopedSourceControl SourceControl;
|
2020-09-01 08:38:42 -04:00
|
|
|
};
|