tags:

views:

248

answers:

2

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?

+4  A: 

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)

VonC
Oh well. That's a shame, thanks for the answer.
kdt
A: 

This is a known missing feature of p4 diff that lots of tools dealing with Perforce have to work around.

The code review tool Reviewboard comes with the tool post-review. It is used to create diffs for a a codereview, but it will just do a diff if you want.

It's in python, you could pull out the diff section for your own use.

prestomation