locked
TFS 2010 branch reparenting not recursive? RRS feed

  • Question

  • Hello

    I followed the procedure described in this article: http://www.richard-banks.org/2010/09/how-to-fix-branches-after-migration-to.html

    I had a branch structure like: Main -> Version1_1
    Then I created a branch from Version1_1, resulting in: Main -> Version1_1 -> Version1_2
    Finally I reparented the Version1_2 directly to Main, so I now have:
    Main -> Version1_1 and
    Main -> Version1_2

    But if I try to merge anything within the Version1_2 branch the merge dialog still only allows it to be done to Version1_1 and not Main.

    Does that mean that all merging happening between Main and Version1_2 is baseless?

    Thanks,
    Andrey

     

    Thursday, January 13, 2011 12:18 PM

Answers

  • Hi Andrey,

    I just tried as you mentioned, for me the merge dialog for Version1_2 shows Main branch in merge list. As you are doing re-parent operation, it should show up in merge wizard and it should be normal merge operation. 

    Thursday, January 13, 2011 5:57 PM

All replies

  • Hi Andrey,

    I just tried as you mentioned, for me the merge dialog for Version1_2 shows Main branch in merge list. As you are doing re-parent operation, it should show up in merge wizard and it should be normal merge operation. 

    Thursday, January 13, 2011 5:57 PM
  • Hi Jehan33,

    If I try to merge from the root (branch) folder I get Main on the merge list. But not for any sub-folder or file in the hierarchy. Only baseless merges happens deep down in the hierarchy.

    Thanks,

    Andrey

    Thursday, January 27, 2011 3:12 PM
  • I'm having the exact same issue.

    Personally, it doesn't make any sense to me to have a branch relationship that isn't recursive.  But this seems to be the case, and it seems to be next to useless/pointless.

    Basically, I reparented a branch, re-established a branch relationship that was lost in the migration from TFS2008 to TFS2010, and as long as you right-click and merge from the branch root, it works as expected.

    The problem is, we almost never do that.  We merge individual files, or folders... just the places where we were working and making changes.  The folders and files do NOT show the new branch relationship and do NOT allow you to merge them.

    Is there any way to fix this??  It seems completely ridiculous that the children aren't aware of the branches they're a part of... I can't think of a single use-case that makes any sense to me where a reparenting shouldn't be recursive.

    Help?

    Monday, November 21, 2011 8:37 PM
  • Even i am having the same issue ....

    The parent child relationship is not getting applied recursively. Any clues how this has been resolved.

    I am trying to do a baseless merge command on the sub directories too via a batch file which i know is not at all a good practice, but i have to keep it going. Please let me know if you have any solution. I am planning to apply this change by tomorrow EOD.

    SK

    Wednesday, May 23, 2012 12:49 AM
  • Hi Satesh,

    I was just looking at Richard's blog post (it's linked to in the first post of this thread), and I don't think I agree with his recommendation. Specifically, he's recommending that you go to the command line and use

    tf merge /baseless <trunk> <child branch>

    This will establish the merge relationship only for the root items of the branch. It seems to me that the consequence of doing it this way would be exactly what you're observing -- that if you go to child items and try to use the Merge Wizard to merge them, you won't be able to. I can't think of a scenario where this would be a good thing. The good news is you're not stuck. You can do a recursive baseless merge to establish the full merge relationship.

    tf merge /baseless /recursive <trunk> <child branch>

    This will create a conflict on every item that is different in <trunk> and <child branch>. You'll have to pick, in each case, whether you want to bring over the change from <trunk> to <child branch> (this would be the Take Theirs resolution), or keep the two branches different (this would be the Keep Yours resolution). You can also manually merge the two items in an external merge tool. If you have changes in <trunk> that you do want to bring over, but just not right now, then you should probably wait to do your baseless merge until you're ready to do a full integration from <trunk> to <child branch>.

    Thanks,
    P. Kelley

    • Proposed as answer by Satesh Kumar Wednesday, May 23, 2012 3:46 PM
    Wednesday, May 23, 2012 12:22 PM
  • Hi Anyone,

    I am currently working on Migrating a TFS 2010 project from one TFS server to another that  is in a different domain, using to TFS Integration tool.  Because of the limitation of the tool and some other constraints I am forced to migrate my repository branch by branch leaving me with the scenario of losing the hierarchy relationship between branches. 

    I found that using the recursive switch in my baseless merge will establish the relationship I desire between branch and subfolders/files.  However, I do not want those changes, resulting from the merge, to be part of the branch until they are ready for general release.  Will it be practical to perform the baseless merge recursively to establish the relationships I require, check-in my code, then Rollback those changes to restore the branch to its prior snapshot?  I found this to retain to relationships i need.  Can someone please comment on this or give me their opinion?

    Thanks,

    Valentino

    Thursday, July 26, 2012 2:22 PM