Tuesday, February 21, 2006

How to merge two Visual SourceSafe databases

This is a piece of cake when you know VSS has already provided tools for that. Irealised that some companies have different teams keeping their sources in differentVSS repositories. Maybe not all of them willing to merge these but certainly somedo. I was thinking of creating such a tool to bring all the history of the filesusing VSS programming API. I have investigated the VSS Admin and yes it doesit for free.
  • Open the VSS Admin screen (obviously you need to have administrative privilages)
  • From the menu’s select Archive->ArchiveProjects.. and create archive files foreach database.
  • Repeat this for all the vss databases you want to merg together
  • Create the destination VSS databased from the admin screen.
  • In that database create projects on the root. This is making it conviniet to importeach database into a seporate project. Although this step is not necessary and youcan do that during the next step too.
  • From the menu’s select Archive->RestoreProjects.. and select the archived file.Follow the wizard to select a location to restore the old database into the newlacation.


    Isn’t this just simple!
  • Importing source history from VSS to TFS

    I have managed to import a Visual SourceSafe database including the historyof it into the Microsoft Team Foundation System.
    It requires you to create a new project in the TFS as destination ream project,and by the way you can do this in Visual Studio using the menu File->New->TeamProject,doing the analyse and read the nice and handy report which gives you beautiful listof all warnings and errors. Then I had to map the users of one repository to theother one by editing the users.xml that comes out of the analyse step. You can mapdifferent folders from one to the other if you like to do so by editing the settings.xmlwhich is very convinient.
    During the exercise you will be asked to type in the VSS administrator password.