We have agreed on certain rules in our repository, but I want to make sure that those rules are being followed. Some of those rules are:
- When attaching a job to CL, either when originally submitting it, or by editing it later, state of the job must remain the same
- Similarly, when editing jobs themselves, to add CLs to them, the state of the job must remain the same
- When submitting a CL, on submit parameter must never be
Submit all selected files
- When creating a workspace, on submit parameter must never be
Submit all selected files
and line endings parameter must be set to unix
The last one, about the workspace, I’ve managed to enforce fairly easily, by using a form-in trigger that applies only to workspace forms, and doing a search-replace.
I’ve also figured that p4 calls p4 fixes
to attach CLs to jobs and transition them, although I’m not sure if that is something I can intercept and control.
For the last one I’ve tried manually entering p4 submit
and p4 changelist
to see what the forms look like, but which submit rule to use when submitting the changelist were not present in either. Those parameters are present when you access these functionalities through P4V
gui when submitting a changelist.
Does anyone know what does p4v does in the background? How do I intercept this changes and how do I make sure they aren’t “illegal”? Can I make sure that the job is not transitioned in another state (for the curious ones, we have p4dtg and the issue tracker is the authority for that field).