Changes between Version 16 and Version 17 of SvnIntro


Ignore:
Timestamp:
01/11/07 04:53:36 (17 years ago)
Author:
Rich Signell
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SvnIntro

    v16 v17  
    7575
    7676
    77 == SVN Tutorial ==
    78 
    79 '''Creating a ROMS_Sed Branch'''
    80 
    81 Only an administrator can create a branch. Send an email to: etwomey@usgs.gov stating that you would like to be added to the roms_sed trac user group. Please include contact information and perferred username. '''If you are already registered for ROMS, please inlcude your ROMS username.''' Your SVN and ROMS usernames are to be the same to avoid confusion.
    82 
    83 '''Check to Make Sure You Can See the Repository'''
    84 You will need to know your username and password...you should have gotten an e-mail from hosted-projects.
    85 Right-click and choose {{{Repo-browser}}} from TortoiseSVN.[[BR]]
    86 Enter the URL[https://svn1.hosted-projects.com/cmgsoft/roms_sed/ https://svn1.hosted-projects.com/cmgsoft/roms_sed/][[BR]]
    87 Now you should be able to look at the trunk and maybe some branches (depending on ACL), but bubba_branch won't be there yet.
    88 (You can also navigate the repository with a browser, but cannot do any of the version control stuff that follows).
    89 
    90 '''Import a Copy of the Trunk'''
    91 This process brings a copy of main code from the repository to your computer and places it under SVN control.[[BR]]
    92 Make a directory...name it something meaningful to you, for example {{{bubba_roms_sed}}}[[BR]]
    93 Right-click on the directory folder icon, and choose {{{SVN Checkout...}}}[[BR]]
    94 URL of repository:[[BR]]
    95 {{{https://svn1.hosted-projects.com/cmgsoft/roms_sed/trunk}}}[[BR]]
    96 Checkout directory:[[BR]]
    97 {{{bubba_roms_sed}}}[[BR]]
    98 You should see a bunch of stuff stream by like:
    99 {{{
    100 Added: D:\crs\proj\Adriatic\bubba_roms_sed\ROMS 
    101 Added: D:\crs\proj\Adriatic\bubba_roms_sed\ROMS\Tangent 
    102 Added: D:\crs\proj\Adriatic\bubba_roms_sed\ROMS\Tangent\tl_rho_eos.F 
    103 Added: D:\crs\proj\Adriatic\bubba_roms_sed\ROMS\Tangent\tl_uv3dmix.F 
    104 Added: D:\crs\proj\Adriatic\bubba_roms_sed\ROMS\Tangent\tl_def_his.F 
    105 Added: D:\crs\proj\Adriatic\bubba_roms_sed\ROMS\Tangent\tl_step2d.F 
    106 ...
    107 Added: D:\crs\proj\Adriatic\bubba_roms_sed\Compilers\CYGWIN-g95.mk 
    108 Added: D:\crs\proj\Adriatic\bubba_roms_sed\Compilers\OSF1-f90.mk 
    109 Added: D:\crs\proj\Adriatic\bubba_roms_sed\Compilers\Darwin-ifort.mk 
    110 Added: D:\crs\proj\Adriatic\bubba_roms_sed\Compilers\AIX-xlf.mk 
    111 Added: D:\crs\proj\Adriatic\bubba_roms_sed\Compilers\SunOS-f95.mk 
    112 Added: D:\crs\proj\Adriatic\bubba_roms_sed\makefile 
    113 Completed: At revision: 243 
    114 }}}
    115 Click OK.
    116 
    117 '''Create a Branch'''
    118 In 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]]
    119 From WC at URL:[[BR]]
    120 {{{https://svn1.hosted-projects.com/cmgsoft/roms_sed/trunk}}}[[BR]]
    121 to URL:[[BR]]
    122 {{{https://svn1.hosted-projects.com/cmgsoft/roms_sed/branches/bubba_branch}}}[[BR]]
    123 Click OK.[[BR]]
    124 (stuff streams by...)
    125 
    126 The 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]]
    127 
    128 '''Make Changes in Your Branch'''
    129 You 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]]
    130 Then you can right-click on the filename, and choose {{{Add...}}} under TortoiseSVN, or...[[BR]]
    131 You will be given an opportunity later (see next step).[[BR]]
    132 If 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.)
    133 
    134 '''Commit Your Changes'''
    135 Navigate to the top directory in your local copy of your branch, e.g., {{{../bubba_roms_sed}}} and right-click. Choose
    136 {{{SVN Commit...}}}[[BR]]
    137 Commit to:  ''{{{https://svn1.hosted-projects.com/cmgsoft/roms_sed/branches/bubba_branch}}}'' [[BR]]
    138 Message:  ''(add a meaningful comment here)'' [[BR]]
    139 Changes made:  ''(Will show files with changes)'' [[BR]]
    140 If 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]]
    141 Click OK.
    142 {{{
    143 Adding: bubba_roms_sed\foo 
    144 Sending content: bubba_roms_sed\foo 
    145 Completed: At revision: 244 
    146 }}}
    147 
    148 
    149 '''Work Cycle'''
    150 You can Import this branch to another computer...that is the best way to synchronize, say, a desktop at work with a travelling laptop.[[BR]]
    151 After that, the cycle is:[[BR]]
    152 At the top local directory, right-click, and under TortoiseSVN {{{Check for modifications}}}. Click Check Repository.[[BR]]
    153 Make changes.[[BR]]
    154 {{{Check for modifications}}} or {{{SVN Update}}} (again..can't hurt).[[BR]]
    155 Finally, {{{SVN Commit...}}}[[BR]]
    156 
    157 
    158 '''Notes'''
    159 
    160  * Everything happens at the folder level- Svn doesn’t operate on single files.
    161  * Use svn tools to copy files into or our of a svn directory so the change can be tracked- the change will propagate to the repository on the next commit
    162  * The .svn directory in each project main directory keeps track of the repository information, so you don’t have to say where to put commits, it puts them where it got them.
    163 
    164 
    165 [wiki:WikiStart return] to the roms_sed start page