0

Been trying all I can think of for days to get this to work. Baseless merges, reparenting, branching and then reparenting.

I would like to reparent a branch to be the child of one of it's children and break the relationship between that branch and its parent.

In the image below, I would like to move Cassidy-Main and Bohem-Main to be a child of Cassidy-QA and Bohem-QA respectively. Then reparent Cassidy-QA and Bohem-QA to be children of Acme-QA.

Branch Hierarchy

Thanks in advance for any help/advice/solutions!

  • Have you figured out this issue after using a correct work space mapping in local? Moreover, to perform the baseless merge command, you need to run it in the right folder structure . Details please see my update answer. – PatrickLu-MSFT Feb 16 '17 at 02:38

2 Answers2

0

Once you have completed a baseless merge between where it was and where you want tit to be you will be able to reparent.

There is however no way to remove the old relationship.

  • Thanks for the comment. I have performed baseless merges in my attempts from Cassidy-QA to Cassidy-Main with no success. When I attempt a baseless merger from Cassidy-Main to Cassidy-QA, I get back the error that no appropriate mapping exists. – user1266896 Feb 14 '17 at 00:48
0

I have create a simple example for your reference:

The original branch hierarchy The original branch hierarchy

When you want to reparent Main-branch3.0-child2 to Main-branch2.0, you will get below screenshoot: enter image description here

To point to another parent, you need to perform a baseless merge. Do a baseless merge of the new parent to the target branch in cmd.

tf merge /recursive /baseless  "$/MyFirstProject/Main-branch3.0-child2" "$/MyFirstProject/Main-branch2.0"

After this, it will shows the current parent and the new parent. Select the new parent and press “Reparent”.

enter image description here


Update

Finally, I got what your described as below:

enter image description here


Update 2

To perform the baseless merge, first you need a right workspace mapping. And run the tf command in the local workspace:

enter image description here

For example: enter image description here

After that check in the changes in pending change page.

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • Thanks for the response Patrick and although it does come close it's not quite what I am looking for. In your example, I would like to make Main-branch3.0 a child of Main-branch3.0-child2. Then reparent Main-branch3.0-child2 to be a child of Main-branch. I have performed baseless merges in my attempts from Cassidy-QA to Cassidy-Main with no success. When I attempt a baseless merger from Cassidy-Main to Cassidy-QA, I get back the error that no appropriate mapping exists. – user1266896 Feb 14 '17 at 00:48
  • This shouldn't be a issue, have updated my screenshot of the example in the update. According to your error, seems there are no related **workspace mapping**. You must have a Workspace selected that has a mapping that includes the path server path when you perform `tf merge /baseless` command. Details take a look at this question: http://stackoverflow.com/questions/23264653/no-appropriate-mapping-exists-error-while-unshelving-shelveset-in-tfs – PatrickLu-MSFT Feb 14 '17 at 10:15