'Merging' new solution

This is probably a bit of a n00b question, but here we go:

We have three branches, a Production (trunk) branch, a QA (testing) branch, and a Development branch for day to day work. When the time comes to merge changes up to the QA branch, if I just want to merge my one new solution, how do I do it without merging the whole base folder

For example, I add a solution that has the .sln file in $/Project/AppName, one project sitting in $/Project/AppName/src/MyNewSolution, and another project in $/Project/AppName/test/MyNewSolutionTest.

In the above example, I can't merge the solution file and then the new folders (MyNewSolution & MyNewSolutionTest) as they do not have branch links to QA. Does this mean I have to branch the solution file and the two folders up to QA and then up to production If so, will this knacker up the existing branching strategy that is going in the opposite direction



Answer this question

'Merging' new solution

  • Peter Chan

    I don't think a baseless merge is appropriate. He's merging between directly related branches (Dev -> QA). If he needed to merge from Dev -> Production then /baseless might be the best workaround, but even so should be approached with caution.

    If the AppName folder doesn't contain any files you want to exclude, you should be able to merge it directly. tf merge $/Project/Dev/AppName $/Project/QA/AppName /r

    If the AppName folder contains unrelated items, and you want to make sure you only merge items that are part of the solution, then you'll need to use labels. Create a label that points to every item in the solution, then merge using that label.


  • developer00x

    > But presumably TFSSC wouldn't let me merge the directory, as it isn't branched and doesn't exist in the QA branch

    Sure it will. If you add an item in the source and then merge to target, Merge will pend the branches for you. Branch is the most common & straightforward operation for Merge to pend (perhaps second only to edits).

    It may not work from the UI if you rightclick the new folder itself, since the UI relies on QueryBranches() to generate the dropdown list. That's why I suggested the command line. If you want to stick with the UI, you could rightclick the parent folder and then merge only the changesets that applied to your solution. I think that's the better solution anyway -- it's safer. (cherry-picking subdirectories can lead to broken builds if you forget about a dependency outside the subdir, whereas cherry-picking changesets should be safe so long as every changeset is buildable)


  • Mark_Davies

    But presumably TFSSC wouldn't let me merge the directory, as it isn't branched and doesn't exist in the QA branch
  • Khass

    OK, thanks. I guess it was because I was trying to do it from the GUI, which doesn't work if the file / directory does not already have a branch link. I'll look into the command line way of doing it.

    Thanks for your help.


  • Ramesh Jha

    There is merge option called "baseless merge"; that basically allows one to merge items that has no immediate branch relationship between them.

    Have a look at the following discussion; I believe it has all the answers and pointers you need.

    Regards, Eugene



  • SineStar

    Well, I understand that the hierarchy does not allow merges because there are no immediate relationships between the branches.

    It may well be that the hierarchy can be redisigned (surely dev't is related to QA), but if not I do not see any workaround besides baseless merge.

    Regards, Eugene



  • 'Merging' new solution