My Quick Reference Guide
JULES-Rose
Here are sets of commands that are commonly used.
FCM
Here are sets of commands that are commonly used and the order that they are they are usually issued in.
- Committing local/working copy
- Updating a local/working copy
- Using a keyword to check the log
- Checkout the trunk and create a branch
- Reverting an uncommitted change
- Reverting a committed change
- Merging a local/working copy
- Listing branches and then checking one out
- Text conflicts and accepting the working copy
rose stem
# use the desired version number i.e. vn4p7/vn4.7 mkdir -p ~jules/vn#p#/ cd ~jules/vn#p# # checkout the trunk at vn#.# fcm co fcm:jules.x_tr@vn#.# # or not using the keywords fcm co https://code.metoffice.gov.uk/svn/jules/main/trunk@vn#.# cd trunk # run the rose stem tests rose stem --group=all --new # create a branch for development on of the JULES code fcm bc <BRANCH_NAME> fcm:jules.x_tr@vn#.# cd ~jules/vn#p# # list the branches that you own fcm bls # checkout your new branch fcm co fcm:jules.x_br/dev/<USER</<BRANCH_NAME> # change to that directory cd ~jules/vn#p#/<BRANCH_NAME> # check the info on the branch fcm info # make some changes # check the status of the local copy compared to the repository fcm st # if this returns a "?" then you have locally add files or directories, use: # "fcm add <FILENAME>" to add them to the repository # if this returns a "!" then you have locally removed files or directories, use: # "fcm rm -c <FILENAME>" to remove them from the repository # now commit your changes to the repository fcm ci # run the rose stem tests on your changed JULES code rose stem --new # copy the "trac.log" into the TicketSummary for the ticket as evidence for # the review process. cd ~cylc-run/<BRANCH_NAME> # open the file for copying with a preferred editor gvim trac.log
rose suite-run
# checkout a suite that you want to base your experiments on rosie checkout <SUITE_ID> cd ~roses/<SUITE_ID> rose suite-run # if the suite is what is needed then copy to make changes to and to be the owner rosie copy <SUITE_ID> cd ~roses/<NEW_SUITE_ID> # make change so it is what is required # check the status of the local copy compared to the repository fcm st # if this returns a "?" then you have locally add files or directories, use: # "fcm add <FILENAME>" to add them to the repository # if this returns a "!" then you have locally removed files or directories, use: # "fcm rm -c <FILENAME>" to remove them from the repository # now commit your changes to the repository, then the repository is the same as # the experiment that was run fcm ci rose suite-run # more changes are needed but for traceability create a branch fcm bc <BRANCH_NAME> # list all branches fcm bls # switch to the branch fcm sw <BRANCH_NAME> # check the info to prove that it is the branch fcm info # make some changes # check the status of the local copy compared to the repository fcm st # if this returns a "?" then you have locally add files or directories, use: # "fcm add <FILENAME>" to add them to the repository # if this returns a "!" then you have locally removed files or directories, use: # "fcm rm -c <FILENAME>" to remove them from the repository # now commit your changes to the repository fcm ci # run the rose suite to run the configuration changes made rose suite-run --new --name=<DIFFERENT_NAME> # check the output cd ~cylc-run/<DIFFERENT_NAME>/work/1/<TASK_NAME>/output # this output can be compared with the output from the original <NEW_SUITE_ID> cd ~cylc-run/<NEW_SUITE_ID>/work/1/<TASK_NAME>/output # the orginal suite which is not needed can be deleted # make sure you only delete the required files (cylc-run and local copy) by answering carefully rosie delete <SUITE_ID>
Committing local/working copy
# check that you are in the correct copy and revision of your local/working copy of the repository fcm info # check the changes compared to the committed version of the repository. fcm st # make appropriate changes. # commit the local changes to the repository. fcm ci # confirm there are no changes in the local copy. fcm st # confirm the revision number has increased as expected. fcm info
Updating a local/working copy
fcm info fcm st # check what updates (-u) could be applied to the local/working copy. fcm st -u # if you are happy with them update your local/working copy. fcm update # check the status and commit to the repository any required changes. fcm st fcm ci
Using a keyword to check the log
# setup your keyword. cd ~/.metomi/fcm/ # edit the keyword.cfg file, for example: location{primary}[jules.x] = https://code.metoffice.gov.uk/svn/jules/main location{primary}[jules_doc.x] = https://code.metoffice.gov.uk/svn/jules/doc # check the log of the local/working copy. fcm log fcm:jules.x
Checkout the trunk and create a branch
# checkout the trunk with the URL. fcm co URL <LOCATION OF WORKING/LOCAL COPY> # checkout the trunk with the keyword if it is setup. fcm co fcm:jules.x_tr <LOCATION OF WORKING/LOCAL COPY> # create a branch of the trunk. fcm bc <NAME OF BRANCH> # # if you already have a local/working copy of the trunk and want to branch from # that... cd <LOCATION OF WORKING/LOCAL COPY OF TRUNK> # check it is the trunk version. fcm info # check for any updates and if you want them. fcm st -u # update if there are changes and you want them. fcm update # create a branch of the trunk. fcm bc <NAME OF BRANCH> # checkout the branch fcm co <BRANCH_URL> <LOCATION OF WORKING/LOCAL COPY OF BRANCH> cd <LOCATION OF WORKING/LOCAL COPY OF BRANCH>
Reverting an uncommitted change
# this only works on changes in the local/working copy which have not yet been #committed to the repository. fcm st # select the local changes that you want to revert and revert them. fcm revert <FILENAME1> <FILENAME2> <DIRECTORY1> # check the changes are correct. fcm st # commit the changes if all is as required. fcm ci
Reverting a committed change
# check what revisions are available for reverting. fcm binfo # to revert changes that you have already committed fcm merge --reverse --revision M:N # check the status and commit if as required. fcm st fcm info
Merging a local/working copy
# merging a local copy branch into the trunk. # change or switch to the trunk local/working copy. fcm merge <BRANCH_URL> # accept the merge if it is correct and commit changes. fcm ci
Listing branches and then checking one out
# list possible branches fcm bls # select one to checkout fcm co <BRANCH_URL> <LOCATION OF WORKING/LOCAL COPY OF BRANCH> cd <LOCATION OF WORKING/LOCAL COPY OF BRANCH>
Text conflicts and accepting the working copy
fcm st # if it is a text conflict, e.g. # C statusesC_text.txt # not a tree conflict, e.g. # C src/utility/my_tools # we can use: fcm cf # this brings up an xxdiff three-way window. # The middle frame of the three is the common ancestor of the two. # The one on the left is the local/working copy directory that we are in, the # one considered the original. # The one on the right is the one we are trying to merge in. # Left click on the text option that we want to keep, it should change colour # from yellow to purple. # Then press "m", or use the toolbar; File -> Exit with MERGED M. [info] statusesC_text.txt: in text conflict. You merged all the changes. Run "svn resolve --accept working statusesC_text.txt"? Enter "y" or "n" (or just press <return> for "n") y Resolved conflicted state of 'statusesC_text.txt # # fcm st # if it is a tree conflict. # find out more information about the file/directory concerned. fcm log -v <FILENAME> # if you want to keep your local/working copy you # can try: fcm resolve --accept working <FILENAME> Resolved conflicted state of 'src/utility'
© British Crown Copyright 2006-17
Met Office.
This document is released under the British Open Government Licence.
This document is released under the British Open Government Licence.