Changes between Version 3 and Version 4 of Documentation/UserGuide/svnKeepUpdated
- Timestamp:
- 2020-02-28T15:19:49+01:00 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Documentation/UserGuide/svnKeepUpdated
v3 v4 2 2 3 3 Author: J. Ghattas 4 Last revision: 2020/02/28, M. McGrath 4 5 Last revision: 2020/02/28, M. !McGrath 5 6 6 7 ''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.'' … … 16 17 We 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: 17 18 {{{ 18 svn merge -r x1:x2 svn://forge.ipsl.jussieu.fr/orchidee/trunk/ORCHIDEE --dry-run19 svn merge -r x1:x2 svn://forge.ipsl.jussieu.fr/orchidee/trunk/ORCHIDEE --dry-run 19 20 }}} 20 21 … … 30 31 31 32 {{{ 32 svn merge -r x1:x2 svn://forge.ipsl.jussieu.fr/orchidee/trunk/ORCHIDEE33 svn merge -r x1:x2 svn://forge.ipsl.jussieu.fr/orchidee/trunk/ORCHIDEE 33 34 }}} 34 35 When 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]] 35 36 36 Note 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.37 Note that SVN will consider as conflicts lines where modifications have been done both 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 commiting. 37 38 38 39 == Example == 39 40 40 First extract the branch you want to update ina 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:41 First extract the branch you want to update to 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: 41 42 {{{ 42 43 svn co svn://forge.ipsl.jussieu.fr/orchidee/branches/mybranch/ORCHIDEE ORCHIDEE … … 50 51 }}} 51 52 52 You'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: 53 You'll probably have some files with conflicts. Use options report/postpone(p) to resolve them one by one afterwards. An example of a conflict is 54 55 {{{ 56 <<<<<<< .mine 57 Salami 58 Mortadella 59 Prosciutto 60 ======= 61 Sauerkraut 62 Grilled Chicken 63 >>>>>>> .r2 64 }}} 65 The lines before "======" are in the local file, and those below are in the trunk. svn does not know which of these is correct, so you have to tell it, erasing the "<<<<<", "====", and ">>>>>" lines. 66 67 When all conflicts are resolved, test the new version and then you can commit the changes to the SVN repository: 53 68 {{{ 54 69 svn ci 55 70 }}} 56 Add a clear log message for example: ''Updated branch with changes done on the trunk from revision 1042 up to revision 1392''.71 Add a clear log message. For example: ''Updated branch with changes done on the trunk from revision 1042 up to revision 1392''. 57 72 58 Now your branch is up dated 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 whereupdated, x1 becomes in this case 1393. Suppose that the current revision on the trunk is now 1400. Do the following:73 Now your branch is up-to-date with the trunk. But later on when there have been more changes done to the trunk you'll need to update again. This time, start from the revision after the last revision when the branch was updated, x1 becomes in this case 1393. Suppose that the current revision on the trunk is now 1400. Do the following: 59 74 {{{ 60 75 svn merge -r 1393:1400 svn://forge.ipsl.jussieu.fr/orchidee/trunk/ORCHIDEE --dry-run … … 62 77 }}} 63 78 64 Resolve conflicts, test, commit etc...79 Resolve conflicts, test, and commit.