views:

1581

answers:

3

I have had a local Source Depot repository for version control since my days at Microsoft. Lately, I've been wanting to migrate to SVN and take the change history with me but there seems to be no script to migrate to SVN.

Since there are quite a few Microsofties who hang out here, I thought I'd try here. I am basically looking for an easy migration script that would take care of things for me.

Barring that, any other advise is welcome to get me on my way. FYI, Source Depot is based off Perforce and I have tried the perforce migration tools without any success.

A: 

Perhaps I'm misunderstanding your issue, but what prevents you from doing a full checkout of the code from Source Depot, and then checking it into Subversion?

Unless you also mean to import any user/group controls that were setup, in which case a check-out/check-in wouldn't completely accomplish that.

warren
He wants to keep change history.
Malfist
I thought, perhaps in correctly (and please correct me if I'm wrong) that every checkout included a meta file of the change history? Maybe it's just the source control tool (or configuration) I used at work
warren
It might or might not include some meta file, but SVN most likely doesn't support the format.
Mongo
A: 

My company had a contractor visit us for an info session a while back about migrating the all of the source and version history from MKS to SVN. It turns out that it's actually very difficult to keep the version history intact through a migration process because they all have their own methods for storing that history. What I took away from that visit was that there are some expensive third party tools that will do migrations, but they are hard to find and really aren't all that great.

We ended up deciding that for most projects, we would bite the bullet and just create new source control projects with the existing source, losing the version history for the new software and keeping the old ones backed up on disk.

Granted, our situations differ a little in that our base version histories are not in the same format (mine is MKS, yours is SD). But, I don't believe it will be easy to find a magic script for converting it. I could be wrong, but this is what I got out of that meeting that we had, anyway.

Mongo
+1  A: 

Does Source Depot have a command line similar to Perforce?

About a year ago I moved my home SCC depot from Perforce to SVN in a few steps using a Python script. While I no longer have the script it was pretty simple and written one afternoon.

Basically the script started at the very first perforce changelist and ran through them all in sequence. It would sync to each changelist and split the files into edit/add/branch lists. These files would then be copied to the SVN path and updated/added/branched using the appropriate commands. They'd then be committed using the comment from the original change-list.

This gave me a complete SVN mirror of my Perforce depot with all history/comments and branch info retained. I only had one user (me!) but it wouldn't be difficult to support multiple usees.

I even toyed with the idea of having the script change the system clock so that the history dates would be correct but it didn't seem worth it. For me the history and branch/tags information was the most important thing.

Andrew Grant
@Andrew, that's just the script I am looking for but don't want to reinvent the wheel. Perforce is more open and has interfaces like P4 which make it manageable.If all else fails, I might do just that but I am afraid it will take me much more than a day.
aleemb
I think a lot of these Perforce migration scripts rely on the -G flag on the p4 command: http://kb.perforce.com/ToolsScripts/PerforceUtilities/UsingP4GI don't believe sd.exe has this flag (at least, I don't know of an equivalent) so that's a fairly substantial roadblock to re-using the scripts out there.
tlianza