R – Perforce – submit only files open for branch, not files open for edit

perforce

Quite often when I'm working in a branch in Perforce, I realise I need a file I didn't branch when I initially branched.

So, I add the file to my client, run p4 integrate -b branchname, then p4 submit.

Thing that bugs me is that I then need to go through the list of files for submit, and remove all entries that are open for edit.

I can't see any option in p4 help submit, but it seems like this might be a reasonably common use case.

Best Answer

First do

p4 submit

Assuming your p4 editor is vi,

type this command in command mode

g/#.*edit\|#.*add\|#.*delete/d
Related Topic