Welcome Guest, Not a member yet? Register   Sign In
Subversion Branching Guidance
#1

[eluser]Eric Barnes[/eluser]
Hi everyone. I have a quick subversion question.

I recently started using subversion and I have the main software release on the trunk. Lets say v2.0. When new releases are made I create a tag. When any bugs are submitted I fix them in the trunk.

Ok so far so good. Now I want to start working on v2.1 which will have a lot of little changes. Is it best to branch a 2.1 line. Or branch a 2.0 line.

My thoughts where if you branch a 2.1 line then later have bugs submitted on 2.0 they would need to be fixed in the trunk then merged to the branch. Where as if you had a 2.0 branch any changes would be merged to the trunk. Preventing duplicate merges.

What do you think is the best practice? What would you recommend?
#2

[eluser]Phil Sturgeon[/eluser]
I'd do all bug fixes in trunk then update my 2.1 branch with the trunk changes.

You don't need to keep 2.0 up to date, but if you do then create a new tag 2.0.1 which will have those bug fixes. Then 2.1 has all your major changes as well as the bug fixes, as does 2.0.1. ^_^
#3

[eluser]Skateinmars[/eluser]
Hello.

Personnaly, I would use tags for releases, which won't be changed, and create a '2' branch where I could merge selected changes from trunk.
Then a 2.x release would be a simple copy of the 2 branch to a tag.
#4

[eluser]Phil Sturgeon[/eluser]
Yea thats way better Smile

Edit: then again, you are just using branches/2 as a replacement for trunk. What do you do in trunk?
#5

[eluser]Skateinmars[/eluser]
We develop fixes for the 2.x versions (changes that will go to the 2 branch), and we also develop the features for the nexts versions (3.x).

It's a bit heavy and sometime we don't respect that Big Grin but it works fine, even if sometimes if think we could be more effencient with a distributed SCM (mercurial seems cool and simple).
#6

[eluser]Eric Barnes[/eluser]
Thanks for the comments guys. I guess it really just left up to each persons personal preference. Smile
#7

[eluser]neen[/eluser]
I think the best practice here is to do the following:

Branch your trunk into branches/2.0.x and branches/2.x

When you're working on a bugfix for 2.0.x, svn switch your trunk WC to branches/2.0.x or do all your dev in a WC of branches/2.0.x

When you're done, svn switch trunk back to trunk then svn merge your 2.0.x changes back into trunk, and tag it as the next version, then merge trunk back into 2.x




Theme © iAndrew 2016 - Forum software by © MyBB