I am looking at migrating our svn code base to perforce. Looking at google search results, I did find 2 tools which do the same
- P4Convert-SVN ftp://ftp.perforce.com/private/tools/p4convert/p4convert-svn-README.txt
- SVN2P4 http://public.perforce.com/wiki/SVN2P4
Both these tools seems to be from the Perforce website. But I couldn't find pros and cons of using one tool vs the other. We also need to migrate the svn history to perforce. Is this possible using any of these tools ?
Both of the tools P4Convert-SVN and SVN2P4 migrate your history to Perforce; that is the main reason they exist. The tools (in fact, any migration tools) iterate over all the changes in SVN and submit them individually to Perforce.
I have used
p4convert-svn
to migrate a large SVN repository to Perforce; it did the job well.If you are a new Perforce customer, you should have purchased a start-up package that includes migration of your source control - see Perforce Consulting for information.
Also for some more information about migrating repositories see this forum post on Perforce forums that I have also contributed to. It links to a good case study on migrating a repository (actually would consider it essential reading).
I'd recommend trying p4convert-svn. It is very solid.
If you have any problems you should contact Perforce support. There's a new tool in the works but not generally available yet.
Before you attempt to use the
p4convert
tool by yourself, be aware that currently there are many outstanding bugs in this tool. They haven't worked on it since 2016. I went back and forth with support, and they were unable to provide much help, since the tool itself is buggy, and support isn't allowed to fix it. They usually just said "oh, you're using feature X, yes, that's a known bug, try again with that feature disabled".In order to work around some bugs I had to write a Python script that reads the SVN dump, modifies it to make it digestible for p4convert, then write it back to disk. Most importantly, I had to write a script that verifies the conversion result against the checksums in the dump. The
p4convert
tool is quite unreliable, as its audit.log is incomplete, and it doesn't do any verification at all. If it produces wrong results, sometimes it produces warnings, sometimes it doesn't tell you anything.Do yourself a favor and let Perforce Consulting do the conversion for you. [Note that I didn't do that, so I don't actually know if that will provide better results.]
Have you seen this Perforce Page on this issue? They seem to say P4Convert is the way to go. SVN2P4 is in the public repository which means it is a Perforce user who created the tool. They may have created it because they didn't like P4Convert-SVN or because they didn't know about it.
One thing I can say about Perforce is that their technical support is excellent. I suggest you give their Support Number a call and simply ask them which way is the best.