Changes between Version 2 and Version 3 of Documentation/UserGuide/svnKeepUpdated


Ignore:
Timestamp:
02/28/20 15:01:55 (14 months ago)
Author:
mmcgrath
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/UserGuide/svnKeepUpdated

    v2 v3  
    11= How to keep a branch updated with the trunk or another version on svn = 
    2 ''In the text is described how to update with changes done on the trunk. But it can as well be another branch or personal version of ORCHIDEE on the svn repository. You then need to change the path to the version you want.''  
    32 
    4 We here keep a branch or personal version updated with changes done on the trunk using svn merge by specifying a rang of revisions that should be considered using:  
     3Author: J. Ghattas 
     4Last revision: 2020/02/28, M. McGrath 
     5 
     6''This text describes how to update your local copy of ORCHIDEE with changes done to the trunk. But it serves just as well for instructions on how to update your local copy of ORCHIDEE with changes done to another branch or personal version of ORCHIDEE on the svn repository. You then need to change the path to the version you want.''  
     7 
     8The first step is to have access to the branch you want to take the changes from.  Ask the administrator for access, including the maintainer of the branch in the CC field of the email so they are aware. 
     9 
     10Next, you need to know the svn address of the branch that you want to take changes from.  This various from branch to branch.  The easiest way to find this out is to go to the "[https://forge.ipsl.jussieu.fr/orchidee/browser Browse Source]" section of the wiki.  From there, one can navigate to ORCHIDEE directory of the version you are interested in.  For the trunk, this is https://forge.ipsl.jussieu.fr/orchidee/browser/trunk/ORCHIDEE (though not everyone has access).  For TAG 1.9.5 (which everyone should have access to), the website is https://forge.ipsl.jussieu.fr/orchidee/browser/tags/ORCHIDEE_1_9_5/ORCHIDEE.  The part you need to note is what comes after "https://forge.ipsl.jussieu.fr/orchidee/browser/".  This is the identifier that we will pass to svn below, IDENTIFIER.  For example, IDENTIFIER=tags/ORCHIDEE_1_9_5, or IDENTIFIER=trunk/ORCHIDEE. 
     11 
     12{{{ 
     13   svn://forge.ipsl.jussieu.fr/orchidee/IDENTIFIER 
     14}}} 
     15 
     16We keep a branch or personal version updated with changes done to the trunk using svn merge by specifying a range of revisions.  svn will look at all changes done to the trunk during this range and try to merge them with the local copy:  
    517{{{ 
    618svn merge -r x1:x2 svn://forge.ipsl.jussieu.fr/orchidee/trunk/ORCHIDEE --dry-run 
     19}}} 
     20 
     21where x1 is first revision and x2 is the last revision of the trunk that you want to consider. All changes from x1 up to x2 will be considered. Note that this always produces the differences between the local version '''and the differences made between revisions x1 and x2 of the target''', which may not be what you expect.  For example, the following command will show nothing: 
     22 
     23{{{ 
     24   svn merge --dry-run -r 5000:6300 svn://forge.ipsl.jussieu.fr/orchidee/tags/ORCHIDEE_1_9_5/ORCHIDEE 
     25}}} 
     26 
     27even though there are surely differences between your version of the code and TAG 1.9.5.  This is because no differences to TAG 1.9.5 were made between revisions 5000 and 6300, and so svn has nothing to compare your code to. 
     28 
     29The first time you use the command, add --dry-run to only show what the command will do. If everything looks good, execute the real command: 
     30 
     31{{{ 
    732svn merge -r x1:x2 svn://forge.ipsl.jussieu.fr/orchidee/trunk/ORCHIDEE 
    833}}} 
    9  
    10 where x1 is first revision and x2 is the last revision on the trunk that you want to consider. All changes from x1 up to x2 will be considered. First time you use the command, add --dry-run to only have listing on the screen of what the command would do. When executing the real command (without --dry-run) some files might be in conflict. For those case, use option report(type p) and resolve the conflicts afterwards. When all conflicts are resolved you can commit the modified version to the branch.[[BR]] 
     34When executing the real command (without --dry-run) some files might be in conflict. For those case, use option report (on French systems) or postpone (on English systems...in both cases, the action is to type "p") and resolve the conflicts afterwards. When all conflicts are resolved you can commit the modified version to the branch.[[BR]] 
    1135 
    1236Note that SVN will consider some conflicts where modifications have been done on the same lines in the branch and in the trunk. But there can be other conflicts which are not discovered by SVN. Testing of the new version is always needed before commit.