Changes between Version 3 and Version 4 of doc/tec/developerrules/svnbranch


Ignore:
Timestamp:
Nov 12, 2018 11:47:24 AM (6 years ago)
Author:
westbrink
Comment:

--

Legend:

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

    v3 v4  
    55* Repository branch (only for admins)
    66  * @palm server: permissions to be set in /palmdata/conf/svn_authz file
    7   * svn copy https://palm.muk.uni-hannover.de/svn/palm/trunk https://palm.muk.uni-hannover.de/svn/palm/branches/<feature_name> -m "Branch for <feature_name> created."
     7  * svn copy https://palm.muk.uni-hannover.de/svn/palm/trunk https://palm.muk.uni-hannover.de/svn/palm/branches/<feature_name>\\ -m "Branch for <feature_name> created."
    88  * (rename: svn move <path to old branch> <path to new branch> -m „...“)
    99
     
    3434* __...'''git''' branch copy__ \\ To avoid too numerous commits to the svn repository branch, local versioning could be done using git (→ follow steps on next slide)
    3535
    36 __'''NOTE'''__: As you know, in order to compile and run PALM, the {{{PATH}}} and {{{PALM_BIN}}} variables need to be set in your shell environment (e.g. {{{.profile}}} or {{{.bashrc}}}) as in this example:
     36__'''NOTE'''__: As you know, in order to compile and run PALM, the {{{PATH}}} and {{{PALM_BIN}}} variables need to be set in your shell environment \\ (e.g. {{{.profile}}} or {{{.bashrc}}}) as in this example:
    3737            |||| {{{ #PALM SCRIPTS}}} \\ {{{export PATH=$HOME/palm/current_version/trunk/SCRIPTS:$PATH }}}\\ {{{export PALM_BIN=$HOME/palm/current_version/trunk/SCRIPTS }}} ||
    3838
    39            These __paths need to be adjusted__ when you run PALM out of your {{{~/palm/branches/<feature_name>}}} directory! \\ You might have to newly login to your system in order to activate these changes. You can check the paths by typing {{{echo $PATH}}} or {{{echo $PALM_BIN}}} to your terminal.
     39           These __paths need to be adjusted__ when you run PALM out of your {{{~/palm/branches/<feature_name>}}} directory! \\ You might have to newly login to your system in order to activate these changes. \\ You can check the paths by typing {{{echo $PATH}}} or {{{echo $PALM_BIN}}} to your terminal.
    4040
    41            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>}}}
     41           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>}}}
     42
     43== (3 a) How to use git for local code versioning ==
     44
     45(These are only brief hints, please refer to the git manual for more detailed help)
     46* Create local repository \\ {{{mkdir -p ~/git_palm/<feature_name>}}}
     47* Rebase from svn feature repository
     48* Development under git (refer to manual)
     49* [[span(style=color: #FF0000, Manual copying of git SOURCE to svn SOURCE (<feature_name>) necessary )]]
     50  * [[span(style=color: #FF0000,  Why? → Due to PALM-politics of date-stamping of revision comments (git cannot do that) )]]
     51  * [[span(style=color: #FF0000, Note: svn and git copy should have the same svn revision number r####  )]]
     52* Continue with svn procedure (see next slide)
     53
     54== (4) Synchronizing local branch copy with svn branch or trunk ==
     55
     56It is wise to '''frequently''' synchronize your local branch copy with the latest svn revision of your branch (see Chap. 4a) and/or  with the trunk (see Chap. 4b)\\ to stay up-to-date. Chap. 4a might become necessary if more than one developer simultaneously work on the same feature branch.
     57
     58|||| 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. ||
     59
     60== (4 a) Merge repository branch into local branch copy ==
     61
     621. {{{cd $HOME/palm/branches/<feature_name>}}} \\
     632. {{{svn update}}} (takes care of merge here)
     643. During update/merge, svn will print an alert in case the same line/block \\ of code has been modified by the different developers. As an example:
     65
     66   {{{Conflict discovered in file 'palm.f90'.}}} \\
     67   {{{Select:}}} 
     68   {{{(p) postpone, (df) show diff, (e) edit file, (m) merge, (mc) my side of conflict,}}} \\{{{(tc) their side of conflict, (s) show all options:}}}
     69
     70   We recommend to {{{select (p)ostpone}}} for all emerging conflicts, and after that, manually check/merge the contents of these files. \\ '''(Details in Chapter 4c)'''
     71
     724. {{{svn resolved any_file.f90}}}
     735. {{{svn commit}}} '''(Details in Chapter 5)'''
     74     [[span(style=color: #FF0000, __'''Note:'''__ It might be wise to put a copy of your modified files somewhere else before you do the merge.)]]
    4275
    4376