Changes between Version 3 and Version 4 of SvnOverview
- Timestamp:
- 02/12/07 01:40:01 (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SvnOverview
v3 v4 1 1 == Introduction to Subversion (svn) == 2 2 3 Subversion ( '''svn''') is a tool for managing software development that keeps track of who modified what and allows returning to a previous version if changes don't do what was expected. All the ROMS/TOMS files are stored on '''www.myroms.org/svn''' in a repository named '''Models'''. Users can check out the most recent version to their local machines with a '''svn client'''. Since this is the official version of the code, only the developers are allowed to change this repository. However, users can have their own repository on their local computer.3 Subversion ([http://subversion.tigris.org/ svn]) is a tool for managing software development that keeps track of who modified what and allows returning to a previous version if changes don't do what was expected. All the ROMS/TOMS files are stored on '''www.myroms.org/svn''' in a repository named '''Models'''. Users can check out the most recent version to their local machines with a '''svn client'''. Since this is the official version of the code, only the developers are allowed to change this repository. However, users can have their own repository on their local computer. 4 4 5 5 Below is a general description of how subversion works. Please look at the [http://svnbook.red-bean.com svn book] for more detailed information. Brief instructions for using two GUI clients (one for PC and one for Linux) we've tried are included. … … 7 7 '''Conceptual model''' 8 8 9 * A '''svn server''' holds one or more code repositories 9 * A '''svn server''' holds one or more code repositories. 10 10 * A repository consists of all versions of the program/document under development, plus info on who made changes, and when. 11 * A '''svn client''' may access files in the repository using '''svn client''' software 12 * Each eachchange to the repository the revision number to be incremented by 1.13 * if file_a is changed, then file_b, then file_a, then file_c, then file_b, at the end, the repository is a revision 5.14 * the revision history of file_a has 1,3; file_b has 2,5 and file_c has 415 * revisions in a repository are sequential, but the revision history of individual files may skip some numbers.16 * The repository referred to below contains the ROMS Sediment Transport model code:11 * A '''svn client''' may access files in the repository using '''svn client''' software like [http://esvn.umputun.com/ eSVN], [http://rapidsvn.tigris.org/ RapidSVN], [http://tortoisesvn.tigris.org/ TortoiseSVN], etc. 12 * Each change to the repository the revision number to be incremented by 1. 13 * If '''file_a''' is changed and commited, then '''file_b''', then '''file_a''', then '''file_c''', then '''file_b''', at the end, the repository is a revision 5. 14 * The revision history of '''file_a''' has 1, 3; '''file_b''' has 2, 5 and '''file_c''' has 4. 15 * Revisions in a repository are sequential, but the revision history of individual files may skip some numbers. 16 * The repository referred to below contains the tagged and latest version of ROMS/TOMS Framework: 17 17 {{{ 18 http:// svn1.hosted-projects.com/cmgsoft/roms_sed18 http://www.myroms.org/svn/Models 19 19 }}} 20 20 … … 23 23 To enable use of subversion, client software must be installed on the local machine. Most Linuxes come with subversion (the command name is svn), so shell commands may be used without installing additional software. The general form of subversion commands is: 24 24 * {{{ svn action from to {optional_qualifiers}}}} 25 To check-out the files from the ROMS_SED repository, enter: 26 * {{{ svn checkout http://svn1.hosted-projects.com/cmgsoft/roms_sed /home/mydir/code/roms_sed}}} 25 To check-out the files from the ROMS repository trunk (latest version), enter: 26 * {{{ svn checkout http://www.myroms.org/svn/Models/trunk MyDir}}} 27 To check-out the files from the ROMS repository branches, tags, and trunk, enter: 28 * {{{ svn checkout http://www.myroms.org/svn/Models MyDir}}} 27 29 28 You only check out once, after that, a hidden directory called .svn exists to keep track of the source, destination and a bunch of other information. So to commit your changes back to the repository, cd into a local dir under subversion control (/home/mydir/code/roms_sed or below) and enter: {{{svn commit}}}.For more detail on command line use and syntax, see the [http://svnbook.red-bean.com Svn book].30 You only check out once, after that, a hidden directory called '''.svn''' exists to keep track of the source, destination and a bunch of other information. For more detail on command line use and syntax, see the [http://svnbook.red-bean.com Svn book]. 29 31 30 32 Several GUI front-ends to subversion exist, allowing the user can have visual prompts to help them manage their files. Two free GUI clients we've tried are described in the links below: 31 32 33 33 34 '''[wiki:TortoiseHelp Help on using TortoiseSVN, a GUI (subversion) client for PC]''' … … 54 55 '''What you get''' 55 56 56 * If you choose to checkout the project into my_roms_sed, you’ll find trunk, branches, and tags directories created in your local directory.57 * If you choose to checkout the project into '''MyDir''' using the second command above, you'll find trunk, branches, and tags directories created in your local directory. Otherwise, if you only checkout the trunk (first command above) the files and sub-directories in the trunk will be created only. 57 58 * Trunk is the main area for development, and unless otherwise instructed, work with the code in trunk 58 59 * Tags will contain stable versions if they exist … … 61 62 '''Work flow''' 62 63 63 * Start each session with update :64 * Start each session with update 64 65 * Modify and debug the code locally 65 66 * When you’re done with changes, commit changes to the repository 66 67 * This will cause the version number to be updated at the repository 67 * repeat68 * Repeat 68 69 69 70 '''Conflict resolution''' 70 71 71 * Svn uses copy, modify, merge as it’s operational model72 * It is possible for two people to change the same chunk of code at similar times, and when the commit happens, this will be detected, and the users will have to interact to resolve the conflicts 73 * A process similar to difffinds the conflicts74 * 72 * '''svn''' uses copy, modify, merge as it’s operational model. 73 * It is possible for two people to change the same chunk of code at similar times, and when the commit happens, this will be detected, and the users will have to interact to resolve the conflicts. 74 * A process similar to '''diff''' finds the conflicts 75 * Right click !TortoiseSvn, and try merge and/or blame to deal with conflicts 75 76 76 77