Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix connection at init for commandlets #29

Merged
merged 4 commits into from
May 13, 2022
Merged

Fix connection at init for commandlets #29

merged 4 commits into from
May 13, 2022

Conversation

SRombautsU
Copy link

When the Editor run a Commandlet from the command line, it does trigger a ISourceControlProvider::Login() so there is no "Connect" operation and the Plastic SCM plugin doesn't check the connectivity to the server

The plugin is fully functional, but it will report otherwise in PlasticSourceControlProvider::IsAvaillable() returning false

This will fail all methods of USourceControlHelpers like CheckOutOrAddFile() that will stop at SourceControlHelpersInternal::VerifySourceControl()

Fix FPlasticSourceControlProvider::Init() to respect bForceConnection, executing a 'checkconnection' command to set bServerAvailable based on the connectivity of the server

…ntract

Specifically, it returns true if a source control provider is set (regardless of whether the provider is available) and false if no provider is set. So all providers except the stub DefaultSourceProvider will return true.
Execute a 'checkconnection' command to set bServerAvailable based on the connectivity of the server
@SRombautsU
Copy link
Author

Running a ResaveDirtyPackage test commandlet added to our development project

Before:

.\Tools\SaveDirtyPackagesCommandlet.bat
[2022.05.12-14.36.26:348][  0]LogInit: Display: Warning/Error Summary (Unique only)
[2022.05.12-14.36.26:348][  0]LogInit: Display: -----------------------------------
[2022.05.12-14.36.26:348][  0]LogInit: Display: SourceControl: Error: Source control server is currently not available.
[2022.05.12-14.36.26:348][  0]LogInit: Display: LogSaveDirtyPackagesCommandlet: Error: Cannot checkout C:/Workspace/UE5PlasticPluginDev/Content/Characters/Mannequins/Animations/Manny/MM_Fall_Loop.uasset
[2022.05.12-14.36.26:348][  0]LogInit: Display: LogSaveDirtyPackagesCommandlet: Error: Cannot checkout C:/Workspace/UE5PlasticPluginDev/Content/Characters/Mannequins/Animations/Manny/MM_Idle.uasset
[...]
[2022.05.12-14.36.26:349][  0]LogInit: Display: LogSaveDirtyPackagesCommandlet: Error: Cannot checkin

After:

[2022.05.12-14.39.54:537][  0]LogInit: Display:
[2022.05.12-14.39.54:537][  0]LogInit: Display: Success - 0 error(s), 0 warning(s)
[2022.05.12-14.39.54:537][  0]LogInit: Display:
Execution of commandlet took:  1.37 seconds

@SRombautsU SRombautsU merged commit 1bbddbe into PlasticSCM:master May 13, 2022
@SRombautsU SRombautsU deleted the fix-connection-at-init-for-commandlets branch May 13, 2022 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants