Skip to content

Commit

Permalink
Add ProjectName to FPlasticMakeWorkspace and combine project and repo…
Browse files Browse the repository at this point in the history
…sitory into the repository name for the CreateWorkspace Operation
  • Loading branch information
SRombautsU committed Oct 31, 2024
1 parent 3c1aba0 commit 7518118
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ class FPlasticMakeWorkspace final : public FSourceControlOperationBase

virtual FText GetInProgressString() const override;

FString WorkspaceName;
FString RepositoryName;
FString ServerUrl;
FString RepositoryName;
FString WorkspaceName;
bool bPartialWorkspace = false;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,16 @@ void FPlasticSourceControlWorkspaceCreation::MakeWorkspace(const FParameters& In
void FPlasticSourceControlWorkspaceCreation::LaunchMakeWorkspaceOperation()
{
TSharedRef<FPlasticMakeWorkspace, ESPMode::ThreadSafe> MakeWorkspaceOperation = ISourceControlOperation::Create<FPlasticMakeWorkspace>();
MakeWorkspaceOperation->WorkspaceName = WorkspaceParams.WorkspaceName.ToString();
MakeWorkspaceOperation->RepositoryName = WorkspaceParams.RepositoryName.ToString();
MakeWorkspaceOperation->ServerUrl = WorkspaceParams.ServerUrl.ToString();
if (!WorkspaceParams.ProjectName.IsEmpty())
{
MakeWorkspaceOperation->RepositoryName = FString::Printf(TEXT("%s/%s"), *WorkspaceParams.ProjectName.ToString(), *WorkspaceParams.RepositoryName.ToString());
}
else
{
MakeWorkspaceOperation->RepositoryName = WorkspaceParams.RepositoryName.ToString();
}
MakeWorkspaceOperation->WorkspaceName = WorkspaceParams.WorkspaceName.ToString();
MakeWorkspaceOperation->bPartialWorkspace = WorkspaceParams.bCreatePartialWorkspace;

FPlasticSourceControlProvider& Provider = FPlasticSourceControlModule::Get().GetProvider();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ class FPlasticSourceControlWorkspaceCreation
public:
struct FParameters
{
FText WorkspaceName;
FText RepositoryName;
FText ServerUrl;
FText ProjectName;
FText RepositoryName;
FText WorkspaceName;
bool bCreatePartialWorkspace = false;
bool bAutoInitialCommit = true;
FText InitialCommitMessage;
Expand Down

0 comments on commit 7518118

Please sign in to comment.