VSTS, Visual Studio, VS2010,
buy corel draw 12 cheap flash cs4 after effects system requirements where to buy windows xp license buy pagemaker software buy flash cs3 buy streets & trips 2010 buy maya 2010 buy windows 7 pro 64 bit buy microsoft outlook 2007 product key windows 7 ultimate pricing windows 7 home premium best buy buy adobe acrobat 9 pro extended microsoft windows vista ultimate with sp2 (32bit) where to buy microsoft frontpage ms office enterprise 2007 price where can i buy cubase sx3 buy onenote online buy autocad architecture buy visual studio 2003 autocad electrical pricing buy premiere pro cs3 adobe production premium mac download adobe after effects cs4 mac corel photoimpact x3 download download adobe premiere elements 7 buy quicken 2010 premier buy contribute cs3 purchase windows vista steinberg nuendo download cheap quickbooks software purchase photoshop elements 7 buy outlook 2007 cheap after effects demo windows vista home basic iso download autocad electrical 2009 corel video studio 12 download buy vista business upgrade nuendo 4 price quicken 2010 pricing buy quicken 2010 deluxe download adobe dreamweaver cs3 buy expression studio 3 buy windows xp license online adobe premiere pro cs4 download buy autocad lt autodesk mechanical desktop 2009 download windows datacenter license cost cheap windows vista ultimate autocad 3ds max 2009 buy visio 2002 norton 360 price comparison purchase windows 7 business buy windows vista home premium 64 bit encarta premium 2009 download ms works download microsoft office 2003 best buy download font folio 11 buy onenote 2007 buy wordperfect 11 buy microsoft money 2006 windows 7 ultimate oem pricing buy windows vista business 32 bit cheap illustrator cs3 autodesk lustre buy buy microsoft project 2000 adobe premiere pro cs3 torrent buy windows 7 home premium full version buy microsoft office 2003 download buy windows 7 pro 64 buy powerpoint 2007 only buy vista ultimate online windows 7 ultimate 64 bit price download adobe after effects cs3 adobe dreamweaver cs4 discount windows 7 cost too much buy autocad architecture 2010 buy adobe contribute mac purchase microsoft office 2003 professional corel draw x4 download buy visual studio 2008 license excel 2003 price cheapest windows 7 ultimate buy windows 2008 datacenter adobe cs3 master download buy adobe flash 8 windows xp sp3 iso buy windows vista ultimate cheap adobe illustrator cs2 download cheap autocad 2009 software buy vista premium buy photoimpact x3 adobe acrobat 9 oem buy cs4 dreamweaver adobe soundbooth cs4 download buy microsoft streets and trips 2009 autocad 2010 system requirements 3ds max design price buy microsoft outlook 2007 only buy microsoft sql server 2008 zonealarm antivirus 8 torrent download indesign for mac windows datacenter 2008 licensing autodesk 3ds max design price buy presenter buy 3ds max cheap buy autocad 2010 lt buy powerpoint 2003 online buy microsoft office 2003 student ms visio 2007 price cheapest windows 7 ultimate oem buy excel 2003 online symantec pcanywhere download buy maya 2009 unlimited cheap access 2007 buy office 2003 cheap adobe dreamweaver sale download streets and trips 2009 dreamweaver mac trial corel draw x4 discount cheap indesign cs3 navisworks price cubase 4 download buy mappoint 2006 download adobe illustrator cs2 autodesk lustre pricing after effects mac demo buy office 2008 download windows vista download iso adobe framemaker price microsoft excel 2003 download indesign software download windows 2008 server pricing download autosketch 10 adobe after effects mac download pcanywhere pricing buy vista home premium oem windows 2008 standard r2 64 bit windows 7 professional buy ms office 2003 pro master collection cs4 system requirements buy dreamweaver cs4 mac buy norton 360 v3 microsoft works download microsoft office 2008 discount buy cubase 5 dongle buy microsoft access 2003 download buy windows 7 student windows 7 ultimate sale price buy adobe flash for mac buy microsoft word 2007 download download cubase 5 full cheap windows 7 professional buy windows 7 ultimate 64 bit buy photoshop elements 7 cheap windows 7 professional oem pricing buy symantec ghost buy adobe flash mac download 3ds max design 2009 autocad inventor lt suite 2010 cheap powerpoint software buy adobe illustrator student windows 2003 enterprise license cost maya price 2009 cheapest norton 360 3.0 buy adobe audition 2.0 windows 7 pro sale download microsoft office 2003 professional edition buy autocad electrical cheap buy adobe photoshop for mac purchase windows vista online buy windows 7 home premium retail buy wavelab microsoft mappoint europe 2004 buy microsoft office product key download microsoft digital image suite 2006 corel software for mac purchase quickbooks buy visual studio 2008 standard how to get photoshop for cheap 3ds max pricing how to buy powerpoint 2003 buy adobe flash player 10 adobe cs4 for mac download autocad inventor professional suite 2010 download wavelab 6 buy windows 7 license corel draw mac version adobe robohelp 8 download adobe after effects cs3 price download wavelab windows 2003 datacenter edition adobe contribute cs3 download microsoft money 2007 home & business windows xp price best buy price windows 7 ultimate buy cubase sx3 cheap autocad 2009 cubase 5 buy online autodesk autosketch price where to buy adobe premiere pro cs3 dreamweaver mac oem buy photoshop elements buy visual studio 2008 windows 7 ultimate 64 bit best price windows 7 ultimate purchase adobe indesign cs3 cheap adobe creative suite 4 master collection download buy quickbooks pro 2010 windows 7 ultimate 64 bit iso download illustrator for mac windows vista cheapest price font folio 11 download purchase windows vista ultimate key quickbooks enterprise pricing download turbotax 2008 premier adobe cs4 web premium for mac windows xp buy cheap cheap windows xp os buy inventor 2009 buy access 2003 software turbotax pricing buy microsoft windows 7 home premium buy vista home premium product key microsoft encarta premium 2009 dvd microsoft digital image suite 2006 download buy autocad mechanical 2009 windows 7 pro cheapest price buy windows vista 32 bit cubase 4 cost download corel draw 10 framemaker download microsoft works 9 download download adobe illustrator cs4 adobe creative suite 4 web premium download how to buy windows 7 64 bit download streets and trips 2007 windows vista business 64 bit sp2 adobe after effects cs3 for mac dreamweaver mac cs4 windows 7 64 bit best price vista 64 bit buy buy framemaker adobe photoshop best price buy powerpoint only windows vista home premium download how much does microsoft works cost download adobe premiere pro cs3 windows 7 pro 64 bit price buy adobe premiere pro for mac adobe acrobat prices buy windows 7 starter windows 2008 server purchase buy adobe creative suite 3 master collection autodesk maya 2009 price painter x for mac quickbooks enterprise 9.0 download download soundbooth cs4 download quickbooks premier 2007 buy windows xp sp3 professional buy office 2008 for mac product key cheap acrobat 9 disable norton 360 buy lightroom 2.5 cs4 master collection download buy office cheap download microsoft office 2010 buy access 2007 online windows 7 home premium cheapest price purchase vista upgrade adobe cs4 mac price cs3 production premium mac buy powerpoint download cheap windows 7 ultimate retail cheap windows 7 ultimate key buy photoshop lightroom 2 windows xp cheap price norton ghost 12 activation key cheap adobe premiere pro cs4 autosketch 9 download adobe pagemaker price windows 7 pro cheapest microsoft office 2003 best price turbotax deluxe 2009 price cheap windows 7 oem adobe dreamweaver cs3 download microsoft onenote price download adobe soundbooth cs4 adobe illustrator 10 download buy office onenote 2007 corel for mac download adobe suite cs3 price purchase windows 7 ultimate key windows 2008 datacenter cost buy windows 7 64 bit oem microsoft visio 2007 pro adobe contribute trial buy quickbooks pro 2009 buy microsoft office 2010 windows 7 pro 64 bit download adobe indesign cs4 windows full version download after effects cs4 buy adobe after effects cs3 download cs3 design premium cheap windows 7 ultimate download microsoft word 2007 download full version ms streets and trips 2008 download adobe photoshop cs4 extended mac download windows 7 home premium sale buy ms powerpoint windows 7 buy download how to buy windows vista product key buy autocad cheap vista business cheap buy sql server 2008 enterprise edition windows 7 buy license buy ms works microsoft visio 2007 prices buy autosketch 9 buy turbotax 2006 download adobe contribute cs4 windows vista ultimate best buy microsoft windows 7 professional 64-bit oem get adobe premiere pro cs3 discount microsoft office 2003 autodesk architecture 2009 windows 7 ultimate cost buy photoshop cs3 quickbooks enterprise 9.0 price buy after effects cs4 mac purchase windows vista download buy acrobat professional 9 autodesk lustre 2010 price buy vista get windows 7 buy windows 7 home premium cheap windows 7 64 bit discount adobe pagemaker buy buy ms access 2003 illustrator download cs3 autodesk 3ds max design 2010 download cheap windows 7 for students download autocad electrical download inventor lt 2010 quicken rental property manager 2010 adobe contribute cs4 mac price buy windows xp with sp2 windows 7 pro 64 bit oem purchase vista online windows 7 ultimate licensing adobe flash cs4 buy adobe illustrator cs3 direct download

