Wiki source code of tfvc
Version 9.2 by Rudi Marais on 2023/05/22 23:50
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
9.1 | 1 | = Overview = |
| 2 | |||
| 3 | |||
| |
1.2 | 4 | 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. |
| 5 | |||
| |
2.1 | 6 | Feature branches can be merged back into master via a pull request and the feature branches that are not applicable anymore can be abandoned. |
| |
1.2 | 7 | |
| |
9.1 | 8 | = Migration process = |
| 9 | |||
| 10 | |||
| |
1.2 | 11 | The process to sync the tfvc to the git repo |
| 12 | |||
| 13 | 1. pull all the latest changes from TFVC via cli | ||
| |
2.3 | 14 | \\{{code language="powershell"}}tf vc workspace /new migration /collection:https://dev.azure.com/ebsphere |
| |
1.2 | 15 | mkdir c:\dev\src\migration |
| 16 | cd c:\dev\src\migration | ||
| 17 | tf vc get{{/code}} | ||
| 18 | |||
| 19 | 1. do an extract and dump into excel to generate the copy commands | ||
| |
7.1 | 20 | \\{{code language="PowerShell"}}forfiles /P C:\dev\src\migration /S /C "cmd /c echo @isdir;@ext;@path" >>list3.txt{{/code}} |
| |
6.1 | 21 | |
| |
1.2 | 22 | 1. execute copy commands from excel generation |
| |
2.2 | 23 | 11. this will split the source into master and feature branches |
| |
1.2 | 24 | |
| |
2.2 | 25 | 1. A recon step must be performed at this stage to make sure all files where copied this is performed in excel |
| |
2.3 | 26 | 11. 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 |
| 27 | 11. rectify any problematic items | ||
| |
2.2 | 28 | |
| |
1.2 | 29 | 1. run the [[tf-sync.ps1>>doc:.tf-sync.WebHome]] script |
| 30 | 11. this will parse the directories that was created into the migration repository | ||
| 31 | 111. see [[mappings >>doc:.mappings.WebHome]]for structure | ||
| |
4.1 | 32 | 11. this will create or update the migration repository in GIT |
| 33 | 11. an .gitignore gets injected this will make sure binaries are excluded | ||
| |
7.1 | 34 | 11. subsequent runs if the repo already exists will create a feature branch for the main branches timestamped with the date is was ran |
| |
8.1 | 35 | ie: /feature/master-20220202-172700 |
| |
9.1 | 36 | |
| 37 | |||
| 38 | = Disable TFVC repository = | ||
| 39 | |||
| 40 | 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: | ||
| 41 | |||
| 42 | 1. Notify the team and request that any pending changes need to be committed | ||
| 43 | 1. Do a final delta migration of the repository | ||
| 44 | 1. Disable inheritance on the repository | ||
| 45 | 1. Remove Contributors group | ||
| 46 | 1. Make sure the Readers group is present | ||
| 47 | |||
| 48 |