Change the perforce workspace view map from the command line

I searched the web pages and help pages, but could not find a solution to my problem.

In the script and on the command line, I want to change the map of the workspace view. For instance:

// depot / some / branch / myfolder / mysubfolder /.../ home / myuser / perforce / branch / myfolder / myworkspace / ... in //depot/some/branch/.../home/myuser/perforce/ branch / ...

I can’t figure out which command to use. Can you help me?

+4
source share
1 answer

You will need the p4 client command. You can script use the -i and -o options, which allow you to interact with the workspace format through STDIN and STDOUT.

An easier way is to use scripting APIs like P4Python:

 cspec = p4.fetch_client('my_ws_name') view = ["//depot/some/branch/... /home/myuser/perforce/branch/..."] cspec["View"] = view p4.save_client(cspec) 
+7
source

All Articles