Branching Strategies

By Jeff Levinson • on December 5, 2007

Any and all comments are welcome regarding this series of posts (okay, you can comment on other posts too). We woul appreciate any feedback pointing out alternatives to these strategies, whether they helped you or not and maybe your experiences dealing with branching strategies. This series of posts will cover all of the major patterns and how to handle branching and merging for all of the situations we can think of! If you think of any more, please let us know. 

Branch By Release 

In the first on a series of posts regarding branching strategies, I’m going to start off with the ’super’ pattern (why I call it a ’super’ pattern is discussed at the end of the post) – Branch By Release. What does the Branch by Release pattern look like and why use it? The figure below shows the pattern and maps out the usage for it (double-click the image to enlarge it).

BranchByRelease

Figure 1 – Branch by Release, basic pattern

This pattern is most useful when you are supporting a single version of an application (say a website for example). It can also be used for multiple version support but that can get fairly complicated when you get into branching for isolation, and long running features that may take several versions to implement.

The basic structure as shown in the figure is to build and when you are ready for test, create a new active branch for development and release the code on the “parent” branch (I put parent in quotes because even though it is the parent, branch relationships are generally bi-directional and so this designation is for a frame of reference only). While code is in production you can make fixes to it even while the next version is under development. When the fix has been implemented, simply merge down from production to the active branch.

