I have troubles getting the latest version from the perforce server . The depot is very large and I don’t want to do a complete checkout as it would tale a long time . Instead I put the unversioned sources and dependencies in the workspace and do a “p4 sync -k” . This successfully versions my files but it doesn’t bring the new files from the server .
How can I do that ?
If I understand your situation:
The steps you should follow are:
p4 sync -kto make Perforce think you have the latest copy of all files.p4 diff -se ... | p4 -x - sync -fto force-sync any out of date filesp4 diff -sd ... | p4 -x - sync -fto force-sync any missing filesAt that point you may have local files that were deleted from the server. If you care about those, you can write a simple script that detects them and removes them from your file system.
The good news is that Perforce’s next release (2012.1) has a
statuscommand that will pick up all differences more easily.To approach this from another angle, do you need the entire project in your workspace? Could you narrow your workspace view to only work with a subset of the data?