a·gen·tic a·gil·i·ty

Branch madness!

Describes a complex source control issue in TFS involving branch mismanagement, its impact on merging, and step-by-step actions taken to restore proper branch structure.

Published on
3 minute read
Image
https://nkdagility.com/resources/s2fykp0ti2Y
Subscribe

Branch madness! I know that I have not been posting in a while, and I hope to remedy that. I have been working on getting our internal team up to speed on using TFS as a full ALM tool and not just for source control. I am getting a lot of resistance on creating work items ( as this is a PM’s job !) but we are making progress.

I was off for the last couple of days and came back to a WTF moment. I noticed, upon opening my source control, that there were two “Main” folders. “Main” and “MainPreR1”.

WTF?

Upon enquiring it turns out that a change had been made to “R1” (legitimate) to fix a Bug (loose definition, but a definition none the less). Then the “Main” folder had been renamed and a new “Main” folder branched from “R1” and 2 new Features branched from that, leaving all the other existing branches to fend for themselves.

WTFx2!

If you are not sure what I mean, then let me explain. In order to merge from “F1207” into “Main” you would need to first merge it with “MainPreR1”, then merge it with “R1”, then merge it into “Main”. And thus you have just contaminated “R1” with something that is not in “R1” but should be in “R2”. On top of this the other orphaned features can’t take advantage of new features in “R2” without contaminating “R1”… messy.

As you can see from the screenshot on the right it is now under control, but it took the perpetrator the better part of the morning to get it sorted, and the are still putting the finishing touches to it (It is a good thing the do not let us have guns here in the UK). If you are interested, here are the steps that were performed to sort out this problem.

  1. Zip all content in  “Fxx1” and “Fxx2”. To safeguard the dev work.
  2. Delete branch “Fxx1” and “Fxx2” from source control
  3. Check in everything…
  4. Delete “Main” from source control. coz it is the crap one
  5. Check in everything
  6. Rename “MainPreR1” to “Main”. Which is the way it should have been.
  7. Check In Everything… Now we are back where we started.
  8. Merge “R1” into “Main”. This is the action that should have occurred in the first place.
  9. Check in everything…
  10. Create Branches for “Fxx1” and “Fxx1”
  11. Check in everything…
  12. Check out “Fxx1” and “Fxx1”.
  13. Copy archived “Fxx1” and “Fxx2” over the top of new branch.
  14. Check in everything…

A long way for a short cut :)

Well, at least the lesson is learned…

Technorati Tags: ALM

Software Development
Subscribe

Related blog

No related videos found.

Connect with Martin Hinshelwood

If you've made it this far, it's worth connecting with our principal consultant and coach, Martin Hinshelwood, for a 30-minute 'ask me anything' call.

Our Happy Clients​

We partner with businesses across diverse industries, including finance, insurance, healthcare, pharmaceuticals, technology, engineering, transportation, hospitality, entertainment, legal, government, and military sectors.​

YearUp.org Logo

YearUp.org

Lean SA Logo

Lean SA

ProgramUtvikling Logo

ProgramUtvikling

Boxit Document Solutions Logo

Boxit Document Solutions

Emerson Process Management Logo

Emerson Process Management

Slicedbread Logo

Slicedbread

Slaughter and May Logo

Slaughter and May

Xceptor - Process and Data Automation Logo

Xceptor - Process and Data Automation

CR2

Trayport Logo

Trayport

Brandes Investment Partners L.P. Logo

Brandes Investment Partners L.P.

Workday Logo

Workday

Big Data for Humans Logo

Big Data for Humans

Genus Breeding Ltd Logo

Genus Breeding Ltd

Lockheed Martin Logo

Lockheed Martin

DFDS Logo

DFDS

Alignment Healthcare Logo

Alignment Healthcare

Boeing Logo

Boeing

Nottingham County Council Logo

Nottingham County Council

Department of Work and Pensions (UK) Logo

Department of Work and Pensions (UK)

Royal Air Force Logo

Royal Air Force

Ghana Police Service Logo

Ghana Police Service

Washington Department of Transport Logo

Washington Department of Transport

Washington Department of Enterprise Services Logo

Washington Department of Enterprise Services

ProgramUtvikling Logo

ProgramUtvikling

Deliotte Logo

Deliotte

ALS Life Sciences Logo

ALS Life Sciences

Brandes Investment Partners L.P. Logo

Brandes Investment Partners L.P.

Flowmaster (a Mentor Graphics Company) Logo

Flowmaster (a Mentor Graphics Company)

Healthgrades Logo

Healthgrades