Files
UnrealEngineUWP/Engine/Source/Editor/SourceControlWindows
wouter burgers 3500d71466 SourceControl: The ChoosePackagesToCheckIn operation should optionally perform a sync ('pull-before-push' model) for snapshot based source control systems.
Skein, the only provider that returns 'true' for 'UsesSnapshots()' requires the user to be at head when doing a check-in operation, or the check-in will fail.
This is enforced within the plugin, not the CLI, by performing an FSync prior to doing an FCheckIn. It's not easy to do the sync within the CLI as part of the check-in as the editor doesn't release its file locks when doing an FCheckIn, causing syncs to fail.
For this, a code path was introduced in SourceControlMenuHelpers that triggers a sync before triggering the check-in, when clicking the 'Check In Changes' button visible in the bottom right of the editor within UEFN.
However, this approach fails if other code paths in the editor call ChoosePackagesToCheckIn directly. This is known to happen for the MainFrame's "Submit Content" action, which was therefore disabled for Skein in #26272334, but the issue could be more widespread.

To provide a definitive fix for this issue, the sync is moved to within ChoosePackagesToCheckIn, triggered only when 'UsesSnapshots()' is true, which effectively means Skein only.

#rnx

[CL 27582511 by wouter burgers in ue5-main branch]
2023-09-04 04:10:36 -04:00
..