From 3588a98ff2ceb8783391fc9bc7e592f6134df755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Rombauts?= Date: Fri, 22 Nov 2024 18:04:40 +0100 Subject: [PATCH] Fix 'cm checkconnection' to never call it with a --server argument that creates issues with authentication Use instead the new 'cm checkconnection ' if the version of Plastic is recent enough. --- .../Private/PlasticSourceControlUtils.cpp | 5 ++++- .../Private/PlasticSourceControlVersions.h | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/PlasticSourceControl/Private/PlasticSourceControlUtils.cpp b/Source/PlasticSourceControl/Private/PlasticSourceControlUtils.cpp index 70f971cb..83910b16 100644 --- a/Source/PlasticSourceControl/Private/PlasticSourceControlUtils.cpp +++ b/Source/PlasticSourceControl/Private/PlasticSourceControlUtils.cpp @@ -354,7 +354,10 @@ bool RunCheckConnection(FString& OutWorkspaceSelector, FString& OutBranchName, F TArray Parameters; if (PlasticSourceControlUtils::GetWorkspaceInfo(OutWorkspaceSelector, OutBranchName, OutRepositoryName, OutServerUrl, OutErrorMessages)) { - Parameters.Add(FString::Printf(TEXT("--server=%s"), *OutServerUrl)); + if ((FPlasticSourceControlModule::Get().GetProvider().GetPlasticScmVersion() >= PlasticSourceControlVersions::CheckConnection)) + { + Parameters.Add(OutServerUrl); + } } return PlasticSourceControlUtils::RunCommand(TEXT("checkconnection"), Parameters, TArray(), OutInfoMessages, OutErrorMessages); } diff --git a/Source/PlasticSourceControl/Private/PlasticSourceControlVersions.h b/Source/PlasticSourceControl/Private/PlasticSourceControlVersions.h index c073378d..e6a41474 100644 --- a/Source/PlasticSourceControl/Private/PlasticSourceControlVersions.h +++ b/Source/PlasticSourceControl/Private/PlasticSourceControlVersions.h @@ -56,4 +56,8 @@ namespace PlasticSourceControlVersions // https://plasticscm.com/download/releasenotes/11.0.16.8445 (2024/02/22) static const FSoftwareVersion WorkingBranch(TEXT("11.0.16.8445")); + // 11.0.16.9055 checkconnection learned a new optional argument . + // https://plasticscm.com/download/releasenotes/11.0.16.9055 (2024/11/28) + static const FSoftwareVersion CheckConnection(TEXT("11.0.16.9055")); + } // namespace PlasticSourceControlVersions