| 1 | <!DOCTYPE html> |
|---|
| 2 | <html> |
|---|
| 3 | <head> |
|---|
| 4 | <title>FCM: User Guide: Annex: Declarations in FCM 1 central/user configuration |
|---|
| 5 | file</title> |
|---|
| 6 | <meta name="author" content="FCM team" /> |
|---|
| 7 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
|---|
| 8 | <link rel="icon" href="../etc/fcm-icon.png" type="image/png" /> |
|---|
| 9 | <link rel="shortcut icon" href="../etc/fcm-icon.png" type="image/png" /> |
|---|
| 10 | <link href="../etc/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" /> |
|---|
| 11 | <link href="../etc/fcm.css" rel="stylesheet" media="screen" /> |
|---|
| 12 | </head> |
|---|
| 13 | <body> |
|---|
| 14 | <div class="navbar navbar-inverse"> |
|---|
| 15 | <div class="container-fluid"> |
|---|
| 16 | <div class="navbar-header"> |
|---|
| 17 | <a class="navbar-brand" href=".."><span class="fcm-version">FCM</span></a> |
|---|
| 18 | </div> |
|---|
| 19 | <div class="collapse navbar-collapse"> |
|---|
| 20 | <ul class="nav navbar-nav"> |
|---|
| 21 | <li><a href="../installation/">Installation</a></li> |
|---|
| 22 | |
|---|
| 23 | <li><a class="active" href="#">User Guide</a></li> |
|---|
| 24 | </ul> |
|---|
| 25 | </div> |
|---|
| 26 | </div> |
|---|
| 27 | </div> |
|---|
| 28 | |
|---|
| 29 | <div class="page-header"> |
|---|
| 30 | <div class="fcm-page-content pull-right well well-sm"></div> |
|---|
| 31 | <h1>FCM: User Guide: Annex: Declarations in FCM 1 central/user configuration |
|---|
| 32 | file</h1> |
|---|
| 33 | </div> |
|---|
| 34 | |
|---|
| 35 | <div class="container"> |
|---|
| 36 | <div class="row"> |
|---|
| 37 | <div class="col-md-12"> |
|---|
| 38 | |
|---|
| 39 | <p>The deprecated FCM 1 commands, i.e. <code><a href= |
|---|
| 40 | "command_ref.html#fcm-build">fcm build</a></code>, <code><a href= |
|---|
| 41 | "command_ref.html#fcm-cmp-ext-cfg">fcm cmp-ext-cfg</a></code> and |
|---|
| 42 | <code><a href="command_ref.html#fcm-extract">fcm extract</a></code>, can |
|---|
| 43 | modify their settings using the central and user configuration files at:</p> |
|---|
| 44 | |
|---|
| 45 | <ul> |
|---|
| 46 | <li><samp>$FCM/etc/fcm.cfg</samp> where <var>$FCM/bin/</var> is the path at |
|---|
| 47 | which <code>fcm</code> is installed.</li> |
|---|
| 48 | |
|---|
| 49 | <li><samp>$HOME/.fcm</samp>.</li> |
|---|
| 50 | </ul> |
|---|
| 51 | |
|---|
| 52 | <p>Note:</p> |
|---|
| 53 | |
|---|
| 54 | <ul> |
|---|
| 55 | <li>The detail of the above settings will remain undocumented. For further |
|---|
| 56 | information, please refer to the Perl module <code>FCM1::Config</code>, |
|---|
| 57 | which should be located at <samp>lib/FCM1/Config.pm</samp> in your FCM |
|---|
| 58 | distribution.</li> |
|---|
| 59 | |
|---|
| 60 | <li>Setting labels in both files are case insensitive.</li> |
|---|
| 61 | </ul> |
|---|
| 62 | |
|---|
| 63 | <p>The following deprecated settings related to FCM keywords will no longer |
|---|
| 64 | work in <samp>$FCM/etc/fcm.cfg</samp> but will continue to work in |
|---|
| 65 | <samp>$HOME/.fcm</samp>. However, it would be desirable to migrate these |
|---|
| 66 | settings to their equivalents in <samp>$HOME/.metomi/fcm/keyword.cfg</samp> |
|---|
| 67 | as documented in <a href="annex_cfg.html#keyword">Annex: FCM Configuration |
|---|
| 68 | File > FCM Keyword Configuration</a>.</p> |
|---|
| 69 | |
|---|
| 70 | <dl> |
|---|
| 71 | <dt>SET::URL::<pck><br /> |
|---|
| 72 | SET::REPOS::<pck></dt> |
|---|
| 73 | |
|---|
| 74 | <dd> |
|---|
| 75 | <p><samp>$HOME/.metomi/fcm/keyword.cfg</samp> equivalent: <code><a href= |
|---|
| 76 | "annex_cfg.html#keyword.location">location</a></code> or <code><a href= |
|---|
| 77 | "annex_cfg.html#keyword.location">location{primary}</a></code>.</p> |
|---|
| 78 | |
|---|
| 79 | <p>This declares a URL keyword for the package <pck>. The value of |
|---|
| 80 | the declaration must be a valid Subversion <URL>. Once declared, |
|---|
| 81 | the URL keyword <pck> will be associated with the specified URL. In |
|---|
| 82 | subsequent invocations of the <code>fcm</code> command, the following |
|---|
| 83 | expansion may take place:</p> |
|---|
| 84 | |
|---|
| 85 | <ul> |
|---|
| 86 | <li><samp>fcm:<pck></samp>: replaced by |
|---|
| 87 | <samp><URL></samp>.</li> |
|---|
| 88 | |
|---|
| 89 | <li><samp>fcm:<pck>_tr</samp> or <samp>fcm:<pck>-tr</samp>: |
|---|
| 90 | replaced by <samp><URL>/trunk</samp></li> |
|---|
| 91 | |
|---|
| 92 | <li><samp>fcm:<pck>_br</samp> or <samp>fcm:<pck>-br</samp>: |
|---|
| 93 | replaced by <samp><URL>/branches</samp></li> |
|---|
| 94 | |
|---|
| 95 | <li><samp>fcm:<pck>_tg</samp> or <samp>fcm:<pck>-tg</samp>: |
|---|
| 96 | replaced by <samp><URL>/tags</samp></li> |
|---|
| 97 | </ul> |
|---|
| 98 | |
|---|
| 99 | <p>Example:</p> |
|---|
| 100 | <pre> |
|---|
| 101 | # Associate "var" with "svn://server/VAR_svn/var" |
|---|
| 102 | set::url::var svn://server/VAR_svn/var |
|---|
| 103 | |
|---|
| 104 | # "fcm:var" is now the same as "svn://server/VAR_svn/var" |
|---|
| 105 | </pre> |
|---|
| 106 | </dd> |
|---|
| 107 | |
|---|
| 108 | <dt>SET::REVISION::<pck>::<keyword></dt> |
|---|
| 109 | |
|---|
| 110 | <dd> |
|---|
| 111 | <p><samp>$HOME/.metomi/fcm/keyword.cfg</samp> equivalent: <code><a href= |
|---|
| 112 | "annex_cfg.html#keyword.revision">revision</a></code>.</p> |
|---|
| 113 | |
|---|
| 114 | <p>This declares <keyword> to be the revision number for the |
|---|
| 115 | package <pck>. The <keyword> string can contain any |
|---|
| 116 | characters except spaces. It must not contain only digits (as digits are |
|---|
| 117 | treated as revision numbers). It must not be the Subversion revision |
|---|
| 118 | keywords HEAD, BASE, COMMITTED and PREV. It cannot begin and end with a |
|---|
| 119 | pair of curly brackets (as this will be parsed as a revision date). The |
|---|
| 120 | package <pck> must be associated with a URL using the |
|---|
| 121 | SET::URL::<pck> declaration described above before this declaration |
|---|
| 122 | can make sense. Once defined, <keyword> can be used anywhere in |
|---|
| 123 | place the defined revision number.</p> |
|---|
| 124 | |
|---|
| 125 | <p>Example:</p> |
|---|
| 126 | <pre> |
|---|
| 127 | set::revision::var::v22.0 8410 |
|---|
| 128 | |
|---|
| 129 | # E.g. "fcm list -r v22.0 fcm:var" is now the same as |
|---|
| 130 | # "fcm list -r 8410 fcm:var". |
|---|
| 131 | </pre> |
|---|
| 132 | </dd> |
|---|
| 133 | |
|---|
| 134 | <dt>SET::URL_BROWSER_MAPPING_DEFAULT::<key></dt> |
|---|
| 135 | |
|---|
| 136 | <dd> |
|---|
| 137 | <p><samp>$HOME/.metomi/fcm/keyword.cfg</samp> equivalent: <code><a href= |
|---|
| 138 | "annex_cfg.html#keyword.browser.comp-pat">browser.comp-pat</a></code>, |
|---|
| 139 | <code><a href= |
|---|
| 140 | "annex_cfg.html#keyword.browser.loc-tmpl">browser.loc-tmpl</a></code>, |
|---|
| 141 | and <code><a href= |
|---|
| 142 | "annex_cfg.html#keyword.browser.rev-tmpl">browser.rev-tmpl</a></code>.</p> |
|---|
| 143 | |
|---|
| 144 | <p>These declarations are used to change the global default for mapping a |
|---|
| 145 | version control system URL to its corresponding web browser URL. |
|---|
| 146 | <key> can be LOCATION_COMPONENT_PATTERN, BROWSER_URL_TEMPLATE or |
|---|
| 147 | BROWSER_REV_TEMPLATE.</p> |
|---|
| 148 | |
|---|
| 149 | <p>Example:</p> |
|---|
| 150 | <pre> |
|---|
| 151 | set::url_browser_mapping_default::location_component_pattern ^//([^/]+)/(.*)$ |
|---|
| 152 | set::url_browser_mapping_default::browser_url_template http://{1}/intertrac/source:{2}{3} |
|---|
| 153 | set::url_browser_mapping_default::browser_rev_template @{1} |
|---|
| 154 | </pre> |
|---|
| 155 | </dd> |
|---|
| 156 | |
|---|
| 157 | <dt>SET::URL_BROWSER_MAPPING::<pck>::<key></dt> |
|---|
| 158 | |
|---|
| 159 | <dd> |
|---|
| 160 | <p><samp>$HOME/.metomi/fcm/keyword.cfg</samp> equivalent: <code><a href= |
|---|
| 161 | "annex_cfg.html#keyword.browser.comp-pat">browser.comp-pat</a></code>, |
|---|
| 162 | <code><a href= |
|---|
| 163 | "annex_cfg.html#keyword.browser.loc-tmpl">browser.loc-tmpl</a></code>, |
|---|
| 164 | and <code><a href= |
|---|
| 165 | "annex_cfg.html#keyword.browser.rev-tmpl">browser.rev-tmpl</a></code>.</p> |
|---|
| 166 | |
|---|
| 167 | <p>Similar to SET::URL_BROWSER_MAPPING_DEFAULT::<key>, but settings |
|---|
| 168 | only apply to the specified <pck>.</p> |
|---|
| 169 | |
|---|
| 170 | <p>Example:</p> |
|---|
| 171 | <pre> |
|---|
| 172 | set::url_browser_mapping::var::location_component_pattern ^//([^/]+)/(.*)$ |
|---|
| 173 | set::url_browser_mapping::var::browser_url_template http://{1}/intertrac/source:{2}{3} |
|---|
| 174 | set::url_browser_mapping::var::browser_rev_template @{1} |
|---|
| 175 | </pre> |
|---|
| 176 | </dd> |
|---|
| 177 | </dl> |
|---|
| 178 | |
|---|
| 179 | </div> |
|---|
| 180 | </div> |
|---|
| 181 | </div> |
|---|
| 182 | |
|---|
| 183 | <hr/> |
|---|
| 184 | <div class="container-fluid text-center"> |
|---|
| 185 | <div class="row"><div class="col-md-12"> |
|---|
| 186 | <address><small> |
|---|
| 187 | Copyright © 2006-2021 British Crown (Met Office) & Contributors. |
|---|
| 188 | <a href="http://www.metoffice.gov.uk">Met Office</a>. |
|---|
| 189 | See <a href="../etc/fcm-terms-of-use.html">Terms of Use</a>.<br /> |
|---|
| 190 | This document is released under the British <a href= |
|---|
| 191 | "http://www.nationalarchives.gov.uk/doc/open-government-licence/" rel= |
|---|
| 192 | "license">Open Government Licence</a>.<br /> |
|---|
| 193 | </small></address> |
|---|
| 194 | </div></div> |
|---|
| 195 | </div> |
|---|
| 196 | |
|---|
| 197 | <script type="text/javascript" src="../etc/jquery.min.js"></script> |
|---|
| 198 | <script type="text/javascript" src="../etc/bootstrap/js/bootstrap.min.js"></script> |
|---|
| 199 | <script type="text/javascript" src="../etc/fcm.js"></script> |
|---|
| 200 | <script type="text/javascript" src="../etc/fcm-version.js"></script> |
|---|
| 201 | </body> |
|---|
| 202 | </html> |
|---|