How to handle this situation in Version Control System better?

42 Views Asked by At

I have this thinking when I am dealing with a project, which is provided to many clients with one web software bundle, and every client could have some new change requests on it, so I will have to use one repo(or branch) for one client, so I can keep updating it for their own requests. Then as long as there are more and more clients, I will have to maintain as many copies as they are, it become exhausting...

They are two types of changes in the software, one is system bug, which will be fixed among all copies, and one is change per request from different client, and it should be updated only for their copy.

I am currently using Win-merge to compare the difference between each copy with the base copy when I tried to update the system bug fix, and I am thinking if we can do:

  • Save a base codebase for the software
  • If there is any change in one file for one client change spec only, we only need to save the changed file for him, and all other files still share with the base

So every time if there is a bug found in base code, I will only need to fix the bug and all codes will be updated as well, and if the bug is inside one changed file for specific client only, I will have to do Win-merge too, but still will save time..

I want to know if this is able to achieve in some VCS, like git or SVN? Or with merge and any feature of VCS currently we had, is there a better solution for this situation?

2

There are 2 best solutions below

0
On BEST ANSWER
  1. You can use Subversion having the thunk be the main code (or special branch for main unstable code and trunk for common QA'ed) and then branches for each client ...

  2. You can use Mercurial, in two ways:

    • Multi-branches workflow (same as Git|SVN) - classic named branches or bookmark-type anonymous
    • Single branch mode (having default branch be the main code with permanent changesets) with MQ Extension, there each customer-specific changes is single monolithic independent MQ-patch (no manual merges of global changes, only update of patches in case of conflicts with changed baseline)
0
On

You can use git having the master branch be the main code and then sub branches for each client.

Go into each client branch to do the one off changes and keep that separate.

Then for the big changes go into say a develop branch to test and complete your code QA merge the develop branch into master and then you can make a git command alias to run all the

git checkout ClientBranch1 && git merge master && git push git checkout ClientBranch2 && git merge master && git push ...