perforcep4vperforce-client-specperforce-branch-specp4python

p4 status -A only to sub directory of perforce workspace


I have folders like this in my perforce workspace view.

//depot/... //rajesh_ws/...

where //depot/... has all the source code and the compiled code will be copied to bin sub directory. I am syncing //depot/... & Building it and copying the binary file in bin sub directoryr.

Now I want to submit the bin folder (//rajesh_ws/bin/...) in Perforce instead of all (//rajesh_ws/...) which has many other files generated during the build.

When i use "p4 status -A" & "p4 submit", it submit all the files which includes //rajesh_ws/... but i want to only submit the files from bin folder. Any idea on this?

I am using p4python api for the same

Script snippet

p4.run("status", "-A")
p4.run_submit( "-d", "Modifying bin folders")

Please suggest


Solution

  • Provide the path as an argument to at least one of the commands:

    p4 status -A //rajesh_ws/bin/...
    p4 submit -d "Modifying bin folders" //rajesh_ws/bin/...
    

    "p4 status" will only open files matching the file argument (leaving other unopen files in an unopen state); "p4 submit" will only submit open files matching the file argument (leaving other open files in an open state).