Search code examples
synchronizationperforcerevertp4v

How to do a "sync" in Perforce P4V client


Suppose I have the following structure, already in Perforce:

//path/to/playground/code/

And locally I have:

c:\project\path\to\playground\code\

After making some changes in the code folder locally, I decided it's no good, and would like to start from the latest code base in depot.

So in Windows Explorer, I renamed code\ to code_NG\ (Yes, I'm aware that I can do a revert, but I'd like to keep the local changes for reference, at least for now.)

Question: How do I get a fresh new copy of the code\ folder from depot?

I've found there's a p4 command called sync. But how do I do it in Perforce P4V client?

I come from a SVN background, and this is equivalent of doing a svn update, which downloads all the missing local files from the server.


Solution

  • In P4V, choose Get Revision....

    Then, since you've re-arranged your local filesystem, and hence your local code folder doesn't match the state that the server has recorded, check the Force Operation checkbox to ensure that the server will deliver you all the files, even the ones that it thinks you already have on your workstation.