Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

perforce: avoid forced sync after normal "get latest revision" did not get all

Tags:

perforce

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.

like image 330
thoku Avatar asked Jan 24 '26 20:01

thoku


1 Answers

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

like image 118
user1054341 Avatar answered Jan 27 '26 00:01

user1054341



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!