Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I export a large Perforce repository into a different version control system without losing the history?
    primarykey
    data
    text
    <p>At work we have a large Perforce repository (approx 40k changelists, total storage size ~145GB). We're generally happy with Perforce with only some mild gripes, but we're planning to go to a more distributed development model and as a result, would like to move to a more distributed version control system as well.</p> <p>So far, I've looked at the usual suspects (git, mercurial and potentially bazaar as I have good experience with it) but our main hurdle currently is to get the version history out of Perforce and imported into the various DVCSs so we don't lose the history. We'd also prefer not to have the Perforce server hang around if we don't absolutely have to keep it - my experience with this sort of migration is that nobody looks at the old repo after a while so you'd be losing the history that way.</p> <p>As there are multiple projects in the repository the idea is to split it into multiple DVCS projects when we're exporting the history as not everybody needs to be able to see every part of the history. However our biggest project still contains about 2/3rds of the committed revisions and also takes up approx 2/3rds of the storage. It also has the largest number of branches - probably around 30.</p> <p>So far, I've tried the following - everything is on Windows as we're a Windows-only shop:</p> <ul> <li>Import into Mercurial using the <code>hg convert</code> extension. This appears to work very well for the main branch of the project I'm converting, but attempting to convert the Perforce branches into named Mercurial branches using a branchmap still appears to produce a flat import with every checkin on the default branch. Maybe that's because I set the branch map up wrong, but <code>hg help convert</code> suggests that you can only turn a Perforce repo into a "flat" structure with no branches using this importer, which isn't really good enough for our use.</li> <li>Import into Git using git-p4.py. Perforce documents using git as a distributed front end to Perforce and basing the close on the latest revision(s) of the repo does produce a usable git repo. Attempting to import the whole sub-project with branches breaks the importer as it runs out of memory, so I can't even tell if it manages to import our repo correctly.</li> <li>I then had this brilliant brain fart of importing the Perforce repo into SVN with all the branches mapped to appropriate SVN branches as every version control system under the sun can import from SVN. This would be only using SVN as an intermediate step in the conversion, not as the target VCS - we wouldn't really gain anything from this conversion otherwise. Using p42svn.pl, that broke fairly early on in the process as our Perforce server didn't seem to like being hammered by the script that seems to make a new connection for every file/revision.</li> <li>I haven't looked into exporting the history into Bazaar yet as it's a bit of an also-ran.</li> </ul> <p>So, my questions are:</p> <ul> <li>Is there a good tool besides p42svn.pl to export a Perforce repo into SVN? I don't mind using SVN as an intermediate repo as it seems to make exporting into all the DVCSs we're looking at reasonably easy.</li> <li>Has anybody successfully exported branches from Perforce into Mercurial named branches and if so, how did you do it? The docs on the convert extension seem to be a bit sparse and I don't seem to be able to find a good/working way to do this.</li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload