How to take perforce diff with out identical files

If you are using source code control system such as perforce then I’m sure you might have had plenty of situation to find the difference between a depot using label. During these times, if you run command like below to get the difference, you might have seen perforce printing lot of lines which gives identical file information as well. How to ignore these identical files from output?

Following commands will help you to get files that differ ignoring all identical files,

p4 diff2 -du //depot_1/...@label //depot_1/... | grep -v identical

The above command is uses Linux “grep” command to ignore identical files. Perforce also provide useful option “Od” which can be used in diff2 command like below,

p4 diff2 -Od -du //depot_1/...@label //depot_1/...

2 thoughts on “How to take perforce diff with out identical files

Leave a Reply

Your email address will not be published.

WP2Social Auto Publish Powered By :