Changes between Version 11 and Version 12 of Documentation/UserGuide/svnBranchePerso


Ignore:
Timestamp:
2020-02-28T11:42:14+01:00 (4 years ago)
Author:
luyssaert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/UserGuide/svnBranchePerso

    v11 v12  
    1818 
    1919== Contact the right persons to deal with the tasks that require administrator rights == 
    20 First, ask for a login on svn and a personal folder on the svn repository. As this task requires administrator rights for the svn server, only few persons can help you with this task. If you want a quick answers send your request to the orchidee-help mailing list (https://forge.ipsl.jussieu.fr/orchidee/wiki/GroupActivities/Contact). The three administrators (Josefine, Fabienne and Nicolas Vuichard) will all receive this email. This is also a good time to decide whether you want to receive an alert every time someone of the ORCHIDEE-team has committed changes to svn. Note that you will receive emails of changes made to the trunk, all branches and personal copies. Expect tens of emails per week. By default you will NOT receive alerts, tell the administrators if you want to subscribe for svn-alerts.  
     20First, ask for a login on svn, a personal folder on the svn repository, and a login to forge which is the website that comes with the svn server. The login on svn is essential, a login to forge is optional but could come in handy (see below). As this task requires administrator rights for the svn server, only few persons can help you with this task. If you want a quick answers send your request to the orchidee-help mailing list (https://forge.ipsl.jussieu.fr/orchidee/wiki/GroupActivities/Contact). The three administrators (Josefine, Fabienne and Nicolas Vuichard) will all receive this email. This is also a good time to decide whether you want to receive an alert every time someone of the ORCHIDEE-team has committed changes to svn. Note that you will receive emails of changes made to the trunk, all branches and personal copies. Expect tens of emails per week. By default you will NOT receive alerts, tell the administrators if you want to subscribe for svn-alerts.  
    2121 
    2222The svn administrators will create a folder for your branch or personal copy in the svn server using following syntax (example for a personal copy): 
     
    2525}}} 
    2626 
    27 Subsequently, the administrator will set read and write access for this new branch in the svn/conf/authz file at forge. Note that When a branch or personal copy has been created, its folder will be empty. 
     27Subsequently, the administrator will set read and write access for this new branch in the svn/conf/authz file at forge and will subscribe you to the svn-alert emails if you indicated you wish so. 
    2828 
    2929 
    30 == benefit from svn to save and share your developments == 
     30== Start your own branch or personal copy == 
     31Note that when a branch or personal copy has been created, its folder will be empty. Your branch or copy will begin its life as a copy of the trunk or another branch. So your first task is to copy ORCHIDEE source code in your personal svn directory. Note that you can have several versions of ORCHIDEE in your folder.   
    3132 
    32 Here is some short help on how to create and commit in a personal directory or a branche.  
    33  
    34  
    35  
    36  
    37  
    38 == Commit in your folder == 
    39 In your personal svn directory you can now commit source code and scripts. You should not commit netcdf files, executables or other big files. You can have several versions in your folder. [[BR]] 
    40  
    41 For exemple you want to copy revision number X from the ORCHIDEE trunk into your remote personal folder :  
     33For example, you want to copy revision number X from the ORCHIDEE trunk into your personal folder :  
    4234{{{ 
    4335svn cp -r X svn://forge.ipsl.jussieu.fr/orchidee/trunk/ORCHIDEE svn://forge.ipsl.jussieu.fr/orchidee/perso/firstname.lastname/ORCHIDEE_mytrunk 
    4436}}} 
    4537 
    46 For exemple you want to copy the tag 1.9.6 into your remote personal folder : 
     38For example you want to copy the tag 1.9.6 into your remote personal folder : 
    4739{{{ 
    4840svn cp svn://forge.ipsl.jussieu.fr/orchidee/tags/ORCHIDEE_1_9_6 svn://forge.ipsl.jussieu.fr/orchidee/perso/firstname.lastname/myORCHIDEE_1_9_6  
    4941}}} 
    5042 
    51 == Extract your personal folder == 
    52 Your personal folder can be extracted by the following command line (replace firstname.lastname by yours): 
     43You are encouraged to commit all your ORCHIDEE source code to svn as well as all your pre-processing and post-processing scripts. However, '''do NOT commit netcdf files, executables or other big files to svn'''. 
     44 
     45 
     46== Save and share your developments == 
     47 
     48=== Check out your personal folder === 
     49The svn-server archives the source code but it cannot be used to run ORCHIDEE. Running ORCHIDEE requires you to check out (hence the co in the command svn co) the source code from svn and to download it to one of the servers where you can run the model (e.g., Obelix, Irene, Climserv). You can co the code that has been archived in your personal folder by the following command line (replace firstname.lastname by yours): 
    5350{{{ 
    5451svn co svn://forge.ipsl.jussieu.fr/orchidee/perso/firstname.lastname mypersofolder 
    5552}}} 
    5653 
    57 If you got error message "svn: Authorization failed", then add --username firstname.lastname in the commande svn.  
     54If you get the error message "svn: Authorization failed", then add --username firstname.lastname to the svn command.  
    5855{{{ 
    5956svn --username firstname.lastname co svn://forge.ipsl.jussieu.fr/orchidee/perso/firstname.lastname mypersofolder 
    6057}}} 
    6158 
    62 == Vizualise your folder using web interface == 
    63 If you have a login to the machine forge where the wiki and svn of ORCHIDEE are stored, you can visualize your account at forge: [https://forge.ipsl.jussieu.fr/orchidee/browser/perso]. 
    64 Ask for an account on forge using the email list orchidee-help. This login can be used to modify the wiki, to create and comment tickets and to vizualize your personal folder as well as all branches you have access to.  
     59When you copied your preferred version of ORCHIDEE into your branch or personal copy at the very begin (see above) and you followed the instructions above, you have only copied the ORCHIDEE folder which contains the source code. To install a working copy of ORCHIDEE you also need many other folders (which you don't want to store in your svn folder because you will not develop those). One way to install a working copy is to first download the trunk (https://forge.ipsl.jussieu.fr/orchidee/wiki/Documentation/UserGuide/InstallingORCHIDEEBasic), then delete the ORCHIDEE folder of the trunk (rm -rf ORCHIDEE) and then download your ORCHIDEE copy in the folder where the trunk ORCHIDEE folder (you just deleted) was (using svn co).  
    6560 
    66 == Starting from zero == 
     61=== Visualize your folder using the web interface === 
     62This is where the forge login comes in handy. If you have a login for forge where the wiki and svn of ORCHIDEE are stored, you can visualize your account on any browser 
     63{{{ 
     64https://forge.ipsl.jussieu.fr/orchidee/browser/perso]. 
     65}}} 
    6766 
    68 This small guide explains how to properly commit your Orchidee source code into the Subversion for the first time. 
     67Ask for an account on forge using the email list orchidee-help (https://forge.ipsl.jussieu.fr/orchidee/wiki/GroupActivities/Contact). This login can also be used to modify the wiki, create and comment on tickets and visualize your personal folder as well as the trunk and all branches you have access to.  
    6968 
    70 If you follow this guide, then the subversion will properly keep track of the modifications done in the code (what you see in svn log). 
    71  
    72 1. Create a new perso folder in the Subversion to place your files: [wiki:svnBranchePerso#Createyourpersonalfolder Check here] 
    73  
    74 2. Copy your starting Orchidee version (e.g: orchidee-som revision 5054) to your perso folder (in server).  
     69=== Saving and sharing your developments === 
     70When you copied your preferred version of ORCHIDEE into your branch or personal copy at the very begin (see above) and you followed the instructions above, you have only copied the ORCHIDEE folder which contains the source code. Maybe you also want to store other source code in your personal folder such as pre-processing and post-processing scripts (but '''do NOT commit netcdf files, executables or other big files to svn'''). You can tell svn there are new files you would like to place on the svn-server 
    7571 
    7672{{{ 
    77 svn copy -r 5054 svn://forge.ipsl.jussieu.fr/orchidee/branches/ORCHIDEE-SOM/ORCHIDEE svn://forge.ipsl.jussieu.fr/orchidee/perso/haicheng.zhang/ORCHIDEE-MUSLE -m "Branch: some decription here" 
     73svn add MY_SCRIPT_FOLDER/newfile.py -m "New: some explanation here" 
    7874}}} 
    7975 
    80 This step is specially important because it will allow the svn to keep track of any modification done in the code. 
    81  
    82 3. Download the code from the server to your local machine: 
    83  
    84 {{{ 
    85 svn co svn://forge.ipsl.jussieu.fr/orchidee/perso/haicheng.zhang/ORCHIDEE-MUSLE ORCHSVN-MUSLE 
    86 }}} 
    87  
    88 4. Bring all the modifications from your code (in local) to the downloaded folder ORCHSVN-MUSLE (in local) 
    89  
    90 {{{ 
    91 cd ORCHSVN-MUSLE 
    92  
    93 cp /YOUR/ORCH/FOLDER/src_stomate/*90 src_stomate/ 
    94  
    95 cp /YOUR/ORCH/FOLDER/src_sechiba/*90 src_sechiba/ 
    96  
    97 cp /YOUR/ORCH/FOLDER/src_global/*90 src_global/ 
    98  
    99 cp /YOUR/ORCH/FOLDER/src_xml/*xml src_xml/ 
    100  
    101 ... 
    102 }}} 
    103  
    104 For all the src_ folders. Make sure to procede this way to not mess it up with some hidden files. 
    105  
    106 5. Tell subversion there are new files (if applies) 
    107  
    108 {{{ 
    109 svn add src_somewhere/newfile.f90 -m "New: some explanation here" 
    110 }}} 
    111  
    112 6. Send the modifications done to the code to the server 
     76Once your developments are working you can save your changes on svn so that the history of the code is traceable. At the time you save your file you also share them with the other users of your version. This could be half the world in case of the trunk, a hand full of users in case of a branch or just you in case of a personal copy. 
    11377 
    11478{{{ 
     
    11680}}} 
    11781 
     82svn will only commit the files under svn control and in the directory where you type the above command. For the example we have been using above this implies that you have to go to the ORCHIDEE folder and use the above command if you want to commit your ORCHIDEE source code. If you want to commit your pre-processing or post-processing scripts you first need to go to MY_SCRIPT_FOLDER and execute the command from there.    
    11883 
     84 
     85