Changes between Version 11 and Version 12 of Documentation/UserGuide/svnBranchePerso
- Timestamp:
- 2020-02-28T11:42:14+01:00 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Documentation/UserGuide/svnBranchePerso
v11 v12 18 18 19 19 == 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.20 First, 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. 21 21 22 22 The svn administrators will create a folder for your branch or personal copy in the svn server using following syntax (example for a personal copy): … … 25 25 }}} 26 26 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.27 Subsequently, 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. 28 28 29 29 30 == benefit from svn to save and share your developments == 30 == Start your own branch or personal copy == 31 Note 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. 31 32 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 : 33 For example, you want to copy revision number X from the ORCHIDEE trunk into your personal folder : 42 34 {{{ 43 35 svn cp -r X svn://forge.ipsl.jussieu.fr/orchidee/trunk/ORCHIDEE svn://forge.ipsl.jussieu.fr/orchidee/perso/firstname.lastname/ORCHIDEE_mytrunk 44 36 }}} 45 37 46 For ex emple you want to copy the tag 1.9.6 into your remote personal folder :38 For example you want to copy the tag 1.9.6 into your remote personal folder : 47 39 {{{ 48 40 svn 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 49 41 }}} 50 42 51 == Extract your personal folder == 52 Your personal folder can be extracted by the following command line (replace firstname.lastname by yours): 43 You 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 === 49 The 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): 53 50 {{{ 54 51 svn co svn://forge.ipsl.jussieu.fr/orchidee/perso/firstname.lastname mypersofolder 55 52 }}} 56 53 57 If you g ot error message "svn: Authorization failed", then add --username firstname.lastname in the commande svn.54 If you get the error message "svn: Authorization failed", then add --username firstname.lastname to the svn command. 58 55 {{{ 59 56 svn --username firstname.lastname co svn://forge.ipsl.jussieu.fr/orchidee/perso/firstname.lastname mypersofolder 60 57 }}} 61 58 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. 59 When 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). 65 60 66 == Starting from zero == 61 === Visualize your folder using the web interface === 62 This 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 {{{ 64 https://forge.ipsl.jussieu.fr/orchidee/browser/perso]. 65 }}} 67 66 68 This small guide explains how to properly commit your Orchidee source code into the Subversion for the first time. 67 Ask 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. 69 68 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 === 70 When 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 75 71 76 72 {{{ 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"73 svn add MY_SCRIPT_FOLDER/newfile.py -m "New: some explanation here" 78 74 }}} 79 75 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 76 Once 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. 113 77 114 78 {{{ … … 116 80 }}} 117 81 82 svn 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. 118 83 84 85