Hi Robert,
The `bForceCommitToRevisionControl` boolean does cause some collection operations to auto commit despite the settings. However, it is not expected that adding or removing an asset to a collection would cause an auto-commit.
The operations which are expected to commit irrespective of the setting (current as 5.6-preview in github)
- Creating a collection
- Renaming a collection
- Emptying a collection
- Saving a collection
- Saving the result of a search query as a collection
bForceCommitToRevisionControl should be false for the following operations:
- Reparenting collection
- Adding assets to collections
- Removing assets from collection
- Setting the collection color
- When a redirector is within the collection and the redirector is deleted
Could you confirm that divergence in your branch leaves the bForceCommitToRevisionControl to false in the following functions:
- FCollectionManager::AddToCollection
- FCollectionContainer::RemoveFromCollection
(Note: 5.6-preview code has these functions at FCollectionContainer from commit 517f6573f680f4a5329d78fa6f2852eee6ba4006, so when upgrading you will need to move over any divergence to there)
The code should roughly look like this (taken from FCollectionManager::RemoveFromCollection)
constexpr bool bForceCommitToRevisionControl = false; if (!InternalSaveCollection(Guard, *CollectionRefPtr, OutError, bForceCommitToRevisionControl))
Internally, FCollection::Save should check `bForceCommitToRevisionControl` in the following block
`if ( bUseSCC && (bForceCommitToRevisionControl || GetDefault()->bAutoCommitOnSave))
{
// Check in the file if the save was successful
if ( bSaveSuccessful )
{
if ( !CheckinCollection(AdditionalChangelistText, OutError) )
{
// …
bSaveSuccessful = false;
}
}
// If the save was not successful or the checkin failed, revert
if ( !bSaveSuccessful )
{
FText Unused;
if ( !RevertCollection(Unused) )
{
// …
}
}
}`You can put breakpoints into that block and determine what the value of bForceCommitToRevisionControl is and where the value may be coming from. This would help me track down why this might not be working.
The setting was chosen to be kept as defaulted to true because this has been the default behaviour for quite some time. The reason we chose this was to deal with the case where multiple people are editing the same collection and they have both checked it out, if auto-commit is false, then it could be up to the user to merge the changes which is not always easily done by all users depending on their experience with external merge tools. If everyone on the team is comfortable with this situation, then disabling auto-commit is a good course of action to help mitigate some of the stalls due to waiting for perforce servers to respond.
Since you maintain a diverged engine, you can change the default value of bForceCommitToRevisionControl in Config/BaseEditorSettings.ini. The following should do it.
[/Script/CollectionSettings] bAutoCommitOnSave=False
Let me know where you get with determining the source of bForceCommitToRevisionControl and we can go from there.
Logan