tags:

views:

136

answers:

3

I have the follow structure (example):

trunk/
branches/v1.0.0
branches/v1.0.1
tags/v1.0.0

My question is: The branch versions 1.0.0 and 1.0.1 have different implementations, and I need to fix a bug in version 1.0.0, how do I do this?

  • I need to fix the bug in branch 1.0.0 and copy after to a new branch and merge with trunk?
  • Or I need to copy to a new branch and fix the bug on new branch, and after merge with trunk?
  • Or I need to fix in trunk and after copy the trunk to a new branch?

PS: I can't publish the implementations of version 1.0.1. What I do?

Thank you.

+2  A: 

Fix it in the branch and if you need merge to trunk. Eventually it should also be in 1.0.1? Because if not, maybe you need a new project? Anyway, avoid opening too many branches, you will loose your hands there....

Dani
A: 

If the bug also exists on trunk then I usually try to fix it there first and merge my changes to any branch that I think needs to receive the fix.

Brian Gideon
+3  A: 
  1. Fix it on the branch since presumably the need is to deploy an updated version of the code from that branch.
  2. When the branch is fixed and deployed you need to tag that version as released - in case additional issues arise and so as you can see where you were.
  3. Now the question becomes do you need to integrate that fix into the trunk and/or any other branches and if so how. Broadly speaking I would expect to merge the change into the trunk and might expect to merge it into other branches (from the trunk, carefully) but the details will depend somewhat on how your are organising your development (whether you tend to work in branches or in the trunk for main development). It will also depend on whether the issue you've fixed in the branch is still an issue in the trunk (or other branches) as the code you're fixing may have been refactored or the bug addressed more comprehensively.
Murph