Perforce -- generate a diff including added files?

kdt picture kdt · Dec 29, 2009 · Viewed 9.3k times · Source

When I use "p4 diff", it ignores files that I have open for add. Is it possible to generate a diff that includes added files as well as changed files?

Answer

VonC picture VonC · Dec 29, 2009

Considering the diff in Perforce compare the files in the client workspace to revisions in the depot, the short answer is "no".
There is no recorded history to compare to for the added file (not committed to the depot before a submit)

The longer answer would involve a script to complete the diff with the full content of the added files. (kind of like in this SO question)