This is perhaps the simplest of all branching and merge patterns. The reason why this is frequently unsuitable for complex branching and merging, as noted above, are when frequent, temporary branches or long term branches are needed that may span releases. While you can use this pattern for those types of requirements, by itself, it does not offer support for complex scenarios without a lot of extra work.

Dealing with Bugs 

Now that you’ve seen the basics, how do you deal with bugs? There are two scenarios for fixing bugs – when one occurs in code under test and when one occurs in code in production. These two scenarios are represented in Figures 2 and 3 respectively.

BranchByRelease_BugInTest                              BranchByRelease_BugInProd

Figure 2  - Bug in Test                        Figure 3 – Bug in Prod

A bug that is found in Test is the simplest example because you can simply make the fix in test and merge it down to the active branch for the next release and then the fix is in both versions.

A bug found in Production is a little bit more involved – but not much more. If at all possible, see if the users can wait until the next release is out – that way you don’t have to mess with Production and you can follow the pattern for fixing the bug in test. If the users absolutely need it now (or the code under test is due to be released too far in the future) you can fix and test the bug using the code in production and merge the changes down to the code that is under test and then to the active dev branch.

The next question to be addressed is what to do with the test environments. If you have the luxury of multiple test environments, you can simply test the production changes in a separate test environment. If you only have one test environment, you must stop the current round of tests (for Release 2 in Figure 3 above), release the code fixes for production into test and then release to production. At that point you need to merge the changes from production (Rel 1) down into Release 2. Then re-release the code from the Release 2 branch into the Test environment. Once those tests have passed, merge the changes from the Release 2 branch down to the active development branch for the next release.

Common Code 

 The last item to consider is common code. There are two options for dealing with common code. The first is to have the common code on its’ own branch and to simply reference the project containing the common code (i.e. never deal with the branch directly, just code on your local machine that you retrieved from this branch). This presents LOTS of problems. The biggest is that the common code can change from under you – maybe even daily. And if you manage to overcome this problem you have to deal with synchronizing releases which can also be problematic. So you might be thinking, “Jeff, why don’t I just reference the dll’s from the most current release of the common code?” Well, you can do that under a certain circumstance. That is – the dll’s must also be in version control (i.e. please don’t reference the common code by using a dll found on a server share somewhere – you are just asking for pain when that dll gets “suddenly” updated out from under you). The other issue is that you cannot really update the common code, if needed, without seriously ticking off the people who own that code – maybe they’re more friendly in your organization when you introduce code changes that they weren’t aware of…

But what if you are going to need the latest release of the common code and YOU want to choose when to get a new version? That leads to the second option – branch the common code into your active dev branch (Figure 4).

 BranchByRelease_CommonCode

Figure 4 – Common Code

This allows you to do two things: 1) You can actually change the common code without screwing up the common code project (don’t do this unless you plan out with the common code owners how to version this and get your changes back into the main common code branch) and 2) You can perform updates on the branched common code (i.e. merge down from the common code dev branch (or, preferrably the QA branch) to your active dev branch) when you feel like the common code is stable enough for you to use. This elimintes the problem of the code changing out from under you. There is one drawback to this approach – once you do the first branch from the common code to your branch and then you branch from say Release 1 to Release 2 there is no longer a relationship between your branch of the common code and the main branch. In TFS you can solve this problem by performing a baseless merge between your new branch of common code and the main branch of common code which will create a relationship between the branches.

Pros and Cons

So when should you use this pattern and when should you avoid it? 

Pros 

  • This is the simplest model to use
  • It’s a great choice for single release web applications
  • You use the same structure for hot fixes and maintenance releases
  • There is a minimal amount of branching

Cons

  • Not as flexible as other patterns
  • More difficult to manage multiple releases (more merges are required depending on how many versions you support and they get more difficult as you move along)
  • Because file history needs to be traced back to the previous branch, it takes more work to trace

Final Thoughts

At the beginning of this post I mentioned that I classified this as a super pattern. There are many several other major patterns available – branch by quality (Prod/QA/Dev), feature branches, and release by manifest. The reason why this particular pattern gets the designation of a super pattern is because it can be the top level when used in combination with other branching patterns (yes, you can combine patterns which will be discussed in a later post – but it can get very, very complicated). So, for example, you may use this branch by release strategy and for each release you may have a series of features that are broken up into their own branches. You may decide for each feature to have a Dev and QA branch (the ‘Prod’ branch in this case would be the main branch for the entire release). However, I can’t think of a good situation in which you would ever use this as a sub-pattern for one of the other major patterns.

Comments

Trackbacks

Leave a Comment

You must be logged in to post a comment.