Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perforce depot/client mapping

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

like image 465
victor Avatar asked Aug 03 '26 16:08

victor


1 Answers

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.

like image 85
gareth_bowles Avatar answered Aug 05 '26 18:08

gareth_bowles



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!