Getting groups in PerforceSourceControl

In UE, we need to detect the P4 user group, but there’s no such operation in the PerforceSourceControl module. Therefore, we need to create our own SourceControlOperation and PerforceSourceControlWorker, and then add the worker to the WorkersMap in PerforceSourceControl/Source/PerforceSourceControl/Private/PerforceSourceControlOperations.cpp. This requires modifying the engine code.

In other providers, such as GitSourceControlProvider, the method for registering a worker is parameterised. Would it be possible to implement something similar for Perforce, or is there another recommended way to register additional operations?

Hi Anna,

Thanks for reaching out. From what I can tell there isn’t any way to register workers from external code. Neither for perforce nor for git. Git does have the API but it is all private. So I would be curious to know how you are registering workers for git without modifying engine code?

As for perforce, from what I can tell this is by design. So my recommendation would be to submit a pull request if you end up implementing this worker and we can look into integrating it with the engine.

Thanks,

Aditya Ravi Chandran