blob: 7c0a7da9c9029a55dc1d6af2b22c2b277eeab2b0 [file] [log] [blame] [view]
Mike Frysingerb8f7bb02018-10-10 01:05:11 -04001# repo Manifest Format
Shawn O. Pearce3e548192008-11-04 11:19:36 -08002
3A repo manifest describes the structure of a repo client; that is
4the directories that are visible and where they should be obtained
5from with git.
6
7The basic structure of a manifest is a bare Git repository holding
Mike Frysinger3891b752018-10-05 19:26:15 -04008a single `default.xml` XML file in the top level directory.
Shawn O. Pearce3e548192008-11-04 11:19:36 -08009
10Manifests are inherently version controlled, since they are kept
11within a Git repository. Updates to manifests are automatically
12obtained by clients during `repo sync`.
13
Mike Frysinger3891b752018-10-05 19:26:15 -040014[TOC]
15
Shawn O. Pearce3e548192008-11-04 11:19:36 -080016
Mike Frysingerb8f7bb02018-10-10 01:05:11 -040017## XML File Format
Shawn O. Pearce3e548192008-11-04 11:19:36 -080018
Mike Frysinger3891b752018-10-05 19:26:15 -040019A manifest XML file (e.g. `default.xml`) roughly conforms to the
Shawn O. Pearce3e548192008-11-04 11:19:36 -080020following DTD:
21
Mike Frysinger3891b752018-10-05 19:26:15 -040022```xml
23
Mike Frysinger0888a082021-04-13 20:22:01 -040024
Mike Frysinger3891b752018-10-05 19:26:15 -040025
26 remote*,
27 default?,
28 manifest-server?,
LaMont Jonescc879a92021-11-18 22:40:18 +000029 submanifest*?,
Mike Frysinger3891b752018-10-05 19:26:15 -040030 remove-project*,
31 project*,
32 extend-project*,
33 repo-hooks?,
Raman Tenneti1bb4fb22021-01-07 16:50:45 -080034 superproject?,
Raman Tenneti1c3f57e2021-05-04 12:32:13 -070035 contactinfo?,
Mike Frysinger3891b752018-10-05 19:26:15 -040036 include*)>
Chirayu Desaid5a5b192013-11-21 19:15:30 +053037
Mike Frysinger3891b752018-10-05 19:26:15 -040038
Chirayu Desaid5a5b192013-11-21 19:15:30 +053039
Jack Neus6ea0cae2021-07-20 20:52:33 +000040
Mike Frysinger3891b752018-10-05 19:26:15 -040041
42
43
44
45
46
Chirayu Desaid5a5b192013-11-21 19:15:30 +053047
Mike Frysinger3891b752018-10-05 19:26:15 -040048
49
50
51
52
53
54
55
56
Nico Sallembiena1bfd2c2010-04-06 10:40:01 -070057
Mike Frysinger3891b752018-10-05 19:26:15 -040058
59
Chirayu Desaid5a5b192013-11-21 19:15:30 +053060
LaMont Jonescc879a92021-11-18 22:40:18 +000061
62
63
64
65
66
67
68
69
Mike Frysinger3891b752018-10-05 19:26:15 -040070
71 project*,
72 copyfile*,
73 linkfile*)>
74
75
76
77
78
79
80
81
Kyunam Jo01019d92019-03-18 13:30:58 +090082
Mike Frysinger3891b752018-10-05 19:26:15 -040083
84
85
James W. Mills24c13082012-04-12 15:04:13 -050086
Mike Frysinger3891b752018-10-05 19:26:15 -040087
88
89
90
Chirayu Desaid5a5b192013-11-21 19:15:30 +053091
Mike Frysinger3891b752018-10-05 19:26:15 -040092
93
94
Ruslan Bilovol54527e72015-09-08 13:11:23 +030095
Mike Frysinger3891b752018-10-05 19:26:15 -040096
97
98
Ruslan Bilovol54527e72015-09-08 13:11:23 +030099
Mike Frysinger3891b752018-10-05 19:26:15 -0400100
101
102
Michael Kelly37c21c22020-06-13 02:10:40 -0700103
Mike Frysinger3891b752018-10-05 19:26:15 -0400104
105
Kyunam Jobd0aae92020-02-04 11:38:53 +0900106
Josh Triplett884a3872014-06-12 14:57:29 -0700107
Mike Frysinger3891b752018-10-05 19:26:15 -0400108
109
Michael Kelly06da9982021-06-30 01:58:28 -0700110
Doug Anderson37282b42011-03-04 11:54:18 -0800111
Mike Frysinger3891b752018-10-05 19:26:15 -0400112
113
114
Brian Harring26448742011-04-28 05:04:41 -0700115
Raman Tenneti1c3f57e2021-05-04 12:32:13 -0700116
Xin Lie0b16a22021-09-26 23:20:32 -0700117
118
119
Raman Tenneti1bb4fb22021-01-07 16:50:45 -0800120
Raman Tenneti1c3f57e2021-05-04 12:32:13 -0700121
122
123
Mike Frysinger3891b752018-10-05 19:26:15 -0400124
Fredrik de Groot352c93b2020-10-06 12:55:14 +0200125
126
Mike Frysinger3891b752018-10-05 19:26:15 -0400127]>
128```
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800129
Raman Tenneti48b2d102021-01-11 12:18:47 -0800130For compatibility purposes across repo releases, all unknown elements are
131silently ignored. However, repo reserves all possible names for itself for
132future use. If you want to use custom elements, the `x-*` namespace is
133reserved for that purpose, and repo guarantees to never allocate any
134corresponding names.
135
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800136A description of the elements and their attributes follows.
137
138
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400139### Element manifest
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800140
141The root element of the file.
142
Mike Frysinger51e39d52020-12-04 05:32:06 -0500143### Element notice
144
145Arbitrary text that is displayed to users whenever `repo sync` finishes.
146The content is simply passed through as it exists in the manifest.
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800147
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400148### Element remote
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800149
150One or more remote elements may be specified. Each remote element
151specifies a Git URL shared by one or more projects and (optionally)
152the Gerrit review server those projects upload changes through.
153
154Attribute `name`: A short name unique to this manifest file. The
155name specified here is used as the remote name in each project's
156.git/config, and is therefore automatically available to commands
157like `git fetch`, `git remote`, `git pull` and `git push`.
158
Yestin Sunb292b982012-07-02 07:32:50 -0700159Attribute `alias`: The alias, if specified, is used to override
160`name` to be set as the remote name in each project's .git/config.
161Its value can be duplicated while attribute `name` has to be unique
162in the manifest file. This helps each project to be able to have
163same remote name which actually points to different remote url.
164
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800165Attribute `fetch`: The Git URL prefix for all projects which use
166this remote. Each project's name is appended to this prefix to
167form the actual URL used to clone the project.
168
Steve Raed6480452016-08-10 15:00:00 -0700169Attribute `pushurl`: The Git "push" URL prefix for all projects
170which use this remote. Each project's name is appended to this
171prefix to form the actual URL used to "git push" the project.
172This attribute is optional; if not specified then "git push"
173will use the same URL as the `fetch` attribute.
174
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800175Attribute `review`: Hostname of the Gerrit server where reviews
176are uploaded to by `repo upload`. This attribute is optional;
177if not specified then `repo upload` will not function.
178
Mike Frysinger6e89c962020-11-15 18:42:26 -0500179Attribute `revision`: Name of a Git branch (e.g. `main` or
180`refs/heads/main`). Remotes with their own revision will override
Anthony King36ea2fb2014-05-06 11:54:01 +0100181the default revision.
182
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400183### Element default
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800184
185At most one default element may be specified. Its remote and
186revision attributes are used when a project element does not
187specify its own remote or revision attribute.
188
189Attribute `remote`: Name of a previously defined remote element.
190Project elements lacking a remote attribute of their own will use
191this remote.
192
Mike Frysinger6e89c962020-11-15 18:42:26 -0500193Attribute `revision`: Name of a Git branch (e.g. `main` or
194`refs/heads/main`). Project elements lacking their own
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800195revision attribute will use this revision.
196
Mike Frysinger6e89c962020-11-15 18:42:26 -0500197Attribute `dest-branch`: Name of a Git branch (e.g. `main`).
Bryan Jacobsf609f912013-05-06 13:36:24 -0400198Project elements not setting their own `dest-branch` will inherit
199this value. If this value is not set, projects will use `revision`
200by default instead.
201
Nasser Grainawida403412018-05-04 12:53:29 -0600202Attribute `upstream`: Name of the Git ref in which a sha1
203can be found. Used when syncing a revision locked manifest in
204-c mode to avoid having to sync the entire ref space. Project elements
205not setting their own `upstream` will inherit this value.
206
Mani Chandel7a91d512014-07-24 16:27:08 +0530207Attribute `sync-j`: Number of parallel jobs to use when synching.
David Pursehouse4e465202012-11-27 22:20:10 +0900208
Mani Chandel7a91d512014-07-24 16:27:08 +0530209Attribute `sync-c`: Set to true to only sync the given Git
David Pursehouse4e465202012-11-27 22:20:10 +0900210branch (specified in the `revision` attribute) rather than the
Mani Chandel7a91d512014-07-24 16:27:08 +0530211whole ref space. Project elements lacking a sync-c element of
David Pursehouse4e465202012-11-27 22:20:10 +0900212their own will use this value.
213
Mani Chandel7a91d512014-07-24 16:27:08 +0530214Attribute `sync-s`: Set to true to also sync sub-projects.
David Pursehouse4e465202012-11-27 22:20:10 +0900215
YOUNG HO CHAa32c92c2018-02-14 16:57:31 +0900216Attribute `sync-tags`: Set to false to only sync the given Git
217branch (specified in the `revision` attribute) rather than
218the other ref tags.
219
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800220
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400221### Element manifest-server
Nico Sallembiena1bfd2c2010-04-06 10:40:01 -0700222
223At most one manifest-server may be specified. The url attribute
224is used to specify the URL of a manifest server, which is an
David Pursehouse9a27d012012-08-21 14:23:49 +0900225XML RPC service.
Nico Sallembiena1bfd2c2010-04-06 10:40:01 -0700226
David Pursehouse9a27d012012-08-21 14:23:49 +0900227The manifest server should implement the following RPC methods:
Nico Sallembiena1bfd2c2010-04-06 10:40:01 -0700228
Mike Frysinger3891b752018-10-05 19:26:15 -0400229 GetApprovedManifest(branch, target)
Nico Sallembiena1bfd2c2010-04-06 10:40:01 -0700230
David Pursehouse9a27d012012-08-21 14:23:49 +0900231Return a manifest in which each project is pegged to a known good revision
David Pursehousee8688412016-04-13 17:55:34 +0900232for the current branch and target. This is used by repo sync when the
233--smart-sync option is given.
David Pursehouse9a27d012012-08-21 14:23:49 +0900234
Nico Sallembiena1bfd2c2010-04-06 10:40:01 -0700235The target to use is defined by environment variables TARGET_PRODUCT
236and TARGET_BUILD_VARIANT. These variables are used to create a string
237of the form $TARGET_PRODUCT-$TARGET_BUILD_VARIANT, e.g. passion-userdebug.
238If one of those variables or both are not present, the program will call
David Pursehousedaa851f2012-08-21 13:52:18 +0900239GetApprovedManifest without the target parameter and the manifest server
Nico Sallembiena1bfd2c2010-04-06 10:40:01 -0700240should choose a reasonable default target.
241
Mike Frysinger3891b752018-10-05 19:26:15 -0400242 GetManifest(tag)
David Pursehouse9a27d012012-08-21 14:23:49 +0900243
244Return a manifest in which each project is pegged to the revision at
David Pursehousee8688412016-04-13 17:55:34 +0900245the specified tag. This is used by repo sync when the --smart-tag option
246is given.
David Pursehouse9a27d012012-08-21 14:23:49 +0900247
Nico Sallembiena1bfd2c2010-04-06 10:40:01 -0700248
LaMont Jonescc879a92021-11-18 22:40:18 +0000249### Element submanifest
250
251One or more submanifest elements may be specified. Each element describes a
252single manifest to be checked out as a child.
253
254Attribute `name`: A unique name (within the current (sub)manifest) for this
255submanifest. It acts as a default for `revision` below. The same name can be
256used for submanifests with different parent (sub)manifests.
257
258Attribute `remote`: Name of a previously defined remote element.
259If not supplied the remote given by the default element is used.
260
261Attribute `project`: The manifest project name. The project's name is appended
262onto its remote's fetch URL to generate the actual URL to configure the Git
263remote with. The URL gets formed as:
264
265 ${remote_fetch}/${project_name}.git
266
267where ${remote_fetch} is the remote's fetch attribute and
268${project_name} is the project's name attribute. The suffix ".git"
269is always appended as repo assumes the upstream is a forest of
270bare Git repositories. If the project has a parent element, its
271name will be prefixed by the parent's.
272
273The project name must match the name Gerrit knows, if Gerrit is
274being used for code reviews.
275
276`project` must not be empty, and may not be an absolute path or use "." or ".."
277path components. It is always interpreted relative to the remote's fetch
278settings, so if a different base path is needed, declare a different remote
279with the new settings needed.
280
281If not supplied the remote and project for this manifest will be used: `remote`
282cannot be supplied.
283
284Attribute `manifest-name`: The manifest filename in the manifest project. If
285not supplied, `default.xml` is used.
286
287Attribute `revision`: Name of a Git branch (e.g. "main" or "refs/heads/main"),
288tag (e.g. "refs/tags/stable"), or a commit hash. If not supplied, `name` is
289used.
290
291Attribute `path`: An optional path relative to the top directory
292of the repo client where the submanifest repo client top directory
293should be placed. If not supplied, `revision` is used.
294
295`path` may not be an absolute path or use "." or ".." path components.
296
297Attribute `groups`: List of additional groups to which all projects
298in the included submanifest belong. This appends and recurses, meaning
299all projects in submanifests carry all parent submanifest groups.
300Same syntax as the corresponding element of `project`.
301
302
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400303### Element project
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800304
305One or more project elements may be specified. Each element
306describes a single Git repository to be cloned into the repo
Che-Liang Chioub2bd91c2012-01-11 11:28:42 +0800307client workspace. You may specify Git-submodules by creating a
308nested project. Git-submodules will be automatically
309recognized and inherit their parent's attributes, but those
310may be overridden by an explicitly specified project element.
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800311
312Attribute `name`: A unique name for this project. The project's
313name is appended onto its remote's fetch URL to generate the actual
314URL to configure the Git remote with. The URL gets formed as:
315
Mike Frysinger3891b752018-10-05 19:26:15 -0400316 ${remote_fetch}/${project_name}.git
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800317
318where ${remote_fetch} is the remote's fetch attribute and
319${project_name} is the project's name attribute. The suffix ".git"
David Pursehousedaa851f2012-08-21 13:52:18 +0900320is always appended as repo assumes the upstream is a forest of
Che-Liang Chioub2bd91c2012-01-11 11:28:42 +0800321bare Git repositories. If the project has a parent element, its
322name will be prefixed by the parent's.
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800323
324The project name must match the name Gerrit knows, if Gerrit is
325being used for code reviews.
326
Mike Frysinger68d5d4d2021-03-09 11:56:24 -0500327"name" must not be empty, and may not be an absolute path or use "." or ".."
328path components. It is always interpreted relative to the remote's fetch
329settings, so if a different base path is needed, declare a different remote
330with the new settings needed.
331These restrictions are not enforced for [Local Manifests].
332
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800333Attribute `path`: An optional path relative to the top directory
334of the repo client where the Git working directory for this project
Mike Frysinger68d5d4d2021-03-09 11:56:24 -0500335should be placed. If not supplied the project "name" is used.
Che-Liang Chioub2bd91c2012-01-11 11:28:42 +0800336If the project has a parent element, its path will be prefixed
337by the parent's.
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800338
Mike Frysinger68d5d4d2021-03-09 11:56:24 -0500339"path" may not be an absolute path or use "." or ".." path components.
340These restrictions are not enforced for [Local Manifests].
341
342If you want to place files into the root of the checkout (e.g. a README or
343Makefile or another build script), use the [copyfile] or [linkfile] elements
344instead.
345
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800346Attribute `remote`: Name of a previously defined remote element.
347If not supplied the remote given by the default element is used.
348
349Attribute `revision`: Name of the Git branch the manifest wants
350to track for this project. Names can be relative to refs/heads
Mike Frysinger6e89c962020-11-15 18:42:26 -0500351(e.g. just "main") or absolute (e.g. "refs/heads/main").
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800352Tags and/or explicit SHA-1s should work in theory, but have not
353been extensively tested. If not supplied the revision given by
Anthony King36ea2fb2014-05-06 11:54:01 +0100354the remote element is used if applicable, else the default
355element is used.
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800356
Mike Frysinger6e89c962020-11-15 18:42:26 -0500357Attribute `dest-branch`: Name of a Git branch (e.g. `main`).
Bryan Jacobsf609f912013-05-06 13:36:24 -0400358When using `repo upload`, changes will be submitted for code
359review on this branch. If unspecified both here and in the
360default element, `revision` is used instead.
361
Colin Cross5acde752012-03-28 20:15:45 -0700362Attribute `groups`: List of groups to which this project belongs,
Conley Owens971de8e2012-04-16 10:36:08 -0700363whitespace or comma separated. All projects belong to the group
Conley Owensbb1b5f52012-08-13 13:11:18 -0700364"all", and each project automatically belongs to a group of
365its name:`name` and path:`path`. E.g. for
Jashank Jeremy97477472020-12-12 20:50:22 +1100366``, that project
Brian Harring7da13142012-06-15 02:24:20 -0700367definition is implicitly in the following manifest groups:
Conley Owensbb1b5f52012-08-13 13:11:18 -0700368default, name:monkeys, and path:barrel-of. If you place a project in the
369group "notdefault", it will not be automatically downloaded by repo.
Che-Liang Chioub2bd91c2012-01-11 11:28:42 +0800370If the project has a parent element, the `name` and `path` here
371are the prefixed ones.
Colin Cross5acde752012-03-28 20:15:45 -0700372
Mani Chandel7a91d512014-07-24 16:27:08 +0530373Attribute `sync-c`: Set to true to only sync the given Git
David Pursehouse4e465202012-11-27 22:20:10 +0900374branch (specified in the `revision` attribute) rather than the
375whole ref space.
376
Mani Chandel7a91d512014-07-24 16:27:08 +0530377Attribute `sync-s`: Set to true to also sync sub-projects.
David Pursehouse4e465202012-11-27 22:20:10 +0900378
Nasser Grainawi909d58b2014-09-19 12:13:04 -0600379Attribute `upstream`: Name of the Git ref in which a sha1
David Pursehouse4e465202012-11-27 22:20:10 +0900380can be found. Used when syncing a revision locked manifest in
381-c mode to avoid having to sync the entire ref space.
382
David Pursehouseede7f122012-11-27 22:25:30 +0900383Attribute `clone-depth`: Set the depth to use when fetching this
384project. If specified, this value will override any value given
385to repo init with the --depth option on the command line.
386
Scott Fandb83b1b2013-02-28 09:34:14 +0800387Attribute `force-path`: Set to true to force this project to create the
388local mirror repository according to its `path` attribute (if supplied)
389rather than the `name` attribute. This attribute only applies to the
390local mirrors syncing, it will be ignored when syncing the projects in a
391client working directory.
392
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400393### Element extend-project
Josh Triplett884a3872014-06-12 14:57:29 -0700394
395Modify the attributes of the named project.
396
397This element is mostly useful in a local manifest file, to modify the
398attributes of an existing project without completely replacing the
399existing project definition. This makes the local manifest more robust
400against changes to the original manifest.
401
402Attribute `path`: If specified, limit the change to projects checked out
403at the specified path, rather than all projects with the given name.
404
Michael Kelly37c21c22020-06-13 02:10:40 -0700405Attribute `dest-path`: If specified, a path relative to the top directory
406of the repo client where the Git working directory for this project
407should be placed. This is used to move a project in the checkout by
408overriding the existing `path` setting.
409
Josh Triplett884a3872014-06-12 14:57:29 -0700410Attribute `groups`: List of additional groups to which this project
411belongs. Same syntax as the corresponding element of `project`.
412
Luis Hector Chavez7d525852018-03-15 09:54:08 -0700413Attribute `revision`: If specified, overrides the revision of the original
414project. Same syntax as the corresponding element of `project`.
415
Kyunam Jobd0aae92020-02-04 11:38:53 +0900416Attribute `remote`: If specified, overrides the remote of the original
417project. Same syntax as the corresponding element of `project`.
418
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400419### Element annotation
James W. Mills24c13082012-04-12 15:04:13 -0500420
421Zero or more annotation elements may be specified as children of a
Jack Neus6ea0cae2021-07-20 20:52:33 +0000422project or remote element. Each element describes a name-value pair.
423For projects, this name-value pair will be exported into each project's
424environment during a 'forall' command, prefixed with `REPO__`. In addition,
425there is an optional attribute "keep" which accepts the case insensitive values
426"true" (default) or "false". This attribute determines whether or not the
427annotation will be kept when exported with the manifest subcommand.
James W. Mills24c13082012-04-12 15:04:13 -0500428
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400429### Element copyfile
Ruslan Bilovol54527e72015-09-08 13:11:23 +0300430
431Zero or more copyfile elements may be specified as children of a
432project element. Each element describes a src-dest pair of files;
Mike Frysinger3891b752018-10-05 19:26:15 -0400433the "src" file will be copied to the "dest" place during `repo sync`
Ruslan Bilovol54527e72015-09-08 13:11:23 +0300434command.
Mike Frysingerc5b172a2019-07-31 17:34:23 -0400435
Ruslan Bilovol54527e72015-09-08 13:11:23 +0300436"src" is project relative, "dest" is relative to the top of the tree.
Mike Frysingerc5b172a2019-07-31 17:34:23 -0400437Copying from paths outside of the project or to paths outside of the repo
438client is not allowed.
439
440"src" and "dest" must be files. Directories or symlinks are not allowed.
441Intermediate paths must not be symlinks either.
Ruslan Bilovol54527e72015-09-08 13:11:23 +0300442
Mike Frysinger50d27632019-08-01 18:57:10 -0400443Parent directories of "dest" will be automatically created if missing.
444
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400445### Element linkfile
Ruslan Bilovol54527e72015-09-08 13:11:23 +0300446
447It's just like copyfile and runs at the same time as copyfile but
448instead of copying it creates a symlink.
449
Mike Frysingerc5b172a2019-07-31 17:34:23 -0400450The symlink is created at "dest" (relative to the top of the tree) and
Mike Frysinger04122b72019-07-31 23:32:58 -0400451points to the path specified by "src" which is a path in the project.
Mike Frysingerc5b172a2019-07-31 17:34:23 -0400452
Mike Frysinger50d27632019-08-01 18:57:10 -0400453Parent directories of "dest" will be automatically created if missing.
454
Mike Frysingerc5b172a2019-07-31 17:34:23 -0400455The symlink target may be a file or directory, but it may not point outside
456of the repo client.
457
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400458### Element remove-project
Shawn O. Pearce03eaf072008-11-20 11:42:22 -0800459
460Deletes the named project from the internal manifest table, possibly
461allowing a subsequent project element in the same manifest file to
462replace the project with a different source.
463
David Pursehouseb1525bf2012-11-14 08:51:38 +0900464This element is mostly useful in a local manifest file, where
Shawn O. Pearce03eaf072008-11-20 11:42:22 -0800465the user can remove a project, and possibly replace it with their
466own definition.
467
Michael Kelly06da9982021-06-30 01:58:28 -0700468Attribute `optional`: Set to true to ignore remove-project elements with no
469matching `project` element.
470
Mike Frysinger51e39d52020-12-04 05:32:06 -0500471### Element repo-hooks
472
473NB: See the [practical documentation](./repo-hooks.md) for using repo hooks.
474
475Only one repo-hooks element may be specified at a time.
476Attempting to redefine it will fail to parse.
477
478Attribute `in-project`: The project where the hooks are defined. The value
479must match the `name` attribute (**not** the `path` attribute) of a previously
480defined `project` element.
481
482Attribute `enabled-list`: List of hooks to use, whitespace or comma separated.
483
Raman Tenneti1bb4fb22021-01-07 16:50:45 -0800484### Element superproject
485
486***
Raman Tenneti1c3f57e2021-05-04 12:32:13 -0700487*Note*: This is currently a WIP.
Raman Tenneti1bb4fb22021-01-07 16:50:45 -0800488***
489
490NB: See the [git superprojects documentation](
491https://en.wikibooks.org/wiki/Git/Submodules_and_Superprojects) for background
492information.
493
494This element is used to specify the URL of the superproject. It has "name" and
495"remote" as atrributes. Only "name" is required while the others have
496reasonable defaults. At most one superproject may be specified.
497Attempting to redefine it will fail to parse.
498
499Attribute `name`: A unique name for the superproject. This attribute has the
500same meaning as project's name attribute. See the
501[element project](#element-project) for more information.
502
503Attribute `remote`: Name of a previously defined remote element.
504If not supplied the remote given by the default element is used.
505
Xin Lie0b16a22021-09-26 23:20:32 -0700506Attribute `revision`: Name of the Git branch the manifest wants
507to track for this superproject. If not supplied the revision given
508by the remote element is used if applicable, else the default
509element is used.
510
Raman Tenneti1c3f57e2021-05-04 12:32:13 -0700511### Element contactinfo
512
513***
514*Note*: This is currently a WIP.
515***
516
517This element is used to let manifest authors self-register contact info.
518It has "bugurl" as a required atrribute. This element can be repeated,
519and any later entries will clobber earlier ones. This would allow manifest
520authors who extend manifests to specify their own contact info.
521
522Attribute `bugurl`: The URL to file a bug against the manifest owner.
523
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400524### Element include
Brian Harring26448742011-04-28 05:04:41 -0700525
526This element provides the capability of including another manifest
527file into the originating manifest. Normal rules apply for the
David Pursehouse9f3406e2012-11-14 08:52:25 +0900528target manifest to include - it must be a usable manifest on its own.
Brian Harring26448742011-04-28 05:04:41 -0700529
David Pursehouse9f3406e2012-11-14 08:52:25 +0900530Attribute `name`: the manifest to include, specified relative to
531the manifest repository's root.
Brian Harring26448742011-04-28 05:04:41 -0700532
Mike Frysinger68d5d4d2021-03-09 11:56:24 -0500533"name" may not be an absolute path or use "." or ".." path components.
534These restrictions are not enforced for [Local Manifests].
535
Fredrik de Groot352c93b2020-10-06 12:55:14 +0200536Attribute `groups`: List of additional groups to which all projects
537in the included manifest belong. This appends and recurses, meaning
LaMont Jonescc879a92021-11-18 22:40:18 +0000538all projects in included manifests carry all parent include groups.
Fredrik de Groot352c93b2020-10-06 12:55:14 +0200539Same syntax as the corresponding element of `project`.
Shawn O. Pearce03eaf072008-11-20 11:42:22 -0800540
Mike Frysinger68d5d4d2021-03-09 11:56:24 -0500541## Local Manifests {#local-manifests}
Shawn O. Pearce70cd4ab2008-11-06 08:48:44 -0800542
David Pursehouse2d5a0df2012-11-13 02:50:36 +0900543Additional remotes and projects may be added through local manifest
544files stored in `$TOP_DIR/.repo/local_manifests/*.xml`.
Shawn O. Pearce70cd4ab2008-11-06 08:48:44 -0800545
546For example:
547
Mike Frysinger3891b752018-10-05 19:26:15 -0400548 $ ls .repo/local_manifests
549 local_manifest.xml
550 another_local_manifest.xml
David Pursehouse2d5a0df2012-11-13 02:50:36 +0900551
Mike Frysinger3891b752018-10-05 19:26:15 -0400552 $ cat .repo/local_manifests/local_manifest.xml
553
554
555
556 name="tools/manifest" />
557
558 name="platform/manifest" />
559
Shawn O. Pearce70cd4ab2008-11-06 08:48:44 -0800560
David Pursehouse2d5a0df2012-11-13 02:50:36 +0900561Users may add projects to the local manifest(s) prior to a `repo sync`
Shawn O. Pearce70cd4ab2008-11-06 08:48:44 -0800562invocation, instructing repo to automatically download and manage
563these extra projects.
David Pursehouse2d5a0df2012-11-13 02:50:36 +0900564
David Pursehouse52f1e5d2012-11-14 04:53:24 +0900565Manifest files stored in `$TOP_DIR/.repo/local_manifests/*.xml` will
566be loaded in alphabetical order.
567
Raman Tenneti78f4dd32021-06-07 13:27:37 -0700568Projects from local manifest files are added into
569local:: group.
570
Mike Frysinger4e1fc102020-09-06 14:42:47 -0400571The legacy `$TOP_DIR/.repo/local_manifest.xml` path is no longer supported.
Mike Frysinger68d5d4d2021-03-09 11:56:24 -0500572
573
574[copyfile]: #Element-copyfile
575[linkfile]: #Element-linkfile
576[Local Manifests]: #local-manifests