ISourceControlProvider::RegisterStateBranches(...) doesn't reliably warn on conflicts
ISourceControlProvider::RegisterStateBranches(...), specifically FPerforceSourceControlProvider, is supposed to be used to set an order-dependent vector of branches that can be checked for potential conflicts between asset activity across branches.

This does not appear to work reliably, due to diverging codepaths for seemingly equivalent operations.

This results in different behavior depending on where in the editor users attempt to perform a source control operation.

A notable example is with FEditorFileUtils::CheckoutPackages(...).

There are multiple versions, for UPackage versus FString.

The UPackage version performs cross-branch checks, but the FString version does not.

This is because FAssetSourceControlContextMenuState::ExecuteSCCCheckOut(...) uses the FString version, which performs no checks. This affects the Asset Browser right-click menu.

Checked out files in the Asset Browser no longer display the cross-branch activity icon, as the checkout icon and text override it, so users no longer receive even passive visibility.

Some other editor paths can invoke these checks properly, such as attempting to save a non-checkout-out texture asset from the texture editor window, which will cause FEditorFileUtils::PromptToCheckoutPackagesInternal(...) via FEditorFileUtils::AddCheckoutPackageItems(...), which seems to relate to some state caching around IsCheckedOutOrModifiedInOtherBranch(...).

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-194333 in the post.

Login to Vote

ComponentUE - Editor - Workflow Systems
Affects Versions5.2
CreatedAug 31, 2023
UpdatedMar 1, 2024
View Jira Issue