Search code examples
gitazuretfstfvc

TFS Merging Conflicts on TFVS


I am using Azure & TFS or tfvs and managing different branches for a long time and I love to use this but with passage of time I thing that CVCS (Centralized Version Control System) have some major drawbacks which I am facing now a days in an organization.

Real live scenario and hope you are also working and facing them,

I have a single project called 'ProjA' and 5 developers are working on the 'ProjA', 2 new requirements came from customer to add new functionalities on login page

1) Task 1- Forgot Username

2) Task 2- Forgot Password

Task1 assigned to Developer1 and Task2 assigned to Developer2 both developers starts there work on same resource means same login.aspx and .cs page

Task1 completed and checkIn in to the repository and moved into the QA branch and published on an QA environment, after day Developer2 finshed his task and checkin his code while checkin he will first take the fresh cope(getlatest) of the page from the server, merge his changes after verification and checkIn the code, move to QA branch, means now tfvs have both developers changesets and changes,

Now Client says that only Task2 (Forgot Password) will be move to Production and for the time being Task1 (Forgot Username) holds on,

Problem Statement: Now How I can move only Developer2 changes into the production and eliminate/skip the Developer1 changes, Keep in mind that both developers worked on same code resource?

This can be done by manually commenting the code of developer1 but its not reliable solution and not for a big and highly available projects


Solution

  • I think, there is two aspects:

    1. Your development process. You should plan/approve your next release with your customer (product owner). If customer says I want only Task 2- Forgot Password, you merge only Task 2 to your QA branch. If customer says I want only Task 1, Task 2, you merge both tasks to your QA branch. If your customer changed his mind, that will costs additional money to align your release (cut ready features). So, do not merge not approved features to QA )).
    2. Technical. With TFVC, you can try the following
      1. Rollback your QA branch to the previous state (before Task1) and repeat merge Task 2.
      2. Create another QA branch from production and do the baseless merge operation from Task 2 branch. Maybe this tool will help you: MultiMerge.2017, MultiMerge.2019.