diff options
| author | LaMont Jones <lamontjones@google.com> | 2021-11-18 22:40:18 +0000 |
|---|---|---|
| committer | LaMont Jones <lamontjones@google.com> | 2022-02-17 21:57:55 +0000 |
| commit | cc879a97c3e2614d19b15b4661c3cab4d33139c9 (patch) | |
| tree | 69d225e9f0e9d79fec8f423d9c40c275f0bf3b8c /docs/manifest-format.md | |
| parent | 87cce68b28c34fa86895baa8d7f48307382e6c75 (diff) | |
| download | git-repo-cc879a97c3e2614d19b15b4661c3cab4d33139c9.tar.gz | |
Add multi-manifest support with <submanifest> elementv2.22
To be addressed in another change:
- a partial `repo sync` (with a list of projects/paths to sync)
requires `--this-tree-only`.
Change-Id: I6c7400bf001540e9d7694fa70934f8f204cb5f57
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/322657
Tested-by: LaMont Jones <lamontjones@google.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'docs/manifest-format.md')
| -rw-r--r-- | docs/manifest-format.md | 66 |
1 files changed, 65 insertions, 1 deletions
diff --git a/docs/manifest-format.md b/docs/manifest-format.md index 8e0049b3..7c0a7da9 100644 --- a/docs/manifest-format.md +++ b/docs/manifest-format.md | |||
| @@ -26,6 +26,7 @@ following DTD: | |||
| 26 | remote*, | 26 | remote*, |
| 27 | default?, | 27 | default?, |
| 28 | manifest-server?, | 28 | manifest-server?, |
| 29 | submanifest*?, | ||
| 29 | remove-project*, | 30 | remove-project*, |
| 30 | project*, | 31 | project*, |
| 31 | extend-project*, | 32 | extend-project*, |
| @@ -57,6 +58,15 @@ following DTD: | |||
| 57 | <!ELEMENT manifest-server EMPTY> | 58 | <!ELEMENT manifest-server EMPTY> |
| 58 | <!ATTLIST manifest-server url CDATA #REQUIRED> | 59 | <!ATTLIST manifest-server url CDATA #REQUIRED> |
| 59 | 60 | ||
| 61 | <!ELEMENT submanifest EMPTY> | ||
| 62 | <!ATTLIST submanifest name ID #REQUIRED> | ||
| 63 | <!ATTLIST submanifest remote IDREF #IMPLIED> | ||
| 64 | <!ATTLIST submanifest project CDATA #IMPLIED> | ||
| 65 | <!ATTLIST submanifest manifest-name CDATA #IMPLIED> | ||
| 66 | <!ATTLIST submanifest revision CDATA #IMPLIED> | ||
| 67 | <!ATTLIST submanifest path CDATA #IMPLIED> | ||
| 68 | <!ATTLIST submanifest groups CDATA #IMPLIED> | ||
| 69 | |||
| 60 | <!ELEMENT project (annotation*, | 70 | <!ELEMENT project (annotation*, |
| 61 | project*, | 71 | project*, |
| 62 | copyfile*, | 72 | copyfile*, |
| @@ -236,6 +246,60 @@ the specified tag. This is used by repo sync when the --smart-tag option | |||
| 236 | is given. | 246 | is given. |
| 237 | 247 | ||
| 238 | 248 | ||
| 249 | ### Element submanifest | ||
| 250 | |||
| 251 | One or more submanifest elements may be specified. Each element describes a | ||
| 252 | single manifest to be checked out as a child. | ||
| 253 | |||
| 254 | Attribute `name`: A unique name (within the current (sub)manifest) for this | ||
| 255 | submanifest. It acts as a default for `revision` below. The same name can be | ||
| 256 | used for submanifests with different parent (sub)manifests. | ||
| 257 | |||
| 258 | Attribute `remote`: Name of a previously defined remote element. | ||
| 259 | If not supplied the remote given by the default element is used. | ||
| 260 | |||
| 261 | Attribute `project`: The manifest project name. The project's name is appended | ||
| 262 | onto its remote's fetch URL to generate the actual URL to configure the Git | ||
| 263 | remote with. The URL gets formed as: | ||
| 264 | |||
| 265 | ${remote_fetch}/${project_name}.git | ||
| 266 | |||
| 267 | where ${remote_fetch} is the remote's fetch attribute and | ||
| 268 | ${project_name} is the project's name attribute. The suffix ".git" | ||
| 269 | is always appended as repo assumes the upstream is a forest of | ||
| 270 | bare Git repositories. If the project has a parent element, its | ||
| 271 | name will be prefixed by the parent's. | ||
| 272 | |||
| 273 | The project name must match the name Gerrit knows, if Gerrit is | ||
| 274 | being used for code reviews. | ||
| 275 | |||
| 276 | `project` must not be empty, and may not be an absolute path or use "." or ".." | ||
| 277 | path components. It is always interpreted relative to the remote's fetch | ||
| 278 | settings, so if a different base path is needed, declare a different remote | ||
| 279 | with the new settings needed. | ||
| 280 | |||
| 281 | If not supplied the remote and project for this manifest will be used: `remote` | ||
| 282 | cannot be supplied. | ||
| 283 | |||
| 284 | Attribute `manifest-name`: The manifest filename in the manifest project. If | ||
| 285 | not supplied, `default.xml` is used. | ||
| 286 | |||
| 287 | Attribute `revision`: Name of a Git branch (e.g. "main" or "refs/heads/main"), | ||
| 288 | tag (e.g. "refs/tags/stable"), or a commit hash. If not supplied, `name` is | ||
| 289 | used. | ||
| 290 | |||
| 291 | Attribute `path`: An optional path relative to the top directory | ||
| 292 | of the repo client where the submanifest repo client top directory | ||
| 293 | should be placed. If not supplied, `revision` is used. | ||
| 294 | |||
| 295 | `path` may not be an absolute path or use "." or ".." path components. | ||
| 296 | |||
| 297 | Attribute `groups`: List of additional groups to which all projects | ||
| 298 | in the included submanifest belong. This appends and recurses, meaning | ||
| 299 | all projects in submanifests carry all parent submanifest groups. | ||
| 300 | Same syntax as the corresponding element of `project`. | ||
| 301 | |||
| 302 | |||
| 239 | ### Element project | 303 | ### Element project |
| 240 | 304 | ||
| 241 | One or more project elements may be specified. Each element | 305 | One or more project elements may be specified. Each element |
| @@ -471,7 +535,7 @@ These restrictions are not enforced for [Local Manifests]. | |||
| 471 | 535 | ||
| 472 | Attribute `groups`: List of additional groups to which all projects | 536 | Attribute `groups`: List of additional groups to which all projects |
| 473 | in the included manifest belong. This appends and recurses, meaning | 537 | in the included manifest belong. This appends and recurses, meaning |
| 474 | all projects in sub-manifests carry all parent include groups. | 538 | all projects in included manifests carry all parent include groups. |
| 475 | Same syntax as the corresponding element of `project`. | 539 | Same syntax as the corresponding element of `project`. |
| 476 | 540 | ||
| 477 | ## Local Manifests {#local-manifests} | 541 | ## Local Manifests {#local-manifests} |
