Reputation: 41
Is there command in Perforce to get information which clients has mapping for particular folder from depot ?
Example:
I have depot location //depot/myfolder/somefile.java
I want to know information which clients map this location to which path:
//client1/c:/folder1/somefile.java //client2/d:/folder2/somefile.java ...
I can get this information from "p4 client" but it is for current client and not for particular folder/file.
Regards, Victor
Upvotes: 3
Views: 1398
Reputation: 21160
You could do it with a small script using the p4 clients command to list clients:
p4 help clients
clients -- Display list of clients
workspaces -- synonym for 'clients'
p4 clients [-u user] [-e nameFilter -m max]
Lists all client workspaces currently defined in the server.
The -u user flag lists client workspaces that are owned by the
specified user.
The -e nameFilter flag lists workspaces with a name that matches
the nameFilter pattern, for example: -e 'svr-dev-rel*'
The -m max flag limits output to the specified number of workspaces.
and then iterate over each client using
p4 client -o <client name>
to list the client spec, and finally search for the path(s) you are interested in.
Upvotes: 2