I know this is not relate开发者_如何学Pythond to coding. But this is important for coding, so posting here.
What does Trunk, Branch mean.
How does a release process go on in SVN?
I have 4 layers .
- developer machine code.
- stage02
- stage03
- production
what should be made the trunk?
Generally speaking, workflow is usually customized for specific team / project.
I worked with the following workflow:
Trunk is a place for main product trends. It contains currently developed version or product.
Branches are created for all released versions of a product. Hotfixes and minor updates are done in branches (and then built, tested and delivered to end-users). Similar fixes are committed to trunk, as well (or merged from branch altogether later).
Sometimes separate branches are created for big features, when feature development is done by group of developers, and/or may significantly affect other developers. Advantage of this approach is questionable, and depends on specific situation, because merge procedure in SVN is sometimes expensive.
Developer's machine keeps only working copy, with version developer is currently working on. Developer makes updates frequently, and fixes all conflicts. Also, developer makes commits with ready-to-use code frequently.
Product is built and tested frequently - this allows to find newly introduced bugs as soon as possible.
Merge procedure is rather expensive in SVN. Further workflow complication may result in painful merging. BTW, some teams cope with this successfully.
I'd recommend to take a look at distributed version control systems, as well. This post by Joel Spolsky provides great description of their main advantages: http://www.joelonsoftware.com/items/2010/03/17.html
Answering to your particular question, I may suggest the following (BTW, I can't see the whole development procedure, so this may be non-applicable):
Active development is performed in trunk. Trunk version is installed on test servers.
When product is accepted for release, new branch is created. This version is installed on production server.
Further product development is made in trunk, as well.
Hotfixes are made in corresponding branch. Branch version is tested on test servers and then delivered to production.
The trunk usually (but not always) represents the mainline active code base to which everyone contributes during the normal course of development. Branches are created by forking off trunk (or another branch). Subversion's support for this is not great (even after fixing some major headaches in recent years) and most teams avoid it, which unfortunately means that they are usually trapped on trunk for all their work.
One practical approach you can use is to create a release branch whenever you release. This allows the team to continue evolving the product on trunk while support crews can fix bugs with the released product on the new branch. This generally works OK because there isn't much merge activity between trunk and the current release branch, and when there is, it is rarely structural in nature (moves, renames, etc., have a horrible effect on branching and merging in Subversion).
精彩评论