| 42 | |
| 43 | == Branches == |
| 44 | |
| 45 | It is recommended that developments to ROPP are conducted and committed to a ''branch'' rather than directly to the latest trunk version. |
| 46 | This allows for changes to be tested before merging the required changes back into the trunk. The trunk therefore represents the 'next release' state for ROPP. |
| 47 | |
| 48 | To create a branch of ropp_src from the trunk use the command: |
| 49 | {{{ |
| 50 | fcm branch -c -n <branch name> -t DEV::SHARE --rev-flag NORMAL --branch-of-branch fcm:ropp_src_tr |
| 51 | }}} |
| 52 | where <branch name> is a name of your choice which should reflect what you are working on. |
| 53 | To create a branch for sole use by the user, specify -t DEV::USER in the branch command. Similar branches can be created to store user versions of ropp_doc, ropp_test and ropp_web as required. |
| 54 | |
| 55 | To make developments, the branch needs to be checked out as above, specifying the path name for the required branch as |
| 56 | {{{ |
| 57 | fcm co fcm:ropp_src/branches/dev/Share/<branch name> |
| 58 | }}} |
| 59 | or |
| 60 | {{{ |
| 61 | fcm co fcm:ropp_src/branches/dev/<user id>/<branch name> |
| 62 | }}} |
| 63 | if using a private user branch. |
| 64 | |
| 65 | When all the changes you require to your branch have been committed and the ROPP development team are satisfied that it will be part of the next release, these changes will be merged back into the trunk by using merge. To do this, you must first change directory to your working copy of the trunk (create one using checkout if you don't already have it). Then enter the following: |
| 66 | {{{ |
| 67 | cd ${HOME}/FCM/ropp_src |
| 68 | fcm merge fcm:ropp_src/branches/dev/Share/<branch name> |
| 69 | }}} |
| 70 | After the merge, you will get a list of changes and your working copy of the main trunk will be updated. Nothing will change in the repository until you commit your working copy of the main trunk back into the repository. If everything has gone smoothly, you should delete your branch by using the following commands: |
| 71 | {{{ |
| 72 | cd ${HOME}/FCM/<branch name> |
| 73 | fcm branch --delete |
| 74 | }}} |
| 75 | |
| 76 | While you are working on your branch, you may want to bring in the changes that have been made to the main trunk. This can be done using the merge command. You must first change directory to your branch's working copy: |
| 77 | {{{ |
| 78 | cd ${HOME}/FCM/<branch name> |
| 79 | fcm merge fcm:ropp_src_tr |
| 80 | }}} |
| 81 | When you do this, you should see the list of updates that have been made to the trunk since you last brought in any changes (or since you branched). Again, this only results in changes to your working copy so you might want to commit them. |
| 82 | |