Skip to content

Commit 7464b85

Browse files
committed
Revert back the implementation of FPlasticSourceControlProvider::UsesFileRevisions() to match what is used upstream in Unreal Engine
This API is broken, it was created to prevent users to Sync individual assets, but it is now preventing users to check-in with the context menu, as well as selecting files from the Submit window // Only a partial workspace can sync files individually like Perforce, a regular workspace needs to update completely return IsPartialWorkspace(); I believe that the logic is in fact flawed from what we would expect! IMO Context & selected check-in should be forbidden if the provider use changelists, not the reverse! (and using changelists could become a setting) NOTE: the bug was introduced in UE5.1 by: Commit 5803c744 by marco anastasi, 10/04/2022 02:36 AM Remove / disable 'Check-in' context menu item in Content Explorer and Scene Outliner for Source Control providers that do not use changelists #rb stuart.hill, wouter.burgers #preflight 633ac338c37844870ac69f67 [CL 22322177 by marco anastasi in ue5-main branch]
1 parent bb7dbed commit 7464b85

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

Source/PlasticSourceControl/Private/PlasticSourceControlProvider.cpp

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,13 +431,13 @@ bool FPlasticSourceControlProvider::UsesLocalReadOnlyState() const
431431

432432
bool FPlasticSourceControlProvider::UsesChangelists() const
433433
{
434-
// TODO this is the wrong usage for UsesChangelists()
435-
return true; // We don't want to show ChangeList column anymore (Plastic SCM term would be ChangeSet) BUT we need this to display the changelists in the source control menu
434+
// We don't want to show ChangeList column anymore (Plastic SCM term would be ChangeSet) BUT we need this to display the changelists in the source control menu
435+
return true; // TODO: we should make this configurable, in order for users to be able to hide the View Changelists window from the menu
436436
}
437437

438438
bool FPlasticSourceControlProvider::UsesUncontrolledChangelists() const
439439
{
440-
return false; // TODO: not working yet as far as I know; see for instance the Reconcile action when not using readonly flags
440+
return false; // TODO: not working yet; see for instance the Reconcile action when not using readonly flags
441441
}
442442

443443
bool FPlasticSourceControlProvider::UsesCheckout() const
@@ -447,8 +447,29 @@ bool FPlasticSourceControlProvider::UsesCheckout() const
447447

448448
bool FPlasticSourceControlProvider::UsesFileRevisions() const
449449
{
450+
/* TODO: this API is broken, it is preventing the user to use the source control context menu, as well as selecting what files to submit
451+
450452
// Only a partial workspace can sync files individually like Perforce, a regular workspace needs to update completely
451453
return IsPartialWorkspace();
454+
455+
I believe that the logic is in fact flawed from what we would expect!
456+
IMO Context & selected check-in should be forbidden if the provider use changelists, not the reverse!
457+
(and using changelists could become a setting)
458+
459+
NOTE: the bug was introduced in UE5.1 by:
460+
461+
Commit 5803c744 by marco anastasi, 10/04/2022 02:36 AM
462+
463+
Remove / disable 'Check-in' context menu item in Content Explorer and Scene Outliner for Source Control providers that do not use changelists
464+
465+
#rb stuart.hill, wouter.burgers
466+
#preflight 633ac338c37844870ac69f67
467+
468+
[CL 22322177 by marco anastasi in ue5-main branch]
469+
470+
*/
471+
472+
return true;
452473
}
453474

454475
bool FPlasticSourceControlProvider::AllowsDiffAgainstDepot() const

0 commit comments

Comments
 (0)