Changes between Initial Version and Version 1 of SvnTutorial


Ignore:
Timestamp:
02/12/07 03:24:16 (17 years ago)
Author:
arango
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SvnTutorial

    v1 v1  
     1== svn Tutorial ==
     2
     3In this tutorial, you will learn how to download the ROMS/TOMS source code and create and modify your own branch.
     4
     5In the following examples, the username is bubba.
     6
     7To proceed, you will need to know your username and password which should have received via e-mail from hosted-projects.
     8
     9== Check to Make Sure You Can See the Repository ==
     10
     11The easiest way to view a repository is to simply look at it in a web browser.  Enter the URL of the repository (and your username and password when prompted if the site is protected), and start looking.  This is also a good way to see individual files in the repository without actually downloading them.
     12
     13If you are using TortoiseSVN, right-click on a directory and choose '''Repo-browser'''.
     14
     15Enter the URL
     16{{{
     17http://www.myroms.org/svn/Models/
     18}}}
     19
     20Now you should be able to look at the '''branches''' (currently, none), '''tags''', and '''trunk'''. You can also navigate the repository with a web browser, but cannot do any of the version control stuff that follows.
     21
     22== Checkout a Copy of the Trunk ==
     23This process brings a copy of main code from the repository to your computer and places it under svn control.[[BR]]
     24Make a directory...name it something meaningful to you, for example {{{bubba_roms_sed}}}[[BR]]
     25Right-click on the directory folder icon, and choose {{{SVN Checkout...}}}[[BR]]
     26URL of repository:[[BR]]
     27{{{https://svn1.hosted-projects.com/cmgsoft/roms_sed/trunk}}}[[BR]]
     28Checkout directory:[[BR]]
     29{{{bubba_roms_sed}}}[[BR]]
     30You should see a bunch of stuff stream by like:
     31{{{
     32Added: D:\crs\proj\Adriatic\bubba_roms_sed\ROMS 
     33Added: D:\crs\proj\Adriatic\bubba_roms_sed\ROMS\Tangent 
     34Added: D:\crs\proj\Adriatic\bubba_roms_sed\ROMS\Tangent\tl_rho_eos.F 
     35Added: D:\crs\proj\Adriatic\bubba_roms_sed\ROMS\Tangent\tl_uv3dmix.F 
     36Added: D:\crs\proj\Adriatic\bubba_roms_sed\ROMS\Tangent\tl_def_his.F 
     37Added: D:\crs\proj\Adriatic\bubba_roms_sed\ROMS\Tangent\tl_step2d.F 
     38...
     39Added: D:\crs\proj\Adriatic\bubba_roms_sed\Compilers\CYGWIN-g95.mk 
     40Added: D:\crs\proj\Adriatic\bubba_roms_sed\Compilers\OSF1-f90.mk 
     41Added: D:\crs\proj\Adriatic\bubba_roms_sed\Compilers\Darwin-ifort.mk 
     42Added: D:\crs\proj\Adriatic\bubba_roms_sed\Compilers\AIX-xlf.mk 
     43Added: D:\crs\proj\Adriatic\bubba_roms_sed\Compilers\SunOS-f95.mk 
     44Added: D:\crs\proj\Adriatic\bubba_roms_sed\makefile 
     45Completed: At revision: 243 
     46}}}
     47Click OK.
     48
     49If you are using svn from the command line, as you would on most unix style machines, check out the respository using the command:
     50{{{
     51svn co  https://svn1.hosted-projects.com/cmgsoft/roms_sed/trunk  buba_roms_sed
     52}}}
     53(See the footnote for correctly installing svn with ssl support on unix style machines below.)
     54
     55
     56== Create a Branch ==
     57You must use the exact branch name that was created for you by a [wiki:CSTM_Admins CSTM administrator]. If you are unsure of your branch name, check the [https://hosted-projects.com/dav/cmgsoft/nopp/contacts/cmgsoft_acl.txt Access Control List], searching for a line like:
     58{{{
     59[roms_sed:/branches/bubba_branch]
     60}}}
     61
     62In TortoiseSVN, choose {{{Branch/tag}}}. (To see this option in TortoiseSVN, you have to right-click on a directory that is under SVN control...but it does not have to be related to the project at hand).[[BR]]
     63From WC at URL:[[BR]]
     64{{{https://svn1.hosted-projects.com/cmgsoft/roms_sed/trunk}}}[[BR]]
     65to URL:[[BR]]
     66{{{https://svn1.hosted-projects.com/cmgsoft/roms_sed/branches/bubba_branch}}}[[BR]]
     67Click OK.[[BR]]
     68(stuff streams by...)
     69
     70The branch will exist in the repository...you can repeat the steps above to make a copy of the branch on your computer (but not in the same directory you made in the example above, because that contains a version of the trunk under SVN control).[[BR]]
     71
     72== Make Changes in Your Branch ==
     73You can make new files, change existing files, etc. Only existing files will automatically be under SVN control. To add new files, create them in a directory under SVN control (or copy them in from somewhere else).[[BR]]
     74Then you can right-click on the filename, and choose {{{Add...}}} under TortoiseSVN, or...[[BR]]
     75You will be given an opportunity later (see next step).[[BR]]
     76If you compile the code and generate a bunch of .f90 and .o files, or run the model and generate output, they will not be under SVN control unless you add them explicitly. That is usually what you want. (Storing output files here is probably a bad idea, because 1) they tend to be big and take a long time to tranfer to the repository 2) they are binary, so the tools used to compare them will not be useful, and 3) we don't have enough storage space at the repository.)
     77
     78== Commit Your Changes ==
     79Navigate to the top directory in your local copy of your branch, e.g., {{{../bubba_roms_sed}}} and right-click. Choose
     80{{{SVN Commit...}}}[[BR]]
     81Commit to:  ''{{{https://svn1.hosted-projects.com/cmgsoft/roms_sed/branches/bubba_branch}}}'' [[BR]]
     82Message:  ''(add a meaningful comment here)'' [[BR]]
     83Changes made:  ''(Will show files with changes)'' [[BR]]
     84If the {{{Show unversioned files}}} box is checked, you will see any files you added to the directory. This is your opportunity place them under SVN control. Say you made one named {{{foo}}} that you want to add...check it and[[BR]]
     85Click OK.
     86{{{
     87Adding: bubba_roms_sed\foo 
     88Sending content: bubba_roms_sed\foo 
     89Completed: At revision: 244 
     90}}}
     91
     92
     93== Work Cycle ==
     94You can Import this branch to another computer...that is the best way to synchronize, say, a desktop at work with a travelling laptop.[[BR]]
     95After that, the cycle is:[[BR]]
     96At the top local directory, right-click, and under TortoiseSVN {{{Check for modifications}}}. Click Check Repository.[[BR]]
     97Make changes.[[BR]]
     98{{{Check for modifications}}} or {{{SVN Update}}} (again..can't hurt).[[BR]]
     99Finally, {{{SVN Commit...}}}[[BR]]
     100
     101== Footnote on building svn on unix-like machines ==
     102On Unix style machines, you will need to have subversion installed.  You will typically want to build this from source, as you will want to compile with secure socket layers enabled (the binary versions of svn do not have this feature).  Find the source at {{{http://subversion.tigris.org/}}}.  Configure and make with
     103{{{./configure --with-ssl
     104make
     105sudo make install}}}
     106
     107
     108
     109
     110