Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Diff multiple files in perforce across a revision range

Tags:

perforce

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"

like image 291
Thanatos Avatar asked Dec 08 '25 10:12

Thanatos


1 Answers

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).


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!