diff options
Diffstat (limited to 'docs/manifest-format.txt')
| -rw-r--r-- | docs/manifest-format.txt | 72 |
1 files changed, 59 insertions, 13 deletions
diff --git a/docs/manifest-format.txt b/docs/manifest-format.txt index f499868c..0bf09f6f 100644 --- a/docs/manifest-format.txt +++ b/docs/manifest-format.txt | |||
| @@ -41,17 +41,21 @@ following DTD: | |||
| 41 | <!ATTLIST default revision CDATA #IMPLIED> | 41 | <!ATTLIST default revision CDATA #IMPLIED> |
| 42 | <!ATTLIST default sync-j CDATA #IMPLIED> | 42 | <!ATTLIST default sync-j CDATA #IMPLIED> |
| 43 | <!ATTLIST default sync-c CDATA #IMPLIED> | 43 | <!ATTLIST default sync-c CDATA #IMPLIED> |
| 44 | <!ATTLIST default sync-s CDATA #IMPLIED> | ||
| 44 | 45 | ||
| 45 | <!ELEMENT manifest-server (EMPTY)> | 46 | <!ELEMENT manifest-server (EMPTY)> |
| 46 | <!ATTLIST url CDATA #REQUIRED> | 47 | <!ATTLIST url CDATA #REQUIRED> |
| 47 | 48 | ||
| 48 | <!ELEMENT project (annotation?)> | 49 | <!ELEMENT project (annotation?, |
| 50 | project*)> | ||
| 49 | <!ATTLIST project name CDATA #REQUIRED> | 51 | <!ATTLIST project name CDATA #REQUIRED> |
| 50 | <!ATTLIST project path CDATA #IMPLIED> | 52 | <!ATTLIST project path CDATA #IMPLIED> |
| 51 | <!ATTLIST project remote IDREF #IMPLIED> | 53 | <!ATTLIST project remote IDREF #IMPLIED> |
| 52 | <!ATTLIST project revision CDATA #IMPLIED> | 54 | <!ATTLIST project revision CDATA #IMPLIED> |
| 53 | <!ATTLIST project groups CDATA #IMPLIED> | 55 | <!ATTLIST project groups CDATA #IMPLIED> |
| 54 | <!ATTLIST project sync-c CDATA #IMPLIED> | 56 | <!ATTLIST project sync-c CDATA #IMPLIED> |
| 57 | <!ATTLIST project sync-s CDATA #IMPLIED> | ||
| 58 | <!ATTLIST project upstream CDATA #IMPLIED> | ||
| 55 | 59 | ||
| 56 | <!ELEMENT annotation (EMPTY)> | 60 | <!ELEMENT annotation (EMPTY)> |
| 57 | <!ATTLIST annotation name CDATA #REQUIRED> | 61 | <!ATTLIST annotation name CDATA #REQUIRED> |
| @@ -119,6 +123,15 @@ Attribute `revision`: Name of a Git branch (e.g. `master` or | |||
| 119 | `refs/heads/master`). Project elements lacking their own | 123 | `refs/heads/master`). Project elements lacking their own |
| 120 | revision attribute will use this revision. | 124 | revision attribute will use this revision. |
| 121 | 125 | ||
| 126 | Attribute `sync_j`: Number of parallel jobs to use when synching. | ||
| 127 | |||
| 128 | Attribute `sync_c`: Set to true to only sync the given Git | ||
| 129 | branch (specified in the `revision` attribute) rather than the | ||
| 130 | whole ref space. Project elements lacking a sync_c element of | ||
| 131 | their own will use this value. | ||
| 132 | |||
| 133 | Attribute `sync_s`: Set to true to also sync sub-projects. | ||
| 134 | |||
| 122 | 135 | ||
| 123 | Element manifest-server | 136 | Element manifest-server |
| 124 | ----------------------- | 137 | ----------------------- |
| @@ -152,7 +165,10 @@ Element project | |||
| 152 | 165 | ||
| 153 | One or more project elements may be specified. Each element | 166 | One or more project elements may be specified. Each element |
| 154 | describes a single Git repository to be cloned into the repo | 167 | describes a single Git repository to be cloned into the repo |
| 155 | client workspace. | 168 | client workspace. You may specify Git-submodules by creating a |
| 169 | nested project. Git-submodules will be automatically | ||
| 170 | recognized and inherit their parent's attributes, but those | ||
| 171 | may be overridden by an explicitly specified project element. | ||
| 156 | 172 | ||
| 157 | Attribute `name`: A unique name for this project. The project's | 173 | Attribute `name`: A unique name for this project. The project's |
| 158 | name is appended onto its remote's fetch URL to generate the actual | 174 | name is appended onto its remote's fetch URL to generate the actual |
| @@ -163,7 +179,8 @@ URL to configure the Git remote with. The URL gets formed as: | |||
| 163 | where ${remote_fetch} is the remote's fetch attribute and | 179 | where ${remote_fetch} is the remote's fetch attribute and |
| 164 | ${project_name} is the project's name attribute. The suffix ".git" | 180 | ${project_name} is the project's name attribute. The suffix ".git" |
| 165 | is always appended as repo assumes the upstream is a forest of | 181 | is always appended as repo assumes the upstream is a forest of |
| 166 | bare Git repositories. | 182 | bare Git repositories. If the project has a parent element, its |
| 183 | name will be prefixed by the parent's. | ||
| 167 | 184 | ||
| 168 | The project name must match the name Gerrit knows, if Gerrit is | 185 | The project name must match the name Gerrit knows, if Gerrit is |
| 169 | being used for code reviews. | 186 | being used for code reviews. |
| @@ -171,6 +188,8 @@ being used for code reviews. | |||
| 171 | Attribute `path`: An optional path relative to the top directory | 188 | Attribute `path`: An optional path relative to the top directory |
| 172 | of the repo client where the Git working directory for this project | 189 | of the repo client where the Git working directory for this project |
| 173 | should be placed. If not supplied the project name is used. | 190 | should be placed. If not supplied the project name is used. |
| 191 | If the project has a parent element, its path will be prefixed | ||
| 192 | by the parent's. | ||
| 174 | 193 | ||
| 175 | Attribute `remote`: Name of a previously defined remote element. | 194 | Attribute `remote`: Name of a previously defined remote element. |
| 176 | If not supplied the remote given by the default element is used. | 195 | If not supplied the remote given by the default element is used. |
| @@ -190,6 +209,18 @@ its name:`name` and path:`path`. E.g. for | |||
| 190 | definition is implicitly in the following manifest groups: | 209 | definition is implicitly in the following manifest groups: |
| 191 | default, name:monkeys, and path:barrel-of. If you place a project in the | 210 | default, name:monkeys, and path:barrel-of. If you place a project in the |
| 192 | group "notdefault", it will not be automatically downloaded by repo. | 211 | group "notdefault", it will not be automatically downloaded by repo. |
| 212 | If the project has a parent element, the `name` and `path` here | ||
| 213 | are the prefixed ones. | ||
| 214 | |||
| 215 | Attribute `sync_c`: Set to true to only sync the given Git | ||
| 216 | branch (specified in the `revision` attribute) rather than the | ||
| 217 | whole ref space. | ||
| 218 | |||
| 219 | Attribute `sync_s`: Set to true to also sync sub-projects. | ||
| 220 | |||
| 221 | Attribute `upstream`: Name of the Git branch in which a sha1 | ||
| 222 | can be found. Used when syncing a revision locked manifest in | ||
| 223 | -c mode to avoid having to sync the entire ref space. | ||
| 193 | 224 | ||
| 194 | Element annotation | 225 | Element annotation |
| 195 | ------------------ | 226 | ------------------ |
| @@ -209,7 +240,7 @@ Deletes the named project from the internal manifest table, possibly | |||
| 209 | allowing a subsequent project element in the same manifest file to | 240 | allowing a subsequent project element in the same manifest file to |
| 210 | replace the project with a different source. | 241 | replace the project with a different source. |
| 211 | 242 | ||
| 212 | This element is mostly useful in the local_manifest.xml, where | 243 | This element is mostly useful in a local manifest file, where |
| 213 | the user can remove a project, and possibly replace it with their | 244 | the user can remove a project, and possibly replace it with their |
| 214 | own definition. | 245 | own definition. |
| 215 | 246 | ||
| @@ -218,21 +249,25 @@ Element include | |||
| 218 | 249 | ||
| 219 | This element provides the capability of including another manifest | 250 | This element provides the capability of including another manifest |
| 220 | file into the originating manifest. Normal rules apply for the | 251 | file into the originating manifest. Normal rules apply for the |
| 221 | target manifest to include- it must be a usable manifest on it's own. | 252 | target manifest to include - it must be a usable manifest on its own. |
| 222 | 253 | ||
| 223 | Attribute `name`; the manifest to include, specified relative to | 254 | Attribute `name`: the manifest to include, specified relative to |
| 224 | the manifest repositories root. | 255 | the manifest repository's root. |
| 225 | 256 | ||
| 226 | 257 | ||
| 227 | Local Manifest | 258 | Local Manifests |
| 228 | ============== | 259 | =============== |
| 229 | 260 | ||
| 230 | Additional remotes and projects may be added through a local | 261 | Additional remotes and projects may be added through local manifest |
| 231 | manifest, stored in `$TOP_DIR/.repo/local_manifest.xml`. | 262 | files stored in `$TOP_DIR/.repo/local_manifests/*.xml`. |
| 232 | 263 | ||
| 233 | For example: | 264 | For example: |
| 234 | 265 | ||
| 235 | $ cat .repo/local_manifest.xml | 266 | $ ls .repo/local_manifests |
| 267 | local_manifest.xml | ||
| 268 | another_local_manifest.xml | ||
| 269 | |||
| 270 | $ cat .repo/local_manifests/local_manifest.xml | ||
| 236 | <?xml version="1.0" encoding="UTF-8"?> | 271 | <?xml version="1.0" encoding="UTF-8"?> |
| 237 | <manifest> | 272 | <manifest> |
| 238 | <project path="manifest" | 273 | <project path="manifest" |
| @@ -241,6 +276,17 @@ For example: | |||
| 241 | name="platform/manifest" /> | 276 | name="platform/manifest" /> |
| 242 | </manifest> | 277 | </manifest> |
| 243 | 278 | ||
| 244 | Users may add projects to the local manifest prior to a `repo sync` | 279 | Users may add projects to the local manifest(s) prior to a `repo sync` |
| 245 | invocation, instructing repo to automatically download and manage | 280 | invocation, instructing repo to automatically download and manage |
| 246 | these extra projects. | 281 | these extra projects. |
| 282 | |||
| 283 | Manifest files stored in `$TOP_DIR/.repo/local_manifests/*.xml` will | ||
| 284 | be loaded in alphabetical order. | ||
| 285 | |||
| 286 | Additional remotes and projects may also be added through a local | ||
| 287 | manifest, stored in `$TOP_DIR/.repo/local_manifest.xml`. This method | ||
| 288 | is deprecated in favor of using multiple manifest files as mentioned | ||
| 289 | above. | ||
| 290 | |||
| 291 | If `$TOP_DIR/.repo/local_manifest.xml` exists, it will be loaded before | ||
| 292 | any manifest files stored in `$TOP_DIR/.repo/local_manifests/*.xml`. | ||
