Are you confined in perforce? Do you want to escape from it?
We need some tools to success in our adventure!
- Python 2.7 (http://www.python.org/getit/releases/2.7/)
- P4PythonLib 2010.1 for Python 2.7 (http://public.perforce.com:8080/guest/sven_erik_knop/P4Pythonlib/bin/?ac=83)
- Bzr Standalone (http://launchpad.net/bzr/2.4/2.4.2/+download/bzr-2.4.2-1-setup.exe)
- Bzr Python Based (http://launchpad.net/bzr/2.4/2.4.2/+download/bzr-2.4.2-1.win32-py2.7.exe)
- Git for windows (http://msysgit.googlecode.com/files/Git-1.7.8-preview20111206.exe)
- P4-fast-export.py (bzrp4)(http://dl.dropbox.com/u/2974293/trunk.rar)
- I assume you have the P4 client and server.
It’s not going to be a Boy Scout trip… some brave people failed.
- If the Bzr and P4PythonLib is not able to find the Python installation directory please review the following link: (http://selfsolved.com/problems/setuptools-06c11-fails-to-instal/s/63)
- If the p4-fast-export.py fails regarding a Git error you have to follow this:(http://stackoverflow.com/questions/5299122/unable-to-import-with-git-p4-on-windows)
- Install all the materials, just install it, you don’t need to open or configure anything.
- Place the http://dl.dropbox.com/u/2974293/trunk.rar content inside a directory called “bzrp4” under the "C:\Program Files\Bazaar\plugins" directory, the path to the python migration file should be like this: “C:\Program Files\Bazaar\plugins\bzrp4\p4-fast-export.py”.
- Customize the “setup_env.bat” parameters with your environment info, adapt the Git path, P4PORT, and the Perforce server Path. Finally run it.
- Open a command line window and run: “python p4-fast-export.py //my/repo/path@all > p4fe.dat”. If you are strong enough you can review the command help. Make sure you are using the Python 2.7 executable.
- Create a temporal directory, change your command line directory to it and perform the following: “git init .” “type p4fe.dat | git fast-import” and then “git fast-export --all --tag-of-filtered-object=drop --signed-tags=strip > gitFe.dat”
- The last step is “cm fast-import p4ImportedRep gitFe.dat”
If all works fine you will have your repository inside PlasticSCM!!!