I'm wondering if there is a way to tell perforce only to sync the missing (from given workspace view) files, not overwriting correctly existing, i.e. a way to avoid the use of p4 sync -f after a normal "get latest revision" (p4 sync) did not get all.
Try this:
p4 diff -sd | p4 -x- sync -f
This is a chained command that will find all known files in your workspace that are not #head revision (p4 diff -sd) then force sync on only those files (p4 -x- sync -f). Note the use of the -x- which instructs the second command to read from standard input (STDIN).
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