8

I'm trying to convert a Visual SourceSafe Repository to Git while keeping the exact version history. So I've tried using https://github.com/trevorr/vss2git. It worked, but it didn't keep the history. So I tried using TFS as a middleman. I used The latest version of TFS and its upgrade wizard but it didn't keep the history, so I tried with TFS 2013 (How to migrate VSS 2005 to TFS 2015?) and its upgrade wizard, but still no history. I'm pretty desperate now, and I don't know where the problem lies, as I even analyzed my VSS repository, and no errors were found. I've read that I could also try using SVN as the middleman, so I'll do that, but I'm skeptic.

Chamberlain
  • 881
  • 5
  • 17

3 Answers3

4

Here is the solution which worked for me a couple years ago. When I tried the mentioned vss2git, it has blown our 9GB vss database in 103GB over a weekend without reaching the end. So I took the TFS server (2010) as middleman and it worked. The TFS 2010 could import VSS database directly, I am not sure about newer ones. Simultaneously, the TFS can serve as a git remote using git-tf, or git-tfs for example. After the import, simple git tfs clone has done the second part of the business. So here you go:

  1. Get a TFS version capable of VSS import. This link can help you.
  2. Use the wizard, or command line to import your VSS database.
  3. Get git-tfs from here
  4. (Optionally) fix the commit dates - see below.
  5. Do something like this git tfs clone http://tfs:8080/tfs/DefaultCollection $/some_project

The only quirk I can remember was that the TFS has set the date of all commits to current date and has put the original vss dates into the comments. I have fixed this directly in the SQLEXPRESS database of the TFS like this:

UPDATE tbl_ChangeSet 
SET CreationDate =  CONVERT (datetime, Substring(Comment,2,19), 104)
Where CreationDate > '2014-01-28' AND Comment LIKE '{%'

Please put your own date (of the last VSS comit) into the query.

https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2013/ms253060(v=vs.120)

Thinkeye
  • 888
  • 12
  • 22
  • 2
    For me, I had to modify the query to: UPDATE tbl_ChangeSet SET CreationDate = CONVERT(datetime, Substring(Comment, 2, PATINDEX('%[~}]%', Comment) - 2) FROM tbl_ChangeSet WHERE Comment Like '{%' – Essam Al-Mansouri Apr 25 '20 at 01:53
0

You can try https://github.com/azarkevich/VssSvnConverter, but it is not user friendly. (Despite it`s name it can convert VSS to Git)

Also this tool does not keep history of file/directory moves/renames. File will have history with latest name.

Sergey Azarkevich
  • 2,641
  • 2
  • 22
  • 38
-2

I've found the solution, and the programs I used do work. It's just that I tried to move too much data, so it would just glitch and not store the history. I'm not sure exactly the amount of data I can safely move, but I now have a history

  • 12
    Well - you asked for help, then figured it out by yourself. How about actually sharing the solution so others may benefit from this useless (for now) thread? – lip3k Feb 21 '19 at 13:53
  • 6
    I'm also interested. What amount of data did you migrate that worked? Cant believe I am still asking question about VSS 6.0d. Did you retain your history? Can you please provide the steps.Thanks. – Jeremy Thompson Feb 22 '19 at 01:48
  • 1
    People helped you when you needed help. Now help people when they need your help. Show us how you did it and share it. – Alex Net Jan 16 '20 at 11:43
  • Hey, just to give some closure, it was during my first internship and I think it was also my first SO post, so I didn't know the etiquette. I'm sorry for that. As for what I did, I didn't do anything. When I figured this out, another guy took over and wrote a script that does it 1 piece of data by piece of data automatically. I don't know if it worked or not. I hope it helps though. – Pierre-Alain Tietz May 29 '22 at 22:13