Merging TFVC branches through azure devops build pipelines

Copper Contributor

Hi ,

We are using TFS (or TFVC) as version control system in Azure Devops. I have a requirement like merging two branches of this version control system through Azure Devops build pipeline which is running on a self-hosted agent(i mean we installed agent on a server). Below is the code i have written to do this, but it is not working at all even the pipeline is running fine. What is the mistake i am doing here... Please guide.


Also, after merging i want to check-in the code in the target branch by linking to common work-item. how can I achieve this...

Set-Location "$(System.DefaultWorkingDirectory)"

Start-Process "tf.exe" "workspace /new /noprompt /collection:" -Wait


Start-Process "tf.exe" "merge $/CRS_ITP2_2_1/Test01 $/CRS_ITP2_2_1/Test02 /recursive /noprompt /loginType:OAuth /login:.,$(System.AccessToken)" -Wait


Start-Process "tf.exe" "checkin $/CRS_ITP2_2_1/Test02 /comment:Automerge /recursive /noprompt" -Wait

0 Replies