Search code examples
perforceperforce-client-spec

Perforce new workspace trigger to create a file at client's workspace directory


We are pretty new to Perforce.
What we are trying to achieve is to create a file that will be placed on the client's machine Workspace directory when a new Workspace is created.

I couldn't find the right trigger for the Workspace creation.

Does anyone have any idea or suggestion? I do see that in most of the trigger I can get the Workspace directory from on the client's machine and the IP of the machine, but I can't find the trigger for the Workspace creation.


Solution

  • You can define a form-commit trigger on the client form that will fire when a client spec is created or modified.

    Note that this runs on the server, not the client, so if you want to do something like create a file on the client machine you'll need to use your own mechanism for that. Perforce itself will only place files on the client machine in response to a command like p4 sync.