Friday, 3 May 2013

Fixing bug in TBot user editor via Git merge of fix developed on another repo's branch

Here is an example of how I just created a HotFix branch to address an issue we want to push to our live servers asap, and how the fix was developed by Ian in one of this dev branches.

First I created HotFix Branch at a (freshly baked) local clone of the TeamMentor/Dev repository:

image

Then I reviewed the code from Ian’s branch I want to merge:

image

When happy with the changes, I used a git fetch to get the latest version of Ian’s fork of TeamMentor/Dev

image image

Followed by a $ git merge Dev_Ian/#437-Password-Expiry HotFix_3_3_1

image

Which did the merge with the TeamMentor/Dev master branch

A look at GitK confirms that there was only one commit added (the Ian’s ‘Date value being saved to database’)

image

At this stage if we look at Ian’s network map, we will see that this commit is not linked to another commit (i.e. is the last one of the #437-Password-Expiry branch

image

Next step is to quickly test if the feature is working ok.

This fix is for the Password expiry cannot be set from the main TM GUI issue  (i.e. make the ‘Account Expiration’ field editable).

So I opened an user's edit page

image

changed the expiration date:

image

Saved it


image

And confirmed that the user’s xml data was changed on the in-memory version of the user xml files:

image

and on the file system:

image

My final step is to push the HotFix branch into the live server:

image

Here are the commits in the new HotFix_3_3_1 branch (note the Ian’s ‘Date value being saved to database’ branch is now there)

image

And now Ian’s branch is connected with the new HotFix_3_3_1 branch:

image

same graph without the branch labels:

image
Post a Comment