2

Exist somewhere tools/script for simple migration from Perforce to Plastic SCM with complete history?

Or perforce => git => plasticscm?

Abedron
  • 744
  • 1
  • 6
  • 20

1 Answers1

3

Yes, there's a way to do it in a bidirectional way and without the Git jump. It'd done using the "cm sync p4" command, we call it P4Sync.

First you need to use the “Full installer (UDT + P4Sync)” installer available at https://www.plasticscm.com/download/5.4.16.779

That installer contains the P4 Sync command, it’s format is:

cm synchronize br:/main@MyRepoName@plastic-server:8087 p4 p4Server:1666 //myDepot/path --user=p4user --pwd=p4password

You can use the “--excluded=excludeFilePath” parameter in order to target a configuration file containing P4 depot path rules to be ignored during the migration.

Let me give you an example, if you want to sync the “//depot/stream” P4 depot path but you are not interested in migrating the “//depot/stream/subdirtoexclude” subdirectory then the config file must have "/subdirtoexclude" written in order to ignore it, as you can see it’s a relative path to the root sync path.

There is an optional parameter that I do recommend you to use, it’s the “--tmpwkpath”, use it to specify a custom path for the temporal p4 workspace where p4 depot files are downloaded, I usually use: “--tmpwkpath=c:\p4wks”, it gives me enough room for long path names and you avoid over populating your windows tmp directory (which will affect t the command performance). Don’t forget to use it.

How the sync works? It’s very easy, it will search from missing changeselist from P4 to be imported into Plastic SCM and the other way around, it will search for missing Plastic SCM changesets to be imported into P4, if new content is found it will be synchronized. The same command is used to bidirectional synchronize the data, you don’t need to change the command to pull from P4 or pull from Plastic, everything is done at the same time. But notice that if parallel changes are done at the P4 path and the Plastic /main branch then you'll need to pull the P4 changes first, resolve the conflicts using the merge operation (merging a sub-branch that will be autmatically created) and then push the changes back to P4.

The first time you run the command all the P4 history for the given depot path will be migrated into the empty Plastic SCM repository. The first p4 changelist is usually the hardest one since a huge number of assets are probably initially added.

The sync command gives periodic updates about what’s going on, you can enable the “cm.log.conf” debug log file (https://www.plastics...scm-part-i.html) in order to enable the full command execution log.

If you have any questions please write us to support@codicesoftware.com.

MrCatacroquer
  • 2,038
  • 3
  • 16
  • 21