VSTS, Visual Studio, VS2010,
buy windows 7 ultimate cheap download illustrator for mac buy microsoft streets and trips 2010 microsoft money 2007 deluxe download windows 7 professional 32-bit oem download wavelab 6 adobe cs3 for mac buy windows xp pro buy photoshop cs4 extended windows vista business 64 bit iso buy contribute cs4 after effects mac demo buy microsoft office project professional 2003 streets and trips 2009 download buy illustrator for mac purchase office 2003 product key purchase microsoft office 2003 download microsoft visio 2007 pro purchase adobe lightroom buy cs3 dreamweaver buy autodesk 3ds max cheap cs4 production premium mac microsoft office 2010 price buy adobe captivate 4 buy vista ultimate online photoshop elements download microsoft windows 7 home premium best buy buy visio 2003 professional autodesk 3ds max 2010 system requirements buy windows 7 oem ultimate torrent buy autodesk inventor 2008 windows 7 home premium 64 bit download where can i buy powerpoint 2003 buy cubase le 4 buy outlook express 2007 microsoft windows 7 ultimate best price norton 360 discount purchase windows 7 home premium should i buy windows 7 now acrobat pricing ms streets and trips 2009 download buy microsoft expression studio 3 windows vista home basic 32 bit download font folio 11 download adobe captivate pricing buy adobe photoshop mac buy visio 2002 adobe creative suite 4 production premium mac buy visual studio 2005 pro buy windows vista home basic product key microsoft onenote pricing windows 7 professional 64 bit price purchase microsoft vista download corel draw graphics suite x4 autosketch 9 download buy microsoft access 2003 photoshop cs3 price adobe cs4 production premium download buy outlook 2007 cheap buy windows 2003 enterprise edition microsoft office 2003 buy download buy microsoft office 2003 professional buy windows 7 digital copy how to buy adobe presenter cheap windows vista 64 bit microsoft works 9 download buy adobe photoshop for mac quickbooks enterprise 9.0 price adobe lightroom cheap adobe captivate oem corel draw mac version microsoft onenote price where to buy quickbooks enterprise buy microsoft access 2007 download buy photoshop cs4 student quicken rental property manager 2010 acrobat download 9 buy windows xp sp3 oem adobe indesign cs4 mac buy access 2007 only buy photoshop cs3 software after effects for mac autodesk navisworks download buy windows 7 premium buy corel dvd moviefactory 7 download cheap adobe cs4 mac windows 7 professional oem price buy ms project 2003 buy microsoft word 2007 software buy autosketch 9 autocad electrical 2010 trial illustrator for mac os x quicken 2010 price master collection cs4 student visio 2007 buy inventor professional 2010 download adobe cs3 web premium download purchase corel draw buy adobe photoshop cs3 extended buy adobe indesign cs3 adobe premiere pro mac buy microsoft office 2003 pro illustrator cs3 download cheapest windows xp professional microsoft office 2003 sale buy microsoft office enterprise 2007 microsoft windows 7 home premium 64 bit oem adobe acrobat prices buy corel video studio pro x2 norton ghost price windows 7 ultimate price uk buy frontpage 2002 microsoft office 2003 best buy autodesk inventor lt purchase acrobat 9 buy acrobat standard download autocad mechanical 2010 download autodesk maya adobe after effects demo windows xp sp3 download complete streets and trips 2010 price cheap acrobat professional cubase 5 cost windows vista home basic product key download dreamweaver cs4 buy windows vista home premium buy adobe acrobat 9 pro extended buy autodesk 3ds max design buy quicken online turbotax 2009 deals purchase visual studio 2008 professional buy photoshop for cheap cheapest windows 7 ultimate download encarta encyclopedia 2009 buy windows 7 ultimate license encarta 2009 full download dreamweaver mac cs4 buy microsoft excel online buy autocad lt 2010 buy access 2003 software download fireworks cs4 wavelab 6 price autodesk 3ds max price cheap vista business microsoft windows vista home premium with sp2 (64 bit) cheap windows 7 download download photoshop mac adobe soundbooth cs3 download buy encarta 2009 buy cs3 after effects cubase 4 price adobe captivate cheap download adobe contribute cs4 buy windows 7 half price buy office enterprise how to buy windows 7 64 bit cheapest microsoft office purchase windows 7 licence buy microsoft office for mac online buy autocad 2010 lt autodesk inventor professional 2008 download autocad electrical price windows 7 home premium oem price buy symantec antivirus microsoft windows 7 home premium buy download inventor lt 2010 adobe cs4 design premium mac download buy windows 7 64 bit online autodesk 3ds max design price microsoft encarta premium 2009 download microsoft office 2010 download adobe contribute cs3 download buy indesign cs2 windows 7 ultimate 32bit system requirements turbotax 2009 deluxe coupons download adobe cs4 design premium mac download streets and trips 2007 buy microsoft streets and trips 2009 encarta premium 2009 download buy quickbooks online adobe cs3 cheap mappoint 2009 european windows 7 ultimate 32bit trial microsoft office 2008 for mac license cheap windows 7 professional after effects for mac download cheap autocad software buy cs3 cheap adobe photoshop cs4 buy buy powerpoint 2007 only cheap windows 7 ultimate cheap illustrator cs4 buy windows 7 ultimate full download microsoft frontpage 2003 adobe presenter 7 download windows 7 home premium 32 bit oem buy 3ds max 9 microsoft money buy online microsoft office 2003 best price download wordperfect buy adobe fireworks cs4 download adobe premiere pro cs4 adobe illustrator mac download download microsoft mappoint 2009 buy ms office online purchase microsoft word download maya 2009 purchase ms office online inventor lt 2010 download adobe flash cs4 for mac download windows vista cheapest price download fireworks cs3 windows xp buy download adobe fireworks price buy windows 7 home basic buy windows 7 starter windows 7 professional price uk cs4 master collection download buy maya software coreldraw 11 for mac microsoft office enterprise 2007 price buy powerpoint only buy presenter buy adobe flash 8 how to get photoshop for cheap buy outlook 2007 only download autocad electrical 2008 buy windows 7 professional cheap autocad architecture download dreamweaver mac trial buy powerpoint 2007 download buy windows xp pro oem excel 2003 price order windows 7 ultimate download adobe audition 3 full version buy pagemaker 6.5 adobe robohelp 8 download cheap indesign cs3 cheap adobe photoshop elements 7 windows 7 ultimate 64 bit download buy acrobat professional 9 buy powerpoint 2003 download buy microsoft expression blend 3 visio 2007 download buy adobe master collection cs4 after effects cs4 for mac buy framemaker cheap norton ghost buy streets and trips 2010 buy flash cs3 autodesk autocad architecture 2010 download buy adobe acrobat 9 professional buy microsoft project 2007 adobe indesign cs3 cheap corel draw x4 full download buy adobe master collection cs3 download corel painter x mac purchase adobe after effects purchase adobe captivate 3 adobe robohelp download cubase sx3 price buy microsoft powerpoint adobe cs3 master collection system requirements turbotax premier discount buy photoimpact x3 microsoft money 2007 home & business microsoft windows vista home basic with sp2 (64 bit) buy adobe illustrator mac buy photoshop cheap microsoft expression download windows vista home basic license adobe production premium cs4 download cheap lightroom download adobe after effects cs3 autocad mechanical price buy vista home premium oem buy microsoft money online windows 7 ultimate 64 bit iso autocad inventor price purchase vista operating system illustrator cs2 download microsoft word 2007 product key buy mappoint 2010 buy lightroom download windows 7 home premium sale mappoint europe 2010 quicken rental property manager 2010 download download adobe audition 2.0 windows 7 professional 32 bit download autodesk inventor lt 2010 price adobe illustrator cs3 price download adobe captivate 3 purchase photoshop elements cheap adobe flash cs4 adobe illustrator cs3 sale windows 2008 server purchase buy windows 7 ultimate key cheap adobe illustrator cs4 buy wordperfect 11 buy 3ds max cheap download adobe creative suite 4 master collection buy cheap windows 7 ultimate buy windows 2008 server r2 steinberg cubase 5 price microsoft office 2003 buy product key download photoshop elements 6 windows vista premium download adobe premiere elements cheap turbo tax 2009 download buy adobe robohelp 8 dreamweaver mac system requirements microsoft windows 7 ultimate cheap buy norton 360 cheap microsoft access 2003 download buy premiere pro cs4 buy windows 7 cheap buy microsoft office 2003 for vista buy microsoft frontpage 2007 where to buy quicken 2010 buy adobe illustrator cs2 buy photoshop cs4 download microsoft expression buy windows 7 ultimate oem pricing coreldraw x4 mac windows 7 pro discount buy adobe indesign cs4 adobe after effects cs3 price download after effects cs4 portable buy adobe premiere pro cs4 purchase vista online buy quicken 2010 deluxe microsoft word 2007 price buy office 2003 key windows vista home premium download buy microsoft office 2003 student turbotax 2008 premier download buy adobe cs3 for mac windows 2003 enterprise license price microsoft visio 2003 price illustrator for mac buy vista premium pcanywhere download 12.5 expression studio price cheap adobe photoshop elements 8 purchase acrobat 8 buy windows 7 ultimate student buy adobe acrobat 9 standard windows 2008 server prices autodesk navisworks simulate 2009 cheap windows 7 home premium full version buy microsoft project professional 2007 windows 7 ultimate purchase buy adobe illustrator for mac powerpoint pricing steinberg nuendo 4 download windows 7 home premium full discount adobe cs4 design premium mac corel draw 12 mac purchase cubase 4 buy dreamweaver for mac windows 7 ultimate cheap buy dreamweaver cs3 3ds max design 2009 adobe cs4 design premium trial illustrator download cs3 purchase after effects microsoft excel 2007 download purchase corel draw 12 buy autocad 2009 visual studio 2008 download adobe indesign cs2 download buy windows 7 oem download microsoft office 2008 for mac purchase windows xp pro download autocad inventor professional suite 2010 coreldraw graphics suite x4 for mac corel draw cost download architecture software money plus home & business autocad electrical 2009 download buy word 2007 download windows 7 professional discount buy windows vista 32 bit buy windows 7 home premium adobe cs4 web premium download cheap windows 7 ultimate retail windows 7 best buy buy windows 7 oem cheap buy visio 2003 download corel dvd moviefactory 6 buy turbotax deluxe buy ms powerpoint buy cubase sx3 office 2003 for sale microsoft excel 2003 download adobe illustrator 10 download where to buy microsoft office cheap adobe illustrator cs4 sale when can i buy office 2010 download quicken 2010 microsoft office 2003 oem download buy microsoft project 2007 professional download adobe captivate 4 download corel video studio 11 powerpoint cheap microsoft visual studio 2008 professional adobe cs4 design premium price download autocad 2010 adobe production premium mac corel video studio pro x2 download adobe indesign cs3 mac dvd moviefactory 6 plus buy windows 7 pro oem adobe premiere pro cs4 download best buy photoshop windows 2008 standard license download corel draw 13 after effects student discount framemaker price windows 7 buy online download indesign software microsoft office 2003 full download buy sql server 2008 developer edition adobe premiere pro price wordperfect download corel software for mac buy illustrator cs2 buy adobe illustrator student buy microsoft access 97 download corel draw software steinberg cubase sx3 download purchase windows xp service pack 3 windows vista download iso buy microsoft expression studio 2 download navisworks download adobe creative suite 4 design premium where to buy turbotax 2008 turbotax discount coupon microsoft autoroute 2007 download adobe contribute cs4 mac price buy microsoft outlook 2007 download windows 2008 r2 dreamweaver mac cs3 windows 7 ultimate best buy buy adobe cs3 design premium visio 2007 pricing download turbotax 2008 premier windows 7 ultimate buy online photoshop cs3 pricing buy vista ultimate oem windows vista price best buy

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.