I have a file on a perforce depot and when I am updating it with an automated script I want to find all the workspaces mapping the file (with a p4
command) and send emails to the owners of these workspaces (file is containing the latest view spec of a project and the recipients of the email should get notifications so they can update their view spec too )
is there a way to find all the perforce workspaces which are mapping a certain file in the depot?
308 views Asked by Hani_l At
1
Providing that none of the workspaces you want to look at are using the 'Host' field, you can run:
p4 -c have
to get a list of all files that are synced on the client.
Note this would first involve you getting a list of all workspaces on the server, by running:
p4 clients
Also this may be quite resource intensive, if your server has a lot of clients that sync a lot of files, so I would recommend using something like the Perforce Review Daemon or Perforce Swarm for code review and notification.
More details about these are available here:
http://www.perforce.com/perforce/doc.current/manuals/p4sag/chapter.scripting.html
http://www.perforce.com/collaboration
Hope this helps, Jen.