blob: bcdf5a8e9fdfa5cc1f96ce7faff535d73c04d38e [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
LaMont Jones501733c2022-04-20 16:42:32 +000069
LaMont Jonescc879a92021-11-18 22:40:18 +000070
Mike Frysinger3891b752018-10-05 19:26:15 -040071
72 project*,
73 copyfile*,
74 linkfile*)>
75
76
77
78
79
80
81
82
Kyunam Jo01019d92019-03-18 13:30:58 +090083
Mike Frysinger3891b752018-10-05 19:26:15 -040084
85
86
James W. Mills24c13082012-04-12 15:04:13 -050087
Mike Frysinger3891b752018-10-05 19:26:15 -040088
89
90
91
Chirayu Desaid5a5b192013-11-21 19:15:30 +053092
Mike Frysinger3891b752018-10-05 19:26:15 -040093
94
95
Ruslan Bilovol54527e72015-09-08 13:11:23 +030096
Mike Frysinger3891b752018-10-05 19:26:15 -040097
98
99
Ruslan Bilovol54527e72015-09-08 13:11:23 +0300100
Mike Frysinger3891b752018-10-05 19:26:15 -0400101
102
103
Michael Kelly37c21c22020-06-13 02:10:40 -0700104
Mike Frysinger3891b752018-10-05 19:26:15 -0400105
106
Kyunam Jobd0aae92020-02-04 11:38:53 +0900107
Erik Elmeke4cdfdb72022-09-09 17:13:17 +0200108
109
Josh Triplett884a3872014-06-12 14:57:29 -0700110
Mike Frysinger3891b752018-10-05 19:26:15 -0400111
112
Michael Kelly06da9982021-06-30 01:58:28 -0700113
Doug Anderson37282b42011-03-04 11:54:18 -0800114
Mike Frysinger3891b752018-10-05 19:26:15 -0400115
116
117
Brian Harring26448742011-04-28 05:04:41 -0700118
Raman Tenneti1c3f57e2021-05-04 12:32:13 -0700119
Xin Lie0b16a22021-09-26 23:20:32 -0700120
121
122
Raman Tenneti1bb4fb22021-01-07 16:50:45 -0800123
Raman Tenneti1c3f57e2021-05-04 12:32:13 -0700124
125
126
Mike Frysinger3891b752018-10-05 19:26:15 -0400127
Fredrik de Groot352c93b2020-10-06 12:55:14 +0200128
129
Mike Frysinger3891b752018-10-05 19:26:15 -0400130]>
131```
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800132
Raman Tenneti48b2d102021-01-11 12:18:47 -0800133For compatibility purposes across repo releases, all unknown elements are
134silently ignored. However, repo reserves all possible names for itself for
135future use. If you want to use custom elements, the `x-*` namespace is
136reserved for that purpose, and repo guarantees to never allocate any
137corresponding names.
138
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800139A description of the elements and their attributes follows.
140
141
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400142### Element manifest
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800143
144The root element of the file.
145
Mike Frysinger51e39d52020-12-04 05:32:06 -0500146### Element notice
147
148Arbitrary text that is displayed to users whenever `repo sync` finishes.
149The content is simply passed through as it exists in the manifest.
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800150
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400151### Element remote
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800152
153One or more remote elements may be specified. Each remote element
154specifies a Git URL shared by one or more projects and (optionally)
155the Gerrit review server those projects upload changes through.
156
157Attribute `name`: A short name unique to this manifest file. The
158name specified here is used as the remote name in each project's
159.git/config, and is therefore automatically available to commands
160like `git fetch`, `git remote`, `git pull` and `git push`.
161
Yestin Sunb292b982012-07-02 07:32:50 -0700162Attribute `alias`: The alias, if specified, is used to override
163`name` to be set as the remote name in each project's .git/config.
164Its value can be duplicated while attribute `name` has to be unique
165in the manifest file. This helps each project to be able to have
166same remote name which actually points to different remote url.
167
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800168Attribute `fetch`: The Git URL prefix for all projects which use
169this remote. Each project's name is appended to this prefix to
170form the actual URL used to clone the project.
171
Steve Raed6480452016-08-10 15:00:00 -0700172Attribute `pushurl`: The Git "push" URL prefix for all projects
173which use this remote. Each project's name is appended to this
174prefix to form the actual URL used to "git push" the project.
175This attribute is optional; if not specified then "git push"
176will use the same URL as the `fetch` attribute.
177
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800178Attribute `review`: Hostname of the Gerrit server where reviews
179are uploaded to by `repo upload`. This attribute is optional;
180if not specified then `repo upload` will not function.
181
Mike Frysinger6e89c962020-11-15 18:42:26 -0500182Attribute `revision`: Name of a Git branch (e.g. `main` or
183`refs/heads/main`). Remotes with their own revision will override
Anthony King36ea2fb2014-05-06 11:54:01 +0100184the default revision.
185
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400186### Element default
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800187
188At most one default element may be specified. Its remote and
189revision attributes are used when a project element does not
190specify its own remote or revision attribute.
191
192Attribute `remote`: Name of a previously defined remote element.
193Project elements lacking a remote attribute of their own will use
194this remote.
195
Mike Frysinger6e89c962020-11-15 18:42:26 -0500196Attribute `revision`: Name of a Git branch (e.g. `main` or
197`refs/heads/main`). Project elements lacking their own
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800198revision attribute will use this revision.
199
Mike Frysinger6e89c962020-11-15 18:42:26 -0500200Attribute `dest-branch`: Name of a Git branch (e.g. `main`).
Bryan Jacobsf609f912013-05-06 13:36:24 -0400201Project elements not setting their own `dest-branch` will inherit
202this value. If this value is not set, projects will use `revision`
203by default instead.
204
Nasser Grainawida403412018-05-04 12:53:29 -0600205Attribute `upstream`: Name of the Git ref in which a sha1
206can be found. Used when syncing a revision locked manifest in
207-c mode to avoid having to sync the entire ref space. Project elements
208not setting their own `upstream` will inherit this value.
209
Mani Chandel7a91d512014-07-24 16:27:08 +0530210Attribute `sync-j`: Number of parallel jobs to use when synching.
David Pursehouse4e465202012-11-27 22:20:10 +0900211
Mani Chandel7a91d512014-07-24 16:27:08 +0530212Attribute `sync-c`: Set to true to only sync the given Git
David Pursehouse4e465202012-11-27 22:20:10 +0900213branch (specified in the `revision` attribute) rather than the
Mani Chandel7a91d512014-07-24 16:27:08 +0530214whole ref space. Project elements lacking a sync-c element of
David Pursehouse4e465202012-11-27 22:20:10 +0900215their own will use this value.
216
Mani Chandel7a91d512014-07-24 16:27:08 +0530217Attribute `sync-s`: Set to true to also sync sub-projects.
David Pursehouse4e465202012-11-27 22:20:10 +0900218
YOUNG HO CHAa32c92c2018-02-14 16:57:31 +0900219Attribute `sync-tags`: Set to false to only sync the given Git
220branch (specified in the `revision` attribute) rather than
221the other ref tags.
222
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800223
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400224### Element manifest-server
Nico Sallembiena1bfd2c2010-04-06 10:40:01 -0700225
226At most one manifest-server may be specified. The url attribute
227is used to specify the URL of a manifest server, which is an
David Pursehouse9a27d012012-08-21 14:23:49 +0900228XML RPC service.
Nico Sallembiena1bfd2c2010-04-06 10:40:01 -0700229
David Pursehouse9a27d012012-08-21 14:23:49 +0900230The manifest server should implement the following RPC methods:
Nico Sallembiena1bfd2c2010-04-06 10:40:01 -0700231
Mike Frysinger3891b752018-10-05 19:26:15 -0400232 GetApprovedManifest(branch, target)
Nico Sallembiena1bfd2c2010-04-06 10:40:01 -0700233
David Pursehouse9a27d012012-08-21 14:23:49 +0900234Return a manifest in which each project is pegged to a known good revision
David Pursehousee8688412016-04-13 17:55:34 +0900235for the current branch and target. This is used by repo sync when the
236--smart-sync option is given.
David Pursehouse9a27d012012-08-21 14:23:49 +0900237
Nico Sallembiena1bfd2c2010-04-06 10:40:01 -0700238The target to use is defined by environment variables TARGET_PRODUCT
239and TARGET_BUILD_VARIANT. These variables are used to create a string
240of the form $TARGET_PRODUCT-$TARGET_BUILD_VARIANT, e.g. passion-userdebug.
241If one of those variables or both are not present, the program will call
David Pursehousedaa851f2012-08-21 13:52:18 +0900242GetApprovedManifest without the target parameter and the manifest server
Nico Sallembiena1bfd2c2010-04-06 10:40:01 -0700243should choose a reasonable default target.
244
Mike Frysinger3891b752018-10-05 19:26:15 -0400245 GetManifest(tag)
David Pursehouse9a27d012012-08-21 14:23:49 +0900246
247Return a manifest in which each project is pegged to the revision at
David Pursehousee8688412016-04-13 17:55:34 +0900248the specified tag. This is used by repo sync when the --smart-tag option
249is given.
David Pursehouse9a27d012012-08-21 14:23:49 +0900250
Nico Sallembiena1bfd2c2010-04-06 10:40:01 -0700251
LaMont Jonescc879a92021-11-18 22:40:18 +0000252### Element submanifest
253
254One or more submanifest elements may be specified. Each element describes a
255single manifest to be checked out as a child.
256
257Attribute `name`: A unique name (within the current (sub)manifest) for this
258submanifest. It acts as a default for `revision` below. The same name can be
259used for submanifests with different parent (sub)manifests.
260
261Attribute `remote`: Name of a previously defined remote element.
262If not supplied the remote given by the default element is used.
263
264Attribute `project`: The manifest project name. The project's name is appended
265onto its remote's fetch URL to generate the actual URL to configure the Git
266remote with. The URL gets formed as:
267
268 ${remote_fetch}/${project_name}.git
269
270where ${remote_fetch} is the remote's fetch attribute and
271${project_name} is the project's name attribute. The suffix ".git"
272is always appended as repo assumes the upstream is a forest of
273bare Git repositories. If the project has a parent element, its
274name will be prefixed by the parent's.
275
276The project name must match the name Gerrit knows, if Gerrit is
277being used for code reviews.
278
279`project` must not be empty, and may not be an absolute path or use "." or ".."
280path components. It is always interpreted relative to the remote's fetch
281settings, so if a different base path is needed, declare a different remote
282with the new settings needed.
283
284If not supplied the remote and project for this manifest will be used: `remote`
285cannot be supplied.
286
LaMont Jonesb308db12022-02-25 17:05:21 +0000287Projects from a submanifest and its submanifests are added to the
288submanifest::path: group.
289
LaMont Jonescc879a92021-11-18 22:40:18 +0000290Attribute `manifest-name`: The manifest filename in the manifest project. If
291not supplied, `default.xml` is used.
292
293Attribute `revision`: Name of a Git branch (e.g. "main" or "refs/heads/main"),
294tag (e.g. "refs/tags/stable"), or a commit hash. If not supplied, `name` is
295used.
296
297Attribute `path`: An optional path relative to the top directory
298of the repo client where the submanifest repo client top directory
299should be placed. If not supplied, `revision` is used.
300
301`path` may not be an absolute path or use "." or ".." path components.
302
303Attribute `groups`: List of additional groups to which all projects
304in the included submanifest belong. This appends and recurses, meaning
305all projects in submanifests carry all parent submanifest groups.
306Same syntax as the corresponding element of `project`.
307
LaMont Jones501733c2022-04-20 16:42:32 +0000308Attribute `default-groups`: The list of manifest groups to sync if no
309`--groups=` parameter was specified at init. When that list is empty, use this
310list instead of "default" as the list of groups to sync.
LaMont Jonescc879a92021-11-18 22:40:18 +0000311
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400312### Element project
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800313
314One or more project elements may be specified. Each element
315describes a single Git repository to be cloned into the repo
Che-Liang Chioub2bd91c2012-01-11 11:28:42 +0800316client workspace. You may specify Git-submodules by creating a
317nested project. Git-submodules will be automatically
318recognized and inherit their parent's attributes, but those
319may be overridden by an explicitly specified project element.
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800320
321Attribute `name`: A unique name for this project. The project's
322name is appended onto its remote's fetch URL to generate the actual
323URL to configure the Git remote with. The URL gets formed as:
324
Mike Frysinger3891b752018-10-05 19:26:15 -0400325 ${remote_fetch}/${project_name}.git
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800326
327where ${remote_fetch} is the remote's fetch attribute and
328${project_name} is the project's name attribute. The suffix ".git"
David Pursehousedaa851f2012-08-21 13:52:18 +0900329is always appended as repo assumes the upstream is a forest of
Che-Liang Chioub2bd91c2012-01-11 11:28:42 +0800330bare Git repositories. If the project has a parent element, its
331name will be prefixed by the parent's.
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800332
333The project name must match the name Gerrit knows, if Gerrit is
334being used for code reviews.
335
Mike Frysinger68d5d4d2021-03-09 11:56:24 -0500336"name" must not be empty, and may not be an absolute path or use "." or ".."
337path components. It is always interpreted relative to the remote's fetch
338settings, so if a different base path is needed, declare a different remote
339with the new settings needed.
340These restrictions are not enforced for [Local Manifests].
341
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800342Attribute `path`: An optional path relative to the top directory
343of the repo client where the Git working directory for this project
Mike Frysinger68d5d4d2021-03-09 11:56:24 -0500344should be placed. If not supplied the project "name" is used.
Che-Liang Chioub2bd91c2012-01-11 11:28:42 +0800345If the project has a parent element, its path will be prefixed
346by the parent's.
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800347
Mike Frysinger68d5d4d2021-03-09 11:56:24 -0500348"path" may not be an absolute path or use "." or ".." path components.
349These restrictions are not enforced for [Local Manifests].
350
351If you want to place files into the root of the checkout (e.g. a README or
352Makefile or another build script), use the [copyfile] or [linkfile] elements
353instead.
354
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800355Attribute `remote`: Name of a previously defined remote element.
356If not supplied the remote given by the default element is used.
357
358Attribute `revision`: Name of the Git branch the manifest wants
359to track for this project. Names can be relative to refs/heads
Mike Frysinger6e89c962020-11-15 18:42:26 -0500360(e.g. just "main") or absolute (e.g. "refs/heads/main").
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800361Tags and/or explicit SHA-1s should work in theory, but have not
362been extensively tested. If not supplied the revision given by
Anthony King36ea2fb2014-05-06 11:54:01 +0100363the remote element is used if applicable, else the default
364element is used.
Shawn O. Pearce3e548192008-11-04 11:19:36 -0800365
Mike Frysinger6e89c962020-11-15 18:42:26 -0500366Attribute `dest-branch`: Name of a Git branch (e.g. `main`).
Bryan Jacobsf609f912013-05-06 13:36:24 -0400367When using `repo upload`, changes will be submitted for code
368review on this branch. If unspecified both here and in the
369default element, `revision` is used instead.
370
Colin Cross5acde752012-03-28 20:15:45 -0700371Attribute `groups`: List of groups to which this project belongs,
Conley Owens971de8e2012-04-16 10:36:08 -0700372whitespace or comma separated. All projects belong to the group
Conley Owensbb1b5f52012-08-13 13:11:18 -0700373"all", and each project automatically belongs to a group of
374its name:`name` and path:`path`. E.g. for
Jashank Jeremy97477472020-12-12 20:50:22 +1100375``, that project
Brian Harring7da13142012-06-15 02:24:20 -0700376definition is implicitly in the following manifest groups:
Conley Owensbb1b5f52012-08-13 13:11:18 -0700377default, name:monkeys, and path:barrel-of. If you place a project in the
378group "notdefault", it will not be automatically downloaded by repo.
Che-Liang Chioub2bd91c2012-01-11 11:28:42 +0800379If the project has a parent element, the `name` and `path` here
380are the prefixed ones.
Colin Cross5acde752012-03-28 20:15:45 -0700381
Mani Chandel7a91d512014-07-24 16:27:08 +0530382Attribute `sync-c`: Set to true to only sync the given Git
David Pursehouse4e465202012-11-27 22:20:10 +0900383branch (specified in the `revision` attribute) rather than the
384whole ref space.
385
Mani Chandel7a91d512014-07-24 16:27:08 +0530386Attribute `sync-s`: Set to true to also sync sub-projects.
David Pursehouse4e465202012-11-27 22:20:10 +0900387
Nasser Grainawi909d58b2014-09-19 12:13:04 -0600388Attribute `upstream`: Name of the Git ref in which a sha1
David Pursehouse4e465202012-11-27 22:20:10 +0900389can be found. Used when syncing a revision locked manifest in
390-c mode to avoid having to sync the entire ref space.
391
David Pursehouseede7f122012-11-27 22:25:30 +0900392Attribute `clone-depth`: Set the depth to use when fetching this
393project. If specified, this value will override any value given
394to repo init with the --depth option on the command line.
395
Scott Fandb83b1b2013-02-28 09:34:14 +0800396Attribute `force-path`: Set to true to force this project to create the
397local mirror repository according to its `path` attribute (if supplied)
398rather than the `name` attribute. This attribute only applies to the
399local mirrors syncing, it will be ignored when syncing the projects in a
400client working directory.
401
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400402### Element extend-project
Josh Triplett884a3872014-06-12 14:57:29 -0700403
404Modify the attributes of the named project.
405
406This element is mostly useful in a local manifest file, to modify the
407attributes of an existing project without completely replacing the
408existing project definition. This makes the local manifest more robust
409against changes to the original manifest.
410
411Attribute `path`: If specified, limit the change to projects checked out
412at the specified path, rather than all projects with the given name.
413
Michael Kelly37c21c22020-06-13 02:10:40 -0700414Attribute `dest-path`: If specified, a path relative to the top directory
415of the repo client where the Git working directory for this project
416should be placed. This is used to move a project in the checkout by
417overriding the existing `path` setting.
418
Josh Triplett884a3872014-06-12 14:57:29 -0700419Attribute `groups`: List of additional groups to which this project
420belongs. Same syntax as the corresponding element of `project`.
421
Luis Hector Chavez7d525852018-03-15 09:54:08 -0700422Attribute `revision`: If specified, overrides the revision of the original
423project. Same syntax as the corresponding element of `project`.
424
Kyunam Jobd0aae92020-02-04 11:38:53 +0900425Attribute `remote`: If specified, overrides the remote of the original
426project. Same syntax as the corresponding element of `project`.
427
Erik Elmeke4cdfdb72022-09-09 17:13:17 +0200428Attribute `dest-branch`: If specified, overrides the dest-branch of the original
429project. Same syntax as the corresponding element of `project`.
430
431Attribute `upstream`: If specified, overrides the upstream of the original
432project. Same syntax as the corresponding element of `project`.
433
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400434### Element annotation
James W. Mills24c13082012-04-12 15:04:13 -0500435
436Zero or more annotation elements may be specified as children of a
Jack Neus6ea0cae2021-07-20 20:52:33 +0000437project or remote element. Each element describes a name-value pair.
438For projects, this name-value pair will be exported into each project's
439environment during a 'forall' command, prefixed with `REPO__`. In addition,
440there is an optional attribute "keep" which accepts the case insensitive values
441"true" (default) or "false". This attribute determines whether or not the
442annotation will be kept when exported with the manifest subcommand.
James W. Mills24c13082012-04-12 15:04:13 -0500443
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400444### Element copyfile
Ruslan Bilovol54527e72015-09-08 13:11:23 +0300445
446Zero or more copyfile elements may be specified as children of a
447project element. Each element describes a src-dest pair of files;
Mike Frysinger3891b752018-10-05 19:26:15 -0400448the "src" file will be copied to the "dest" place during `repo sync`
Ruslan Bilovol54527e72015-09-08 13:11:23 +0300449command.
Mike Frysingerc5b172a2019-07-31 17:34:23 -0400450
Ruslan Bilovol54527e72015-09-08 13:11:23 +0300451"src" is project relative, "dest" is relative to the top of the tree.
Mike Frysingerc5b172a2019-07-31 17:34:23 -0400452Copying from paths outside of the project or to paths outside of the repo
453client is not allowed.
454
455"src" and "dest" must be files. Directories or symlinks are not allowed.
456Intermediate paths must not be symlinks either.
Ruslan Bilovol54527e72015-09-08 13:11:23 +0300457
Mike Frysinger50d27632019-08-01 18:57:10 -0400458Parent directories of "dest" will be automatically created if missing.
459
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400460### Element linkfile
Ruslan Bilovol54527e72015-09-08 13:11:23 +0300461
462It's just like copyfile and runs at the same time as copyfile but
463instead of copying it creates a symlink.
464
Mike Frysingerc5b172a2019-07-31 17:34:23 -0400465The symlink is created at "dest" (relative to the top of the tree) and
Mike Frysinger04122b72019-07-31 23:32:58 -0400466points to the path specified by "src" which is a path in the project.
Mike Frysingerc5b172a2019-07-31 17:34:23 -0400467
Mike Frysinger50d27632019-08-01 18:57:10 -0400468Parent directories of "dest" will be automatically created if missing.
469
Mike Frysingerc5b172a2019-07-31 17:34:23 -0400470The symlink target may be a file or directory, but it may not point outside
471of the repo client.
472
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400473### Element remove-project
Shawn O. Pearce03eaf072008-11-20 11:42:22 -0800474
475Deletes the named project from the internal manifest table, possibly
476allowing a subsequent project element in the same manifest file to
477replace the project with a different source.
478
David Pursehouseb1525bf2012-11-14 08:51:38 +0900479This element is mostly useful in a local manifest file, where
Shawn O. Pearce03eaf072008-11-20 11:42:22 -0800480the user can remove a project, and possibly replace it with their
481own definition.
482
Michael Kelly06da9982021-06-30 01:58:28 -0700483Attribute `optional`: Set to true to ignore remove-project elements with no
484matching `project` element.
485
Mike Frysinger51e39d52020-12-04 05:32:06 -0500486### Element repo-hooks
487
488NB: See the [practical documentation](./repo-hooks.md) for using repo hooks.
489
490Only one repo-hooks element may be specified at a time.
491Attempting to redefine it will fail to parse.
492
493Attribute `in-project`: The project where the hooks are defined. The value
494must match the `name` attribute (**not** the `path` attribute) of a previously
495defined `project` element.
496
497Attribute `enabled-list`: List of hooks to use, whitespace or comma separated.
498
Raman Tenneti1bb4fb22021-01-07 16:50:45 -0800499### Element superproject
500
501***
Raman Tenneti1c3f57e2021-05-04 12:32:13 -0700502*Note*: This is currently a WIP.
Raman Tenneti1bb4fb22021-01-07 16:50:45 -0800503***
504
505NB: See the [git superprojects documentation](
506https://en.wikibooks.org/wiki/Git/Submodules_and_Superprojects) for background
507information.
508
509This element is used to specify the URL of the superproject. It has "name" and
510"remote" as atrributes. Only "name" is required while the others have
511reasonable defaults. At most one superproject may be specified.
512Attempting to redefine it will fail to parse.
513
514Attribute `name`: A unique name for the superproject. This attribute has the
515same meaning as project's name attribute. See the
516[element project](#element-project) for more information.
517
518Attribute `remote`: Name of a previously defined remote element.
519If not supplied the remote given by the default element is used.
520
Xin Lie0b16a22021-09-26 23:20:32 -0700521Attribute `revision`: Name of the Git branch the manifest wants
522to track for this superproject. If not supplied the revision given
523by the remote element is used if applicable, else the default
524element is used.
525
Raman Tenneti1c3f57e2021-05-04 12:32:13 -0700526### Element contactinfo
527
528***
529*Note*: This is currently a WIP.
530***
531
532This element is used to let manifest authors self-register contact info.
533It has "bugurl" as a required atrribute. This element can be repeated,
534and any later entries will clobber earlier ones. This would allow manifest
535authors who extend manifests to specify their own contact info.
536
537Attribute `bugurl`: The URL to file a bug against the manifest owner.
538
Mike Frysingerb8f7bb02018-10-10 01:05:11 -0400539### Element include
Brian Harring26448742011-04-28 05:04:41 -0700540
541This element provides the capability of including another manifest
542file into the originating manifest. Normal rules apply for the
David Pursehouse9f3406e2012-11-14 08:52:25 +0900543target manifest to include - it must be a usable manifest on its own.
Brian Harring26448742011-04-28 05:04:41 -0700544
David Pursehouse9f3406e2012-11-14 08:52:25 +0900545Attribute `name`: the manifest to include, specified relative to
546the manifest repository's root.
Brian Harring26448742011-04-28 05:04:41 -0700547
Mike Frysinger68d5d4d2021-03-09 11:56:24 -0500548"name" may not be an absolute path or use "." or ".." path components.
549These restrictions are not enforced for [Local Manifests].
550
Fredrik de Groot352c93b2020-10-06 12:55:14 +0200551Attribute `groups`: List of additional groups to which all projects
552in the included manifest belong. This appends and recurses, meaning
LaMont Jonescc879a92021-11-18 22:40:18 +0000553all projects in included manifests carry all parent include groups.
Fredrik de Groot352c93b2020-10-06 12:55:14 +0200554Same syntax as the corresponding element of `project`.
Shawn O. Pearce03eaf072008-11-20 11:42:22 -0800555
Mike Frysinger68d5d4d2021-03-09 11:56:24 -0500556## Local Manifests {#local-manifests}
Shawn O. Pearce70cd4ab2008-11-06 08:48:44 -0800557
David Pursehouse2d5a0df2012-11-13 02:50:36 +0900558Additional remotes and projects may be added through local manifest
559files stored in `$TOP_DIR/.repo/local_manifests/*.xml`.
Shawn O. Pearce70cd4ab2008-11-06 08:48:44 -0800560
561For example:
562
Mike Frysinger3891b752018-10-05 19:26:15 -0400563 $ ls .repo/local_manifests
564 local_manifest.xml
565 another_local_manifest.xml
David Pursehouse2d5a0df2012-11-13 02:50:36 +0900566
Mike Frysinger3891b752018-10-05 19:26:15 -0400567 $ cat .repo/local_manifests/local_manifest.xml
568
569
570
571 name="tools/manifest" />
572
573 name="platform/manifest" />
574
Shawn O. Pearce70cd4ab2008-11-06 08:48:44 -0800575
David Pursehouse2d5a0df2012-11-13 02:50:36 +0900576Users may add projects to the local manifest(s) prior to a `repo sync`
Shawn O. Pearce70cd4ab2008-11-06 08:48:44 -0800577invocation, instructing repo to automatically download and manage
578these extra projects.
David Pursehouse2d5a0df2012-11-13 02:50:36 +0900579
David Pursehouse52f1e5d2012-11-14 04:53:24 +0900580Manifest files stored in `$TOP_DIR/.repo/local_manifests/*.xml` will
581be loaded in alphabetical order.
582
Raman Tenneti78f4dd32021-06-07 13:27:37 -0700583Projects from local manifest files are added into
584local:: group.
585
Mike Frysinger4e1fc102020-09-06 14:42:47 -0400586The legacy `$TOP_DIR/.repo/local_manifest.xml` path is no longer supported.
Mike Frysinger68d5d4d2021-03-09 11:56:24 -0500587
588
589[copyfile]: #Element-copyfile
590[linkfile]: #Element-linkfile
591[Local Manifests]: #local-manifests