tfvc

Last modified by Rudi Marais on 2023/05/22 23:50

Overview

We will migrate all the tfvc repos into one git repository called "migration" as a staging area to facilitate the process of moving the individual solutions into its final git location. This can be done in a delta fasion until we restrict the tfvc repos and everyone starts working off the git staging repo.

Feature branches can be merged back into master via a pull request and the feature branches that are not applicable anymore can be abandoned.

Migration process

The process to sync the tfvc to the git repo

  1. pull all the latest changes from TFVC via cli

    tf vc workspace /new migration /collection:https://dev.azure.com/ebsphere
    mkdir c:\dev\src\migration
    cd c:\dev\src\migration
    tf vc get

     
  2. do an extract and dump into excel to generate the copy commands

    forfiles /P C:\dev\src\migration /S /C "cmd /c echo @isdir;@ext;@path" >>list3.txt
     
  3. execute copy commands from excel generation
    1. this will split the source into master and feature branches
       
  4. A recon step must be performed at this stage to make sure all files where copied this is performed in excel
    1. get directory listing of copied files (dir/s/b %path% > list.txt) and dump into "recon" sheet and "recon" column in main sheet will indicate if any are missing with a 1
    2. rectify any problematic items
       
  5. run the tf-sync.ps1 script
    1. this will parse the directories that was created into the migration repository
      1. see mappings for structure
    2. this will create or update the migration repository in GIT
    3. an .gitignore gets injected this will make sure binaries are excluded
    4. subsequent runs if the repo already exists will create a feature branch for the main branches timestamped with the date is was ran
      ie: /feature/master-20220202-172700

Disable TFVC repository

After a repository has been moved to the staging environment and a call has been made to switch off the old repository we will put the old repository in read-only mode, the steps are:

  1. Notify the team and request that any pending changes need to be committed
  2. Do a final delta migration of the repository
  3. Disable inheritance on the repository
  4. Remove Contributors group
  5. Make sure the Readers group is present

 

Tags:
Created by Rudi Marais on 2022/02/02 10:14
    

Need help?

If you need help with XWiki you can contact: