Easy way to create perforce changelist with multiple filespecs

Brian Carlton picture Brian Carlton · Oct 14, 2009 · Viewed 16.9k times · Source

I wish to submit a changelist with multiple filespecs, e.g. ...this... ...file.h ...theother.... Perforce won't let me. I could create a changelist from a file but I do want a chance to review the files and enter the comment. This is for a command-line solution.

Answer

Martin Probst picture Martin Probst · Jul 2, 2010

If you're looking for a UNIX/*NIX command line solution, this will give you a new, clean changelist and keep the number in $cl:

export cl=`p4 change -o | grep '^\(Change\|Client\|User\|Description\)' | p4 change -i | cut -d ' ' -f 2`