I'm trying to migrate a bunch of TFS workspaces to P4. The problem is that the new P4 repository, while very similar to TFS repository, has some differences.
I want to recycle as much of the existing repository as possible to avoid downloading tens of terabytes of data between all the workspaces being migrated.
TFS has this nifty command vc reconcile * /clean /recursive /ignore
which will go through the repository and show a dialogue telling me which files are missing, which are extra and which differ from the repository version. It even ignores checked out files. It is also surprisingly fast, taking less than a minute for 200GB of data.
Is there a similar tool for P4? This would enable me to create a new P4 workspace, place as many files as possible in the location where they're expected and then run that to deal with a handful of differences or files I might have missed.
Is there some way to do it with P4?
What you probably want to do is:
p4 sync -k
p4 clean
The p4 sync -k
command says "pretend I have everything synced to the head revision, but don't touch anything in my actual workspace". The p4 clean
command says "go through my workspace and reset anything that doesn't match what I have synced". Between those two, you can easily "bootstrap" a new workspace that already contains the files that you would otherwise have to sync, and have confidence that any discrepancies are removed.
If you want to be able to check in the discrepancies rather than blow them away, use p4 reconcile
instead of p4 clean
.