Changes between Initial Version and Version 1 of SvnOverview


Ignore:
Timestamp:
02/12/07 01:01:00 (17 years ago)
Author:
arango
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SvnOverview

    v1 v1  
     1== Introduction to Subversion (svn) ==
     2
     3Subversion ('''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''', use the code, making modifications as needed, then may push their changes back (again using the client) to the repository on hosted-projects.
     4
     5Below 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.
     6
     7'''Conceptual model'''
     8
     9 * A svn server holds one or more code repositories
     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 each change 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 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 ROMS Sediment Transport model code:
     17 {{{
     18     http://svn1.hosted-projects.com/cmgsoft/roms_sed
     19}}}
     20
     21'''Using Subversion'''
     22
     23To 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 * {{{   svn action from to {optional_qualifiers}}}}
     25To 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}}}
     27
     28You 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].
     29
     30Several 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'''[wiki:TortoiseHelp Help on using TortoiseSVN, a GUI (subversion) client for PC]'''
     34
     35'''[wiki:SmartsvnHelp Help on using SmartSVN a java based multi-platform GUI (subversion) client]'''
     36
     37----
     38
     39'''Important Subversion Terms'''
     40
     41   * '''''Checkout''' = download a NEW project from the repository (do this once)''
     42   * '''''Update''' = get the most recent changes to a project from the repository (only possible after intial checkout)''
     43   * '''''Commit''' = send your changes to the project repository''
     44
     45'''Access'''
     46
     47 * Anyone should be able to view the contents of the repository, look at this wiki and view the tickets.
     48 * A username and password are required to put your changes back into the repository.
     49 * To work with data from a repository, you "checkout" a version.
     50 * You can check out the most recent version or a specific release, and either the entire repository, or just certain subdirectories.
     51 * Checking a project out makes a copy of the most recent version on the client requesting checkout
     52 * Svn suggests only checking out into an empty directory
     53
     54'''What you get'''
     55
     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 * Trunk is the main area for development, and unless otherwise instructed, work with the code in trunk
     58 * Tags will contain stable versions if they exist
     59 * Branches will have offshoots implementing new functionality- develop in the branch, then merge back into the trunk
     60 
     61'''Work flow'''
     62
     63 * Start each session with update:
     64 * Modify and debug the code locally
     65 * When you’re done with changes, commit changes to the repository
     66 * This will cause the version number to be updated at the repository
     67 * repeat
     68
     69'''Conflict resolution'''
     70
     71 * Svn uses copy, modify, merge as it’s operational model
     72 * 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 diff finds the conflicts
     74 *  Right click !TortoiseSvn, and try merge and/or blame to deal with conflicts
     75
     76
     77Proceed on to the [wiki:SvnTutorial].