Jump to content


Create a file in Workspace Directory when workspace is created

Triggers workspace

  • Please log in to reply
2 replies to this topic

#1 MaxBk

MaxBk

    Member

  • Members
  • PipPip
  • 12 posts

Posted 10 November 2016 - 02:27 PM

Hi,
I'm new to perforce and perforce triggers and I didn't find any reference for something like what I'm looking for in the documentation.

We would like to create a .p4config file for each workspace that is created.
The file must  be placed in the workspace directory on the client's machine.

I thought to make it with a trigger on the new workspace "Form" but i'm not sure that I'm in the right direction and I didn't find that form's name.

Can anyone please give me any advice where to find relevant documentation or example for that?


Thanks in advance,
Max.

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1175 posts

Posted 10 November 2016 - 05:59 PM


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.


#3 MaxBk

MaxBk

    Member

  • Members
  • PipPip
  • 12 posts

Posted 13 November 2016 - 01:39 PM

View PostSambwise, on 10 November 2016 - 05:59 PM, said:

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.

Thank you! Worked :)





Also tagged with one or more of these keywords: Triggers, workspace

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users