Changes between Initial Version and Version 1 of Documentation/UserGuide/svnKeepUpdated


Ignore:
Timestamp:
12/02/14 18:46:52 (6 years ago)
Author:
jgipsl
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/UserGuide/svnKeepUpdated

    v1 v1  
     1= How to keep a branch updated with the trunk = 
     2We 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:  
     3{{{ 
     4svn merge -r x1:x2 svn://forge.ipsl.jussieu.fr/orchidee/trunk/ORCHIDEE --dry-run 
     5svn merge -r x1:x2 svn://forge.ipsl.jussieu.fr/orchidee/trunk/ORCHIDEE 
     6}}} 
     7 
     8where 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]] 
     9 
     10Note 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.  
     11 
     12== Example == 
     13 
     14First extract the branch you want to update in a local directory. Make sure you have the latest revision and that no local changes are done in the folder. Use the following or use modipsl: 
     15{{{ 
     16svn co svn://forge.ipsl.jussieu.fr/orchidee/branches/mybranch/ORCHIDEE ORCHIDEE 
     17cd ORCHIDEE 
     18}}} 
     19 
     20The first time you update the branch, the first revision x1 corresponds to the revision where the branch was copied from the trunk. x2 is always the latest revision on the trunk. For example, if your branch was copied from the trunk at revision 1042 and now the latest revision on the trunk is 1392, do the following: 
     21{{{ 
     22svn merge -r 1042:1392 svn://forge.ipsl.jussieu.fr/orchidee/trunk/ORCHIDEE --dry-run 
     23svn merge -r 1042:1392 svn://forge.ipsl.jussieu.fr/orchidee/trunk/ORCHIDEE 
     24}}} 
     25 
     26You'll probably have some files with conflicts. Use options report(p) to solve them one by one afterwards. When all conflicts are solved, test the new version and then you can commit the changes to the SVN repository:  
     27{{{ 
     28svn ci 
     29}}} 
     30Add a clear log message for example: ''Updated branch with changes done on the trunk from revision 1042 up to revision 1392''. 
     31 
     32Now your branch is updated with the trunk. But some times later when there have been more changes done on the trunk you'll need to update again. This time, start from the revision after the last revision when the branch where updated, x1 becomes in this case 1393. Suppose that the current revision on the trunk is now 1400. Do the following: 
     33{{{ 
     34svn merge -r 1393:1400 svn://forge.ipsl.jussieu.fr/orchidee/trunk/ORCHIDEE --dry-run 
     35svn merge -r 1393:1400 svn://forge.ipsl.jussieu.fr/orchidee/trunk/ORCHIDEE 
     36}}} 
     37 
     38Resolve conflicts, test, commit etc...