views:

154

answers:

4

Hi,

I am looking to set up our web application shop to start utilzing svn better. Currently we have programmers making changes into trunk which then directly affects production...

yes I know - terrible!

I want to set up seperate branches so that there is a branch that we use to make fixes. Then we can promote to the QA branch and then promote to the trunk/prod branch when all is well.

Problem is - I am more fancy using Tortoise SVN - so if someone is willing to help me structure this well and explain a good process from going from one step to another through tortoise - that would be awesome!

Thanks in advance -

+2  A: 

You can do that all with Tortoise - it uses the accepted practice where you'd have:

project/trunk
project/branches
project/tags

And issuing the various Tortoise commands (Tortoise > Branch) will put the files in the appropriate place in the repository. You do, however, have to manually setup your SVN tree as above. You can use the Tortoise Repository Explorer to do so ... or, somewhat more difficult, use the normal Tortoise functions to do so. Of course you could also do it using the command line. ">svn blah..."

xanadont
+2  A: 

Your setup could be:

/project/branches/development
/project/branches/test
/project/trunk/

Just branch trunk into both of those branches to start off. Now you have 3 copies of the current trunk. Developers can then work off the development branch. You can then merge revisions from development to test when they are ready to be tested. Verified revisions can be merged to trunk from the test branch.

Kevin Crowell
A: 

Can you change what your "production" uses? I guess you have a script that pulls from it and builds?

If you can change this then I suggest using tags for this.

project/trunk – The current in development version of the code. Nothing should be committed to the trunk unless it compiles.

project/branches/featurename – Various “in progress” features of the code. May not always be code that compiles.

project/tags/1.0 - Production worthy release

project/tags/latest - The latest production worthy release

You can then setup your build scripts to always pull from tags/latest and then whenever you tag the trunk for release you then re-tag that release to "latest"

Robin Day
+1  A: 

G'day,

I would highly recommend that you get a copy of the excellent book "Pragmatic Version Control: Using Subversion" (sanitised Amazon link) which covers this topic along with many others.

It does so in terms of what you want to do, rather than be simply a mechanical recitation of the features.

HTH

'Avahappy,

BTW I've just seen that the second edition of this book is out.

Rob Wells