Introduction to SVN(subversion)

/*By Jiangong SUN*/

SVN (Subversion)

Orgnization: 
- trunk
- branches
- tags

Trunk would be the main body of development, originating from the the start of the project until the present. When you have an application with several versions.

Branch will be a copy of code derived from a certain point in the trunk that is used for applying major changes to the code while preserving the integrity of the code in the trunk. If the major changes work according to plan, they are usually merged back into the trunk.

Tags
: Internally, SVN branches and SVN tags are the same thing, but conceptually, they differ a lot. SVN tag is: a snapshot with a name of a specific revision of the trunk, or of a branch. It stocks the stable version of the application. When you finish your development of branch, and you merge it into trunk, and you make a tag for the trunk. The tag is what you released for the application.

Scenario :
For example: If you are the development team of mozilla, you will use branches for firefox 3(ff3), firefox 4(ff4), firefox 5(ff5) and firefox 6(ff6).

( Merge, tag )When you need to fix an bug for firefox version 3, you need to work in the branch ff3 and correct it. And then you need to merge ff3 to trunk. And then make a tag in trunk. And release the tag.

( Switch )When you need to fix an bug for firefox version 4, you need to swtich the trunk the current version 4. Whe you finish your correction in ff4, you will merge it into current trunk. And then make a tag and release it.

( Checkout )For development use, you need to know the url of the svn server, and firstly make a checkout of a branch. It means you get a working copy of a version in the branch.

( Commit, rollback ) When you finish your development, you need to commit it to the svn server for uploading your changes. The svn server will mark it as an revision. You can rollback to this version someday.

( Update ) When you work in a development team, you will always update your solution because your colleagues also commit their corrections. You get the latest version of your application when you update.

( Export ) When you make a clear solution without svn tags, you need export.

( Import ) You need to correct a bug for maintenance purpose, you need to get the tag version of an application, and then work on it. You import the new version of application with your changes in tags. Of course this version is not versioned.

( Conflict ) When you and your colleagues work in a file at the same time. He commited his changes firstly. You will find the conflicts when you update your solution. You need to show the changes and conserve the right changes between you both. And then right click the file to resolve conflicts.

你可能感兴趣的:(Introduction to SVN(subversion))