Take the 2-minute tour ×

I'd like to diff a bunch of lines across several revisions. Like, I'd like to see a.c, b.c, and c.c from changelist X to changelist Y.

p4 diff2 a.c@X a.c@Y (where X & Y are changelist numbers) seems to work, but only sometimes. Specifically, if a.c is non-existent at X, I don't get a diff. I'd like to be able to get the diff (even though it'll be the whole file with only adds) anyways.

To get the bigger picture: I have several files, across several commits, and I'd like to merge the diffs of these files in these commits, to basically say "this is a diff of what changed in this set of files during this set of changelists"

share|improve this question
add comment

1 Answer

If I understand your problem right, p4 diff -f ... should be your friend. From the p4-help:

The -f flag forces a diff for every file, regardless of whether they are opened or if the client has the named revision. This can be used to verify the client contents.

(see p4 help diff on the command line).

share|improve this answer
add comment

Your Answer


