Does someone have such a script to share?
I know from experience many people who work with perforce all day have these kicking around. I could really use help with the whole issue of "file(s) not in client view" when diffing newly added files via "p4 diff".
I didn't have the time to find a proper solution so I used this one liner:
p4 describe $CHANGELIST | sed -ne 's:^\.\.\. \(.*\)#[0-9][0-9]* [a-z][a-z]*$:\1:p' | xargs p4 diff -du
Here is how it works:
Since --
... Pending changelists are indicated as 'pending' and file diffs are not displayed.
p4 describe $CHANGELIST
by itself will not do, but you can use it as a starting point. It gets (among other things) a list of the files that was changed in your $CHANGELIST
.
sed -ne 's:^\.\.\. \(.*\)#[0-9][0-9]* [a-z][a-z]*$:\1:p'
Prints the <depot-file>
part of only the lines of the form ... <depot-file>#<revision> <action>
xargs p4 diff -du
Takes the list of depot files and run p4 diff -du
on it. The -d
flag passes u
(unified format) to your $P4DIFF
program (that should be diff
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With