Create Patch Perforce Changelist Rating: 3,5/5 6065reviews

Solution p4 opened -c 999 sed -e 's/#.*//' p4 -x - diff Explanation p4 -x gives you like ability without having to use xargs. From p4 help utils: The -x flag instructs p4 to read arguments, one per line, from the specified file.

See More On StackoverflowPerforce Changelist Description

Use p4 opened-c changelist to see a list of files linked to a particular changelist and p4 fixes-c changelist to see a list of jobs linked to a particular changelist. To move a file from one changelist to another, use p4 reopen, or use p4 revert to remove a file from all pending changelists.

If you specify '-', standard input is read. So you can almost just 'take the output of p4 opened -c 999 and pipe it to p4 diff' as suggested in the question. The one tricky part is that the output of p4 opened contains revision numbers and explanatory text after the name of each open file e.g. //depot/example#123 - edit change 999 (text) by day@office //depot/new-example#1 - add change 999 (text) by day@office But we can run this through a simple sed -e 's/#. Brd Piata Unirii Bucuresti Program. *//' to strip off everything from the # onwards to leave just the paths: //depot/example //depot/new-example which can then be consumed from standard input and fed to p4 diff thanks to p4 -x.

If you have # in the names of any files then you'll need to get more clever with the sed command. And see a psychiatrist.