Tuesday, November 21, 2017

TFS - ReParenting a Branch.

Here is how you can do Reparenting for TFS branch. 
Scenario: Before 
  • Development
    • Release 1
      • Release 2
Scenario: After
  • Development
    • Release 1
    • Release 2

Now you want to bring Release 2 under development, then you need to do re parenting. 


  1. Create Release 2 branch from Release  
  2. Get the latest version of Release 2 locally. 
  3. Get the latest version of Development branch locally. 
  4. Add location of tf command (generally “C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE”) to your PATH.
  5. Open command prompt and go to the working folder of Release 2. If you don’t do this then you may get error related to workspace while running commands mentioned below.
  6. Now you need to perform a baseless merge from the development branch to Release 2. Make sure it is recursive. (why recursive ? because if  you don’t do it recursive then while merging your changes from Release2 to development, and if you do it from the folder level, it would show you Release 1 as the parent. In that case, you should always start your merge by right clicking on the “Release 2” level. Which is annoying. So go for recursive. )
  7. Here is the command.
  8. Tf merge /baseless /recursive “$/Development” “$/Development/Release2”
  9. This command may take a while depending on the size of your source code.
  10. Once done, it will show you resolve conflict window. In my case, I don’t want changes from development branch to be merged into Release 2, so I choose Keep destination files. And resolve the conflict for all. 
  11. Once done, you will have a big chunk of files ready for check in in Release 2 branch. 
  12. Go ahead and check in. 
  13. Once check in is done, right click on Release 2 and then select ReParenting (under branch and merging menu)
  14. You should be able to see Development branch there. 
  15. Select it. And hit ok. 
  16. All done. Release 2 has now Development as its parent. 
Thanks

Wednesday, November 8, 2017

Admin Consent for an App

Please go to the website 
and login the application by your directory global administrator account one time. The permission will delegate to the end user.

More information – Admin Consent