wip: add helper script to dump perforce instance state
Created by: ggilmore
I won't provide an example of the output (for fear of leaking something), but you can run it once you set the environment variables as described in https://handbook.sourcegraph.com/departments/ce-support/support/process/p4-enablement/
For now, this is a relatively simple script that can be used of a perforce instance that you point it to. This includes:
- list of users
- list of groups
- list of depots
- mapping of user-to-group assignments
- p4 protection table for everything / from the perspective of individual users / from the perspective individual groups
The idea I had is that this script could be used to "dump" the state of a perforce instance, which could be helpful with:
- Drift detection - you can put the output of the script in version control - and see if the output of the script changes - which could incidate that someone edited the instance in a way that your tests didn't expect
- calculating some aggregate information (like user-to-group) mappings from an instance which could be tedious / error-prone to repeatedly do by hand