Changes between Version 7 and Version 8 of doc/tec/developerrules/svnbranch


Ignore:
Timestamp:
Nov 12, 2018 1:44:59 PM (6 years ago)
Author:
westbrink
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • doc/tec/developerrules/svnbranch

    v7 v8  
    1212  * You can browse your branch under https://palm.muk.uni-hannover.de/trac/browser/palm/branches
    1313
    14 == (2 a) Checkout of local branch copy ==
     14
     15== (2) Use of local branch copy==
     16
     17=== (2 a) Checkout of local branch copy ===
    1518
    1619* {{{cd $HOME/palm/branches/ }}}
    1720* {{{ svn checkout --username <your PALM username> https://palm.muk.uni-hannover.de/svn/palm/branches/<feature_name>}}}
    1821
    19 == (2 b) Update of local branch copy ==
     22=== (2 b) Update of local branch copy ===
    2023
    2124If the local branch copy already exists, and you would like to update it with a newer svn revision of this branch:
     
    4144           An alternative to this approach is to __use symbolic links__ to link {{{.../trunk to .../branches/<feature_name>}}}. \\ This way you don't have to keep changing the {{{PATH/PALM_BIN}}} variables, and you run PALM out of your current_version directory, \\ with your {{{SCRIPTS/SOURCE}}} files from {{{~/palm/branches/<feature_name>}}}
    4245
    43 == (3 a) How to use git for local code versioning ==
     46=== (3 a) How to use git for local code versioning ===
    4447
    4548(These are only brief hints, please refer to the git manual for more detailed help)
     
    5861|||| Please '''DO NOT''' mix up synchronization and other code changes in one commit, because when \\ doing  a diff of two branch revisions it‘s very difficult to find out the actual changes in the branch. ||
    5962
    60 == (4 a) Merge repository branch into local branch copy ==
     63=== (4 a) Merge repository branch into local branch copy ===
    6164
    62651. {{{cd $HOME/palm/branches/<feature_name>}}} \\
     
    7477     [[span(style=color: #FF0000, __'''Note:'''__ It might be wise to put a copy of your modified files somewhere else before you do the merge.)]]
    7578
    76 == (4 b) Merge PALM main repository revision (trunk) into local branch copy ==
     79=== (4 b) Merge PALM main repository revision (trunk) into local branch copy ===
    7780
    78811. {{{cd $HOME/palm/branches/<feature_name>}}}
     
    8790    [[span(style=color: #FF0000, __'''Note:'''__ It might be wise to put a copy of your modified files somewhere else before you do the merge.)]]
    8891
    89 == (4 c) Resolving conflicts in a merge ==
     92=== (4 c) Resolving conflicts in a merge ===
    9093
    9194You will find following set of files in case of a conflict, e.g.
     
    97100To resolve the conflict, we recommend to take file {{{average_3d_data.f90}}}, and manually work through the conflicted lines, \\ which look something like this:
    98101[[Image(test.png)]]
     102You could also use kdiff3 of files „left“ and „right“ to visualize the changes at conflicted lines.
     103
     104'''The final merged content must be in file {{{average_3d_data.f90}}}''' (without [[span(style=color: blue, suffix)]]) \\ '''Now continue with step {{{svn resolved}}} in Chapter 4a or 4b!'''
     105
     106== (5) Commit changes to repository branch ==
     107 
     1081. Add a brief summary of your changes into the header of the file you modified under „Current revisions:“. \\ Add <your PALM username>, and repeat this for every commit of this specific file, e.g.:\\
     109   {{{! Current revisions:}}}\\
     110   {{{! - - - - - - - - - }}}\\
     111   {{{! Change of variable name pt to vpt (<your PALM username>)}}}\\
     112   {{{! Bugfix in shortwave radiation calculation (<your PALM username>)}}}
     1132. {{{ cd ~/palm/branches/<feature_name>/SOURCE }}}
     1143. {{{svn status}}} \\ (to see which files were earmarked, e.g. as '''M'''odified, '''D'''eleted/'''A'''dded from/to svn repository\\ '''[[span(style=color: red, ATTENTION:)]] all listed files will be commited in step 4)'''
     1154. {{{svn commit -m 'Branch <feature_name>: short comment on changes' <file1.f90> <file2.f90>}}}
     1165. Now you should be able to see your commited files, if you browse your branch under\\ https://palm.muk.uni-hannover.de/trac/browser/palm/branches
     117 
     118|||| While committing to your branch, please make sure that the revision comments remain under „Current revisions“. \\ Do not use the script document_changes, nor manually copy the revision comment to the „Former revisions“ section.\\ This makes merging to the palm4u branch or to the trunk more difficult. ||
     119
     120=== (5 a) Commit changes to repository branch → How to add new files (I) ===
     121
     122(For how to structure new SOURCE files, please take a look at the template_newmodule_mod_v3.f90 in the Downloads section of the MOSAIK page).\\
     123In order to use the “keyword substitution” feature of subversion, a newly created file must contain the Id-keyword.
     124
     125{{{! Former revisions:}}}\\
     126{{{! -----------------}}}\\
     127{{{! $Id$}}}
     128
     129The new file has to be earmarked in order to be added to the svn repository with the next commit. \\This marking is done by
     130
     131{{{svn add newfile.f90}}}
     132
     133Substitution of the „Id“-keyword has to be activated with svn-command
     134
     135{{{svn propset svn:keywords "Id" newfile.f90}}}
     136
     137=== (5 a) Commit changes to repository branch → How to add new files (II) ===
     138
     139After the commit (see Chapter 5), subversion will automatically substitute the “Id” string with the current timestamp:
     140
     141{{{! Former revisions:}}}\\
     142{{{! -----------------}}}\\
     143{{{! $Id: newfile.f90 1683 2015-10-07 23:57:51Z raasch $}}}
     144
     145 == (6) Some additional commands ==
     146 
     147(For details about the commands, see http://svnbook.red-bean.com/de/1.7/index.html)
     148
     149* Deleting files or directories from the svn repository\\
     150  {{{svn delete file/directory}}} \\
     151  (Perform command in local branch copy to mark files/directories for deletion. \\During the commit, the marked files/directories will be deleted in the svn branch)
     152* Checking, which files have been modified in your local branch copy with respect to the checked-out branch revision\\ (see http://svnbook.red-bean.com/de/1.7/svn.ref.svn.c.status.html)
     153   {{{svn status <feature_name>}}}
     154* Printing revision information about the local branch copy
     155   {{{svn info <feature_name>}}}
     156
     157