| Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 1 | # repo Manifest Format |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 2 | |
| 3 | A repo manifest describes the structure of a repo client; that is |
| 4 | the directories that are visible and where they should be obtained |
| 5 | from with git. |
| 6 | |
| 7 | The basic structure of a manifest is a bare Git repository holding |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 8 | a single `default.xml` XML file in the top level directory. |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 9 | |
| 10 | Manifests are inherently version controlled, since they are kept |
| 11 | within a Git repository. Updates to manifests are automatically |
| 12 | obtained by clients during `repo sync`. |
| 13 | |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 14 | [TOC] |
| 15 | |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 16 | |
| Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 17 | ## XML File Format |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 18 | |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 19 | A manifest XML file (e.g. `default.xml`) roughly conforms to the |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 20 | following DTD: |
| 21 | |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 22 | ```xml |
| 23 | <!DOCTYPE manifest [ |
| Mike Frysinger | 0888a08 | 2021-04-13 20:22:01 -0400 | [diff] [blame] | 24 | |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 25 | <!ELEMENT manifest (notice?, |
| 26 | remote*, |
| 27 | default?, |
| 28 | manifest-server?, |
| LaMont Jones | cc879a9 | 2021-11-18 22:40:18 +0000 | [diff] [blame] | 29 | submanifest*?, |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 30 | remove-project*, |
| 31 | project*, |
| 32 | extend-project*, |
| 33 | repo-hooks?, |
| Raman Tenneti | 1bb4fb2 | 2021-01-07 16:50:45 -0800 | [diff] [blame] | 34 | superproject?, |
| Raman Tenneti | 1c3f57e | 2021-05-04 12:32:13 -0700 | [diff] [blame] | 35 | contactinfo?, |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 36 | include*)> |
| Chirayu Desai | d5a5b19 | 2013-11-21 19:15:30 +0530 | [diff] [blame] | 37 | |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 38 | <!ELEMENT notice (#PCDATA)> |
| Chirayu Desai | d5a5b19 | 2013-11-21 19:15:30 +0530 | [diff] [blame] | 39 | |
| Jack Neus | 6ea0cae | 2021-07-20 20:52:33 +0000 | [diff] [blame] | 40 | <!ELEMENT remote (annotation*)> |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 41 | <!ATTLIST remote name ID #REQUIRED> |
| 42 | <!ATTLIST remote alias CDATA #IMPLIED> |
| 43 | <!ATTLIST remote fetch CDATA #REQUIRED> |
| 44 | <!ATTLIST remote pushurl CDATA #IMPLIED> |
| 45 | <!ATTLIST remote review CDATA #IMPLIED> |
| 46 | <!ATTLIST remote revision CDATA #IMPLIED> |
| Chirayu Desai | d5a5b19 | 2013-11-21 19:15:30 +0530 | [diff] [blame] | 47 | |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 48 | <!ELEMENT default EMPTY> |
| 49 | <!ATTLIST default remote IDREF #IMPLIED> |
| 50 | <!ATTLIST default revision CDATA #IMPLIED> |
| 51 | <!ATTLIST default dest-branch CDATA #IMPLIED> |
| 52 | <!ATTLIST default upstream CDATA #IMPLIED> |
| 53 | <!ATTLIST default sync-j CDATA #IMPLIED> |
| 54 | <!ATTLIST default sync-c CDATA #IMPLIED> |
| 55 | <!ATTLIST default sync-s CDATA #IMPLIED> |
| 56 | <!ATTLIST default sync-tags CDATA #IMPLIED> |
| Nico Sallembien | a1bfd2c | 2010-04-06 10:40:01 -0700 | [diff] [blame] | 57 | |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 58 | <!ELEMENT manifest-server EMPTY> |
| 59 | <!ATTLIST manifest-server url CDATA #REQUIRED> |
| Chirayu Desai | d5a5b19 | 2013-11-21 19:15:30 +0530 | [diff] [blame] | 60 | |
| LaMont Jones | cc879a9 | 2021-11-18 22:40:18 +0000 | [diff] [blame] | 61 | <!ELEMENT submanifest EMPTY> |
| Mike Frysinger | 08964a1 | 2025-12-02 10:52:29 -0500 | [diff] [blame] | 62 | <!ATTLIST submanifest name ID #REQUIRED> |
| LaMont Jones | cc879a9 | 2021-11-18 22:40:18 +0000 | [diff] [blame] | 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> |
| LaMont Jones | 501733c | 2022-04-20 16:42:32 +0000 | [diff] [blame] | 69 | <!ATTLIST submanifest default-groups CDATA #IMPLIED> |
| LaMont Jones | cc879a9 | 2021-11-18 22:40:18 +0000 | [diff] [blame] | 70 | |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 71 | <!ELEMENT project (annotation*, |
| 72 | project*, |
| 73 | copyfile*, |
| 74 | linkfile*)> |
| 75 | <!ATTLIST project name CDATA #REQUIRED> |
| 76 | <!ATTLIST project path CDATA #IMPLIED> |
| 77 | <!ATTLIST project remote IDREF #IMPLIED> |
| 78 | <!ATTLIST project revision CDATA #IMPLIED> |
| 79 | <!ATTLIST project dest-branch CDATA #IMPLIED> |
| 80 | <!ATTLIST project groups CDATA #IMPLIED> |
| 81 | <!ATTLIST project sync-c CDATA #IMPLIED> |
| 82 | <!ATTLIST project sync-s CDATA #IMPLIED> |
| Kyunam Jo | 01019d9 | 2019-03-18 13:30:58 +0900 | [diff] [blame] | 83 | <!ATTLIST project sync-tags CDATA #IMPLIED> |
| Mike Frysinger | 08964a1 | 2025-12-02 10:52:29 -0500 | [diff] [blame] | 84 | <!ATTLIST project upstream CDATA #IMPLIED> |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 85 | <!ATTLIST project clone-depth CDATA #IMPLIED> |
| Mike Frysinger | 08964a1 | 2025-12-02 10:52:29 -0500 | [diff] [blame] | 86 | <!ATTLIST project force-path CDATA #IMPLIED> |
| James W. Mills | 24c1308 | 2012-04-12 15:04:13 -0500 | [diff] [blame] | 87 | |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 88 | <!ELEMENT annotation EMPTY> |
| 89 | <!ATTLIST annotation name CDATA #REQUIRED> |
| 90 | <!ATTLIST annotation value CDATA #REQUIRED> |
| 91 | <!ATTLIST annotation keep CDATA "true"> |
| Chirayu Desai | d5a5b19 | 2013-11-21 19:15:30 +0530 | [diff] [blame] | 92 | |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 93 | <!ELEMENT copyfile EMPTY> |
| 94 | <!ATTLIST copyfile src CDATA #REQUIRED> |
| 95 | <!ATTLIST copyfile dest CDATA #REQUIRED> |
| Ruslan Bilovol | 54527e7 | 2015-09-08 13:11:23 +0300 | [diff] [blame] | 96 | |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 97 | <!ELEMENT linkfile EMPTY> |
| Mike Frysinger | 08964a1 | 2025-12-02 10:52:29 -0500 | [diff] [blame] | 98 | <!ATTLIST linkfile src CDATA #REQUIRED> |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 99 | <!ATTLIST linkfile dest CDATA #REQUIRED> |
| Ruslan Bilovol | 54527e7 | 2015-09-08 13:11:23 +0300 | [diff] [blame] | 100 | |
| Peter Kjellerstedt | 4ab2284 | 2025-10-16 20:29:28 +0200 | [diff] [blame] | 101 | <!ELEMENT extend-project (annotation*, |
| 102 | copyfile*, |
| 103 | linkfile*)> |
| Mike Frysinger | 08964a1 | 2025-12-02 10:52:29 -0500 | [diff] [blame] | 104 | <!ATTLIST extend-project name CDATA #REQUIRED> |
| 105 | <!ATTLIST extend-project path CDATA #IMPLIED> |
| 106 | <!ATTLIST extend-project dest-path CDATA #IMPLIED> |
| 107 | <!ATTLIST extend-project groups CDATA #IMPLIED> |
| 108 | <!ATTLIST extend-project revision CDATA #IMPLIED> |
| 109 | <!ATTLIST extend-project remote CDATA #IMPLIED> |
| Erik Elmeke | 4cdfdb7 | 2022-09-09 17:13:17 +0200 | [diff] [blame] | 110 | <!ATTLIST extend-project dest-branch CDATA #IMPLIED> |
| Mike Frysinger | 08964a1 | 2025-12-02 10:52:29 -0500 | [diff] [blame] | 111 | <!ATTLIST extend-project upstream CDATA #IMPLIED> |
| 112 | <!ATTLIST extend-project base-rev CDATA #IMPLIED> |
| Josh Triplett | 884a387 | 2014-06-12 14:57:29 -0700 | [diff] [blame] | 113 | |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 114 | <!ELEMENT remove-project EMPTY> |
| Fredrik de Groot | be71c2f | 2023-05-31 16:56:34 +0200 | [diff] [blame] | 115 | <!ATTLIST remove-project name CDATA #IMPLIED> |
| 116 | <!ATTLIST remove-project path CDATA #IMPLIED> |
| 117 | <!ATTLIST remove-project optional CDATA #IMPLIED> |
| Fredrik de Groot | 303bd96 | 2024-09-09 15:54:57 +0200 | [diff] [blame] | 118 | <!ATTLIST remove-project base-rev CDATA #IMPLIED> |
| Doug Anderson | 37282b4 | 2011-03-04 11:54:18 -0800 | [diff] [blame] | 119 | |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 120 | <!ELEMENT repo-hooks EMPTY> |
| Mike Frysinger | 08964a1 | 2025-12-02 10:52:29 -0500 | [diff] [blame] | 121 | <!ATTLIST repo-hooks in-project CDATA #REQUIRED> |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 122 | <!ATTLIST repo-hooks enabled-list CDATA #REQUIRED> |
| Brian Harring | 2644874 | 2011-04-28 05:04:41 -0700 | [diff] [blame] | 123 | |
| Raman Tenneti | 1c3f57e | 2021-05-04 12:32:13 -0700 | [diff] [blame] | 124 | <!ELEMENT superproject EMPTY> |
| Xin Li | e0b16a2 | 2021-09-26 23:20:32 -0700 | [diff] [blame] | 125 | <!ATTLIST superproject name CDATA #REQUIRED> |
| 126 | <!ATTLIST superproject remote IDREF #IMPLIED> |
| 127 | <!ATTLIST superproject revision CDATA #IMPLIED> |
| Raman Tenneti | 1bb4fb2 | 2021-01-07 16:50:45 -0800 | [diff] [blame] | 128 | |
| Raman Tenneti | 1c3f57e | 2021-05-04 12:32:13 -0700 | [diff] [blame] | 129 | <!ELEMENT contactinfo EMPTY> |
| Mike Frysinger | 08964a1 | 2025-12-02 10:52:29 -0500 | [diff] [blame] | 130 | <!ATTLIST contactinfo bugurl CDATA #REQUIRED> |
| Raman Tenneti | 1c3f57e | 2021-05-04 12:32:13 -0700 | [diff] [blame] | 131 | |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 132 | <!ELEMENT include EMPTY> |
| Shuchuan Zeng | 3e3340d | 2023-04-18 10:36:50 +0800 | [diff] [blame] | 133 | <!ATTLIST include name CDATA #REQUIRED> |
| 134 | <!ATTLIST include groups CDATA #IMPLIED> |
| 135 | <!ATTLIST include revision CDATA #IMPLIED> |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 136 | ]> |
| 137 | ``` |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 138 | |
| Raman Tenneti | 48b2d10 | 2021-01-11 12:18:47 -0800 | [diff] [blame] | 139 | For compatibility purposes across repo releases, all unknown elements are |
| 140 | silently ignored. However, repo reserves all possible names for itself for |
| 141 | future use. If you want to use custom elements, the `x-*` namespace is |
| 142 | reserved for that purpose, and repo guarantees to never allocate any |
| 143 | corresponding names. |
| 144 | |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 145 | A description of the elements and their attributes follows. |
| 146 | |
| 147 | |
| Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 148 | ### Element manifest |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 149 | |
| 150 | The root element of the file. |
| 151 | |
| Mike Frysinger | 51e39d5 | 2020-12-04 05:32:06 -0500 | [diff] [blame] | 152 | ### Element notice |
| 153 | |
| 154 | Arbitrary text that is displayed to users whenever `repo sync` finishes. |
| 155 | The content is simply passed through as it exists in the manifest. |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 156 | |
| Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 157 | ### Element remote |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 158 | |
| 159 | One or more remote elements may be specified. Each remote element |
| 160 | specifies a Git URL shared by one or more projects and (optionally) |
| 161 | the Gerrit review server those projects upload changes through. |
| 162 | |
| 163 | Attribute `name`: A short name unique to this manifest file. The |
| 164 | name specified here is used as the remote name in each project's |
| 165 | .git/config, and is therefore automatically available to commands |
| 166 | like `git fetch`, `git remote`, `git pull` and `git push`. |
| 167 | |
| Yestin Sun | b292b98 | 2012-07-02 07:32:50 -0700 | [diff] [blame] | 168 | Attribute `alias`: The alias, if specified, is used to override |
| 169 | `name` to be set as the remote name in each project's .git/config. |
| 170 | Its value can be duplicated while attribute `name` has to be unique |
| 171 | in the manifest file. This helps each project to be able to have |
| 172 | same remote name which actually points to different remote url. |
| 173 | |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 174 | Attribute `fetch`: The Git URL prefix for all projects which use |
| 175 | this remote. Each project's name is appended to this prefix to |
| 176 | form the actual URL used to clone the project. |
| 177 | |
| Steve Rae | d648045 | 2016-08-10 15:00:00 -0700 | [diff] [blame] | 178 | Attribute `pushurl`: The Git "push" URL prefix for all projects |
| 179 | which use this remote. Each project's name is appended to this |
| 180 | prefix to form the actual URL used to "git push" the project. |
| 181 | This attribute is optional; if not specified then "git push" |
| 182 | will use the same URL as the `fetch` attribute. |
| 183 | |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 184 | Attribute `review`: Hostname of the Gerrit server where reviews |
| 185 | are uploaded to by `repo upload`. This attribute is optional; |
| 186 | if not specified then `repo upload` will not function. |
| 187 | |
| Mike Frysinger | 6e89c96 | 2020-11-15 18:42:26 -0500 | [diff] [blame] | 188 | Attribute `revision`: Name of a Git branch (e.g. `main` or |
| 189 | `refs/heads/main`). Remotes with their own revision will override |
| Anthony King | 36ea2fb | 2014-05-06 11:54:01 +0100 | [diff] [blame] | 190 | the default revision. |
| 191 | |
| Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 192 | ### Element default |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 193 | |
| 194 | At most one default element may be specified. Its remote and |
| 195 | revision attributes are used when a project element does not |
| 196 | specify its own remote or revision attribute. |
| 197 | |
| 198 | Attribute `remote`: Name of a previously defined remote element. |
| 199 | Project elements lacking a remote attribute of their own will use |
| 200 | this remote. |
| 201 | |
| Mike Frysinger | 6e89c96 | 2020-11-15 18:42:26 -0500 | [diff] [blame] | 202 | Attribute `revision`: Name of a Git branch (e.g. `main` or |
| 203 | `refs/heads/main`). Project elements lacking their own |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 204 | revision attribute will use this revision. |
| 205 | |
| Mike Frysinger | 6e89c96 | 2020-11-15 18:42:26 -0500 | [diff] [blame] | 206 | Attribute `dest-branch`: Name of a Git branch (e.g. `main`). |
| Bryan Jacobs | f609f91 | 2013-05-06 13:36:24 -0400 | [diff] [blame] | 207 | Project elements not setting their own `dest-branch` will inherit |
| 208 | this value. If this value is not set, projects will use `revision` |
| 209 | by default instead. |
| 210 | |
| Nasser Grainawi | da40341 | 2018-05-04 12:53:29 -0600 | [diff] [blame] | 211 | Attribute `upstream`: Name of the Git ref in which a sha1 |
| 212 | can be found. Used when syncing a revision locked manifest in |
| 213 | -c mode to avoid having to sync the entire ref space. Project elements |
| 214 | not setting their own `upstream` will inherit this value. |
| 215 | |
| Mani Chandel | 7a91d51 | 2014-07-24 16:27:08 +0530 | [diff] [blame] | 216 | Attribute `sync-j`: Number of parallel jobs to use when synching. |
| David Pursehouse | 4e46520 | 2012-11-27 22:20:10 +0900 | [diff] [blame] | 217 | |
| Mani Chandel | 7a91d51 | 2014-07-24 16:27:08 +0530 | [diff] [blame] | 218 | Attribute `sync-c`: Set to true to only sync the given Git |
| David Pursehouse | 4e46520 | 2012-11-27 22:20:10 +0900 | [diff] [blame] | 219 | branch (specified in the `revision` attribute) rather than the |
| Mani Chandel | 7a91d51 | 2014-07-24 16:27:08 +0530 | [diff] [blame] | 220 | whole ref space. Project elements lacking a sync-c element of |
| David Pursehouse | 4e46520 | 2012-11-27 22:20:10 +0900 | [diff] [blame] | 221 | their own will use this value. |
| 222 | |
| Mani Chandel | 7a91d51 | 2014-07-24 16:27:08 +0530 | [diff] [blame] | 223 | Attribute `sync-s`: Set to true to also sync sub-projects. |
| David Pursehouse | 4e46520 | 2012-11-27 22:20:10 +0900 | [diff] [blame] | 224 | |
| YOUNG HO CHA | a32c92c | 2018-02-14 16:57:31 +0900 | [diff] [blame] | 225 | Attribute `sync-tags`: Set to false to only sync the given Git |
| 226 | branch (specified in the `revision` attribute) rather than |
| 227 | the other ref tags. |
| 228 | |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 229 | |
| Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 230 | ### Element manifest-server |
| Nico Sallembien | a1bfd2c | 2010-04-06 10:40:01 -0700 | [diff] [blame] | 231 | |
| 232 | At most one manifest-server may be specified. The url attribute |
| 233 | is used to specify the URL of a manifest server, which is an |
| David Pursehouse | 9a27d01 | 2012-08-21 14:23:49 +0900 | [diff] [blame] | 234 | XML RPC service. |
| Nico Sallembien | a1bfd2c | 2010-04-06 10:40:01 -0700 | [diff] [blame] | 235 | |
| Mike Frysinger | dfdf577 | 2025-01-30 19:11:36 -0500 | [diff] [blame] | 236 | See the [smart sync documentation](./smart-sync.md) for more details. |
| David Pursehouse | 9a27d01 | 2012-08-21 14:23:49 +0900 | [diff] [blame] | 237 | |
| Nico Sallembien | a1bfd2c | 2010-04-06 10:40:01 -0700 | [diff] [blame] | 238 | |
| LaMont Jones | cc879a9 | 2021-11-18 22:40:18 +0000 | [diff] [blame] | 239 | ### Element submanifest |
| 240 | |
| 241 | One or more submanifest elements may be specified. Each element describes a |
| 242 | single manifest to be checked out as a child. |
| 243 | |
| 244 | Attribute `name`: A unique name (within the current (sub)manifest) for this |
| 245 | submanifest. It acts as a default for `revision` below. The same name can be |
| 246 | used for submanifests with different parent (sub)manifests. |
| 247 | |
| 248 | Attribute `remote`: Name of a previously defined remote element. |
| 249 | If not supplied the remote given by the default element is used. |
| 250 | |
| 251 | Attribute `project`: The manifest project name. The project's name is appended |
| 252 | onto its remote's fetch URL to generate the actual URL to configure the Git |
| 253 | remote with. The URL gets formed as: |
| 254 | |
| 255 | ${remote_fetch}/${project_name}.git |
| 256 | |
| 257 | where ${remote_fetch} is the remote's fetch attribute and |
| 258 | ${project_name} is the project's name attribute. The suffix ".git" |
| 259 | is always appended as repo assumes the upstream is a forest of |
| 260 | bare Git repositories. If the project has a parent element, its |
| 261 | name will be prefixed by the parent's. |
| 262 | |
| 263 | The project name must match the name Gerrit knows, if Gerrit is |
| 264 | being used for code reviews. |
| 265 | |
| 266 | `project` must not be empty, and may not be an absolute path or use "." or ".." |
| 267 | path components. It is always interpreted relative to the remote's fetch |
| 268 | settings, so if a different base path is needed, declare a different remote |
| 269 | with the new settings needed. |
| 270 | |
| 271 | If not supplied the remote and project for this manifest will be used: `remote` |
| 272 | cannot be supplied. |
| 273 | |
| LaMont Jones | b308db1 | 2022-02-25 17:05:21 +0000 | [diff] [blame] | 274 | Projects from a submanifest and its submanifests are added to the |
| 275 | submanifest::path:<path_prefix> group. |
| 276 | |
| LaMont Jones | cc879a9 | 2021-11-18 22:40:18 +0000 | [diff] [blame] | 277 | Attribute `manifest-name`: The manifest filename in the manifest project. If |
| 278 | not supplied, `default.xml` is used. |
| 279 | |
| 280 | Attribute `revision`: Name of a Git branch (e.g. "main" or "refs/heads/main"), |
| 281 | tag (e.g. "refs/tags/stable"), or a commit hash. If not supplied, `name` is |
| 282 | used. |
| 283 | |
| 284 | Attribute `path`: An optional path relative to the top directory |
| 285 | of the repo client where the submanifest repo client top directory |
| 286 | should be placed. If not supplied, `revision` is used. |
| 287 | |
| 288 | `path` may not be an absolute path or use "." or ".." path components. |
| 289 | |
| Peter Kjellerstedt | 75773b8 | 2025-11-08 02:36:56 +0100 | [diff] [blame] | 290 | Attribute `groups`: Set of additional groups to which all projects |
| LaMont Jones | cc879a9 | 2021-11-18 22:40:18 +0000 | [diff] [blame] | 291 | in the included submanifest belong. This appends and recurses, meaning |
| 292 | all projects in submanifests carry all parent submanifest groups. |
| 293 | Same syntax as the corresponding element of `project`. |
| 294 | |
| LaMont Jones | 501733c | 2022-04-20 16:42:32 +0000 | [diff] [blame] | 295 | Attribute `default-groups`: The list of manifest groups to sync if no |
| 296 | `--groups=` parameter was specified at init. When that list is empty, use this |
| 297 | list instead of "default" as the list of groups to sync. |
| LaMont Jones | cc879a9 | 2021-11-18 22:40:18 +0000 | [diff] [blame] | 298 | |
| Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 299 | ### Element project |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 300 | |
| 301 | One or more project elements may be specified. Each element |
| 302 | describes a single Git repository to be cloned into the repo |
| Che-Liang Chiou | b2bd91c | 2012-01-11 11:28:42 +0800 | [diff] [blame] | 303 | client workspace. You may specify Git-submodules by creating a |
| 304 | nested project. Git-submodules will be automatically |
| 305 | recognized and inherit their parent's attributes, but those |
| 306 | may be overridden by an explicitly specified project element. |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 307 | |
| 308 | Attribute `name`: A unique name for this project. The project's |
| 309 | name is appended onto its remote's fetch URL to generate the actual |
| 310 | URL to configure the Git remote with. The URL gets formed as: |
| 311 | |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 312 | ${remote_fetch}/${project_name}.git |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 313 | |
| 314 | where ${remote_fetch} is the remote's fetch attribute and |
| 315 | ${project_name} is the project's name attribute. The suffix ".git" |
| David Pursehouse | daa851f | 2012-08-21 13:52:18 +0900 | [diff] [blame] | 316 | is always appended as repo assumes the upstream is a forest of |
| Che-Liang Chiou | b2bd91c | 2012-01-11 11:28:42 +0800 | [diff] [blame] | 317 | bare Git repositories. If the project has a parent element, its |
| 318 | name will be prefixed by the parent's. |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 319 | |
| 320 | The project name must match the name Gerrit knows, if Gerrit is |
| 321 | being used for code reviews. |
| 322 | |
| Mike Frysinger | 68d5d4d | 2021-03-09 11:56:24 -0500 | [diff] [blame] | 323 | "name" must not be empty, and may not be an absolute path or use "." or ".." |
| 324 | path components. It is always interpreted relative to the remote's fetch |
| 325 | settings, so if a different base path is needed, declare a different remote |
| 326 | with the new settings needed. |
| 327 | These restrictions are not enforced for [Local Manifests]. |
| 328 | |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 329 | Attribute `path`: An optional path relative to the top directory |
| 330 | of the repo client where the Git working directory for this project |
| Mike Frysinger | 68d5d4d | 2021-03-09 11:56:24 -0500 | [diff] [blame] | 331 | should be placed. If not supplied the project "name" is used. |
| Che-Liang Chiou | b2bd91c | 2012-01-11 11:28:42 +0800 | [diff] [blame] | 332 | If the project has a parent element, its path will be prefixed |
| 333 | by the parent's. |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 334 | |
| Mike Frysinger | 68d5d4d | 2021-03-09 11:56:24 -0500 | [diff] [blame] | 335 | "path" may not be an absolute path or use "." or ".." path components. |
| 336 | These restrictions are not enforced for [Local Manifests]. |
| 337 | |
| 338 | If you want to place files into the root of the checkout (e.g. a README or |
| 339 | Makefile or another build script), use the [copyfile] or [linkfile] elements |
| 340 | instead. |
| 341 | |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 342 | Attribute `remote`: Name of a previously defined remote element. |
| 343 | If not supplied the remote given by the default element is used. |
| 344 | |
| 345 | Attribute `revision`: Name of the Git branch the manifest wants |
| 346 | to track for this project. Names can be relative to refs/heads |
| Mike Frysinger | 6e89c96 | 2020-11-15 18:42:26 -0500 | [diff] [blame] | 347 | (e.g. just "main") or absolute (e.g. "refs/heads/main"). |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 348 | Tags and/or explicit SHA-1s should work in theory, but have not |
| 349 | been extensively tested. If not supplied the revision given by |
| Anthony King | 36ea2fb | 2014-05-06 11:54:01 +0100 | [diff] [blame] | 350 | the remote element is used if applicable, else the default |
| 351 | element is used. |
| Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 352 | |
| Mike Frysinger | 6e89c96 | 2020-11-15 18:42:26 -0500 | [diff] [blame] | 353 | Attribute `dest-branch`: Name of a Git branch (e.g. `main`). |
| Bryan Jacobs | f609f91 | 2013-05-06 13:36:24 -0400 | [diff] [blame] | 354 | When using `repo upload`, changes will be submitted for code |
| 355 | review on this branch. If unspecified both here and in the |
| 356 | default element, `revision` is used instead. |
| 357 | |
| Peter Kjellerstedt | 75773b8 | 2025-11-08 02:36:56 +0100 | [diff] [blame] | 358 | Attribute `groups`: Set of groups to which this project belongs, |
| Conley Owens | 971de8e | 2012-04-16 10:36:08 -0700 | [diff] [blame] | 359 | whitespace or comma separated. All projects belong to the group |
| Conley Owens | bb1b5f5 | 2012-08-13 13:11:18 -0700 | [diff] [blame] | 360 | "all", and each project automatically belongs to a group of |
| 361 | its name:`name` and path:`path`. E.g. for |
| Jashank Jeremy | 9747747 | 2020-12-12 20:50:22 +1100 | [diff] [blame] | 362 | `<project name="monkeys" path="barrel-of"/>`, that project |
| Brian Harring | 7da1314 | 2012-06-15 02:24:20 -0700 | [diff] [blame] | 363 | definition is implicitly in the following manifest groups: |
| Conley Owens | bb1b5f5 | 2012-08-13 13:11:18 -0700 | [diff] [blame] | 364 | default, name:monkeys, and path:barrel-of. If you place a project in the |
| 365 | group "notdefault", it will not be automatically downloaded by repo. |
| Che-Liang Chiou | b2bd91c | 2012-01-11 11:28:42 +0800 | [diff] [blame] | 366 | If the project has a parent element, the `name` and `path` here |
| 367 | are the prefixed ones. |
| Colin Cross | 5acde75 | 2012-03-28 20:15:45 -0700 | [diff] [blame] | 368 | |
| Mani Chandel | 7a91d51 | 2014-07-24 16:27:08 +0530 | [diff] [blame] | 369 | Attribute `sync-c`: Set to true to only sync the given Git |
| David Pursehouse | 4e46520 | 2012-11-27 22:20:10 +0900 | [diff] [blame] | 370 | branch (specified in the `revision` attribute) rather than the |
| 371 | whole ref space. |
| 372 | |
| Mani Chandel | 7a91d51 | 2014-07-24 16:27:08 +0530 | [diff] [blame] | 373 | Attribute `sync-s`: Set to true to also sync sub-projects. |
| David Pursehouse | 4e46520 | 2012-11-27 22:20:10 +0900 | [diff] [blame] | 374 | |
| Nasser Grainawi | 909d58b | 2014-09-19 12:13:04 -0600 | [diff] [blame] | 375 | Attribute `upstream`: Name of the Git ref in which a sha1 |
| David Pursehouse | 4e46520 | 2012-11-27 22:20:10 +0900 | [diff] [blame] | 376 | can be found. Used when syncing a revision locked manifest in |
| 377 | -c mode to avoid having to sync the entire ref space. |
| 378 | |
| David Pursehouse | ede7f12 | 2012-11-27 22:25:30 +0900 | [diff] [blame] | 379 | Attribute `clone-depth`: Set the depth to use when fetching this |
| 380 | project. If specified, this value will override any value given |
| 381 | to repo init with the --depth option on the command line. |
| 382 | |
| Scott Fan | db83b1b | 2013-02-28 09:34:14 +0800 | [diff] [blame] | 383 | Attribute `force-path`: Set to true to force this project to create the |
| 384 | local mirror repository according to its `path` attribute (if supplied) |
| 385 | rather than the `name` attribute. This attribute only applies to the |
| 386 | local mirrors syncing, it will be ignored when syncing the projects in a |
| 387 | client working directory. |
| 388 | |
| Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 389 | ### Element extend-project |
| Josh Triplett | 884a387 | 2014-06-12 14:57:29 -0700 | [diff] [blame] | 390 | |
| 391 | Modify the attributes of the named project. |
| 392 | |
| 393 | This element is mostly useful in a local manifest file, to modify the |
| 394 | attributes of an existing project without completely replacing the |
| 395 | existing project definition. This makes the local manifest more robust |
| 396 | against changes to the original manifest. |
| 397 | |
| 398 | Attribute `path`: If specified, limit the change to projects checked out |
| 399 | at the specified path, rather than all projects with the given name. |
| 400 | |
| Michael Kelly | 37c21c2 | 2020-06-13 02:10:40 -0700 | [diff] [blame] | 401 | Attribute `dest-path`: If specified, a path relative to the top directory |
| 402 | of the repo client where the Git working directory for this project |
| 403 | should be placed. This is used to move a project in the checkout by |
| 404 | overriding the existing `path` setting. |
| 405 | |
| Peter Kjellerstedt | 75773b8 | 2025-11-08 02:36:56 +0100 | [diff] [blame] | 406 | Attribute `groups`: Set of additional groups to which this project |
| Josh Triplett | 884a387 | 2014-06-12 14:57:29 -0700 | [diff] [blame] | 407 | belongs. Same syntax as the corresponding element of `project`. |
| 408 | |
| Luis Hector Chavez | 7d52585 | 2018-03-15 09:54:08 -0700 | [diff] [blame] | 409 | Attribute `revision`: If specified, overrides the revision of the original |
| 410 | project. Same syntax as the corresponding element of `project`. |
| 411 | |
| Kyunam Jo | bd0aae9 | 2020-02-04 11:38:53 +0900 | [diff] [blame] | 412 | Attribute `remote`: If specified, overrides the remote of the original |
| 413 | project. Same syntax as the corresponding element of `project`. |
| 414 | |
| Erik Elmeke | 4cdfdb7 | 2022-09-09 17:13:17 +0200 | [diff] [blame] | 415 | Attribute `dest-branch`: If specified, overrides the dest-branch of the original |
| 416 | project. Same syntax as the corresponding element of `project`. |
| 417 | |
| 418 | Attribute `upstream`: If specified, overrides the upstream of the original |
| 419 | project. Same syntax as the corresponding element of `project`. |
| 420 | |
| Fredrik de Groot | 303bd96 | 2024-09-09 15:54:57 +0200 | [diff] [blame] | 421 | Attribute `base-rev`: If specified, adds a check against the revision |
| 422 | to be extended. Manifest parse will fail and give a list of mismatch extends |
| 423 | if the revisions being extended have changed since base-rev was set. |
| 424 | Intended for use with layered manifests using hash revisions to prevent |
| 425 | patch branches hiding newer upstream revisions. Also compares named refs |
| 426 | like branches or tags but is misleading if branches are used as base-rev. |
| 427 | Same syntax as the corresponding element of `project`. |
| 428 | |
| Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 429 | ### Element annotation |
| James W. Mills | 24c1308 | 2012-04-12 15:04:13 -0500 | [diff] [blame] | 430 | |
| 431 | Zero or more annotation elements may be specified as children of a |
| Peter Kjellerstedt | 4ab2284 | 2025-10-16 20:29:28 +0200 | [diff] [blame] | 432 | project element, an extend-project element, or a remote element. Each |
| 433 | element describes a name-value pair. For projects, this name-value pair |
| 434 | will be exported into each project's environment during a 'forall' |
| 435 | command, prefixed with `REPO__`. In addition, there is an optional |
| 436 | attribute "keep" which accepts the case insensitive values "true" |
| 437 | (default) or "false". This attribute determines whether or not the |
| Jack Neus | 6ea0cae | 2021-07-20 20:52:33 +0000 | [diff] [blame] | 438 | annotation will be kept when exported with the manifest subcommand. |
| James W. Mills | 24c1308 | 2012-04-12 15:04:13 -0500 | [diff] [blame] | 439 | |
| Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 440 | ### Element copyfile |
| Ruslan Bilovol | 54527e7 | 2015-09-08 13:11:23 +0300 | [diff] [blame] | 441 | |
| 442 | Zero or more copyfile elements may be specified as children of a |
| Peter Kjellerstedt | 4ab2284 | 2025-10-16 20:29:28 +0200 | [diff] [blame] | 443 | project element, or an extend-project element. Each element describes a |
| 444 | src-dest pair of files; the "src" file will be copied to the "dest" |
| 445 | place during `repo sync` command. |
| Mike Frysinger | c5b172a | 2019-07-31 17:34:23 -0400 | [diff] [blame] | 446 | |
| Ruslan Bilovol | 54527e7 | 2015-09-08 13:11:23 +0300 | [diff] [blame] | 447 | "src" is project relative, "dest" is relative to the top of the tree. |
| Mike Frysinger | c5b172a | 2019-07-31 17:34:23 -0400 | [diff] [blame] | 448 | Copying from paths outside of the project or to paths outside of the repo |
| 449 | client is not allowed. |
| 450 | |
| 451 | "src" and "dest" must be files. Directories or symlinks are not allowed. |
| 452 | Intermediate paths must not be symlinks either. |
| Ruslan Bilovol | 54527e7 | 2015-09-08 13:11:23 +0300 | [diff] [blame] | 453 | |
| Mike Frysinger | 50d2763 | 2019-08-01 18:57:10 -0400 | [diff] [blame] | 454 | Parent directories of "dest" will be automatically created if missing. |
| 455 | |
| Peter Kjellerstedt | 412367b | 2025-11-08 00:06:16 +0100 | [diff] [blame] | 456 | The files are copied in the order they are specified in the manifests. |
| 457 | If multiple elements specify the same source and destination, they will |
| 458 | only be applied as one, based on the first occurence. Files are copied |
| 459 | before any links specified via linkfile elements are created. |
| 460 | |
| Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 461 | ### Element linkfile |
| Ruslan Bilovol | 54527e7 | 2015-09-08 13:11:23 +0300 | [diff] [blame] | 462 | |
| Peter Kjellerstedt | 412367b | 2025-11-08 00:06:16 +0100 | [diff] [blame] | 463 | It's just like copyfile, but instead of copying it creates a symlink. |
| Ruslan Bilovol | 54527e7 | 2015-09-08 13:11:23 +0300 | [diff] [blame] | 464 | |
| Mike Frysinger | c5b172a | 2019-07-31 17:34:23 -0400 | [diff] [blame] | 465 | The symlink is created at "dest" (relative to the top of the tree) and |
| Mike Frysinger | 04122b7 | 2019-07-31 23:32:58 -0400 | [diff] [blame] | 466 | points to the path specified by "src" which is a path in the project. |
| Mike Frysinger | c5b172a | 2019-07-31 17:34:23 -0400 | [diff] [blame] | 467 | |
| Mike Frysinger | 50d2763 | 2019-08-01 18:57:10 -0400 | [diff] [blame] | 468 | Parent directories of "dest" will be automatically created if missing. |
| 469 | |
| Mike Frysinger | c5b172a | 2019-07-31 17:34:23 -0400 | [diff] [blame] | 470 | The symlink target may be a file or directory, but it may not point outside |
| 471 | of the repo client. |
| 472 | |
| Peter Kjellerstedt | 412367b | 2025-11-08 00:06:16 +0100 | [diff] [blame] | 473 | The links are created in the order they are specified in the manifests. |
| 474 | If multiple elements specify the same source and destination, they will |
| 475 | only be applied as one, based on the first occurence. Links are created |
| 476 | after any files specified via copyfile elements are copied. |
| 477 | |
| Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 478 | ### Element remove-project |
| Shawn O. Pearce | 03eaf07 | 2008-11-20 11:42:22 -0800 | [diff] [blame] | 479 | |
| Fredrik de Groot | be71c2f | 2023-05-31 16:56:34 +0200 | [diff] [blame] | 480 | Deletes a project from the internal manifest table, possibly |
| Shawn O. Pearce | 03eaf07 | 2008-11-20 11:42:22 -0800 | [diff] [blame] | 481 | allowing a subsequent project element in the same manifest file to |
| 482 | replace the project with a different source. |
| 483 | |
| David Pursehouse | b1525bf | 2012-11-14 08:51:38 +0900 | [diff] [blame] | 484 | This element is mostly useful in a local manifest file, where |
| Shawn O. Pearce | 03eaf07 | 2008-11-20 11:42:22 -0800 | [diff] [blame] | 485 | the user can remove a project, and possibly replace it with their |
| 486 | own definition. |
| 487 | |
| Fredrik de Groot | be71c2f | 2023-05-31 16:56:34 +0200 | [diff] [blame] | 488 | The project `name` or project `path` can be used to specify the remove target |
| 489 | meaning one of them is required. If only name is specified, all |
| 490 | projects with that name are removed. |
| 491 | |
| 492 | If both name and path are specified, only projects with the same name and |
| 493 | path are removed, meaning projects with the same name but in other |
| 494 | locations are kept. |
| 495 | |
| 496 | If only path is specified, a matching project is removed regardless of its |
| 497 | name. Logic otherwise behaves like both are specified. |
| 498 | |
| Michael Kelly | 06da998 | 2021-06-30 01:58:28 -0700 | [diff] [blame] | 499 | Attribute `optional`: Set to true to ignore remove-project elements with no |
| 500 | matching `project` element. |
| 501 | |
| Fredrik de Groot | 303bd96 | 2024-09-09 15:54:57 +0200 | [diff] [blame] | 502 | Attribute `base-rev`: If specified, adds a check against the revision |
| 503 | to be removed. Manifest parse will fail and give a list of mismatch removes |
| 504 | if the revisions being removed have changed since base-rev was set. |
| 505 | Intended for use with layered manifests using hash revisions to prevent |
| 506 | patch branches hiding newer upstream revisions. Also compares named refs |
| 507 | like branches or tags but is misleading if branches are used as base-rev. |
| 508 | Same syntax as the corresponding element of `project`. |
| 509 | |
| Mike Frysinger | 51e39d5 | 2020-12-04 05:32:06 -0500 | [diff] [blame] | 510 | ### Element repo-hooks |
| 511 | |
| 512 | NB: See the [practical documentation](./repo-hooks.md) for using repo hooks. |
| 513 | |
| 514 | Only one repo-hooks element may be specified at a time. |
| 515 | Attempting to redefine it will fail to parse. |
| 516 | |
| 517 | Attribute `in-project`: The project where the hooks are defined. The value |
| 518 | must match the `name` attribute (**not** the `path` attribute) of a previously |
| 519 | defined `project` element. |
| 520 | |
| 521 | Attribute `enabled-list`: List of hooks to use, whitespace or comma separated. |
| 522 | |
| Raman Tenneti | 1bb4fb2 | 2021-01-07 16:50:45 -0800 | [diff] [blame] | 523 | ### Element superproject |
| 524 | |
| 525 | *** |
| Raman Tenneti | 1c3f57e | 2021-05-04 12:32:13 -0700 | [diff] [blame] | 526 | *Note*: This is currently a WIP. |
| Raman Tenneti | 1bb4fb2 | 2021-01-07 16:50:45 -0800 | [diff] [blame] | 527 | *** |
| 528 | |
| 529 | NB: See the [git superprojects documentation]( |
| 530 | https://en.wikibooks.org/wiki/Git/Submodules_and_Superprojects) for background |
| 531 | information. |
| 532 | |
| 533 | This element is used to specify the URL of the superproject. It has "name" and |
| 534 | "remote" as atrributes. Only "name" is required while the others have |
| 535 | reasonable defaults. At most one superproject may be specified. |
| 536 | Attempting to redefine it will fail to parse. |
| 537 | |
| 538 | Attribute `name`: A unique name for the superproject. This attribute has the |
| 539 | same meaning as project's name attribute. See the |
| 540 | [element project](#element-project) for more information. |
| 541 | |
| 542 | Attribute `remote`: Name of a previously defined remote element. |
| 543 | If not supplied the remote given by the default element is used. |
| 544 | |
| Xin Li | e0b16a2 | 2021-09-26 23:20:32 -0700 | [diff] [blame] | 545 | Attribute `revision`: Name of the Git branch the manifest wants |
| 546 | to track for this superproject. If not supplied the revision given |
| 547 | by the remote element is used if applicable, else the default |
| 548 | element is used. |
| 549 | |
| Raman Tenneti | 1c3f57e | 2021-05-04 12:32:13 -0700 | [diff] [blame] | 550 | ### Element contactinfo |
| 551 | |
| 552 | *** |
| 553 | *Note*: This is currently a WIP. |
| 554 | *** |
| 555 | |
| 556 | This element is used to let manifest authors self-register contact info. |
| 557 | It has "bugurl" as a required atrribute. This element can be repeated, |
| 558 | and any later entries will clobber earlier ones. This would allow manifest |
| 559 | authors who extend manifests to specify their own contact info. |
| 560 | |
| 561 | Attribute `bugurl`: The URL to file a bug against the manifest owner. |
| 562 | |
| Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 563 | ### Element include |
| Brian Harring | 2644874 | 2011-04-28 05:04:41 -0700 | [diff] [blame] | 564 | |
| 565 | This element provides the capability of including another manifest |
| 566 | file into the originating manifest. Normal rules apply for the |
| David Pursehouse | 9f3406e | 2012-11-14 08:52:25 +0900 | [diff] [blame] | 567 | target manifest to include - it must be a usable manifest on its own. |
| Brian Harring | 2644874 | 2011-04-28 05:04:41 -0700 | [diff] [blame] | 568 | |
| David Pursehouse | 9f3406e | 2012-11-14 08:52:25 +0900 | [diff] [blame] | 569 | Attribute `name`: the manifest to include, specified relative to |
| 570 | the manifest repository's root. |
| Brian Harring | 2644874 | 2011-04-28 05:04:41 -0700 | [diff] [blame] | 571 | |
| Mike Frysinger | 68d5d4d | 2021-03-09 11:56:24 -0500 | [diff] [blame] | 572 | "name" may not be an absolute path or use "." or ".." path components. |
| 573 | These restrictions are not enforced for [Local Manifests]. |
| 574 | |
| Peter Kjellerstedt | 75773b8 | 2025-11-08 02:36:56 +0100 | [diff] [blame] | 575 | Attribute `groups`: Set of additional groups to which all projects |
| Fredrik de Groot | 352c93b | 2020-10-06 12:55:14 +0200 | [diff] [blame] | 576 | in the included manifest belong. This appends and recurses, meaning |
| LaMont Jones | cc879a9 | 2021-11-18 22:40:18 +0000 | [diff] [blame] | 577 | all projects in included manifests carry all parent include groups. |
| Peter Kjellerstedt | 47c24b5 | 2025-11-07 23:09:57 +0100 | [diff] [blame] | 578 | This also applies to all extend-project elements in the included manifests. |
| Fredrik de Groot | 352c93b | 2020-10-06 12:55:14 +0200 | [diff] [blame] | 579 | Same syntax as the corresponding element of `project`. |
| Shawn O. Pearce | 03eaf07 | 2008-11-20 11:42:22 -0800 | [diff] [blame] | 580 | |
| Shuchuan Zeng | 3e3340d | 2023-04-18 10:36:50 +0800 | [diff] [blame] | 581 | Attribute `revision`: Name of a Git branch (e.g. `main` or `refs/heads/main`) |
| Peter Kjellerstedt | 3073a90 | 2025-11-08 06:42:53 +0100 | [diff] [blame] | 582 | default to which all projects in the included manifest belong. This recurses, |
| 583 | meaning it will apply to all projects in all manifests included as a result of |
| 584 | this element. |
| Shuchuan Zeng | 3e3340d | 2023-04-18 10:36:50 +0800 | [diff] [blame] | 585 | |
| Mike Frysinger | 68d5d4d | 2021-03-09 11:56:24 -0500 | [diff] [blame] | 586 | ## Local Manifests {#local-manifests} |
| Shawn O. Pearce | 70cd4ab | 2008-11-06 08:48:44 -0800 | [diff] [blame] | 587 | |
| David Pursehouse | 2d5a0df | 2012-11-13 02:50:36 +0900 | [diff] [blame] | 588 | Additional remotes and projects may be added through local manifest |
| 589 | files stored in `$TOP_DIR/.repo/local_manifests/*.xml`. |
| Shawn O. Pearce | 70cd4ab | 2008-11-06 08:48:44 -0800 | [diff] [blame] | 590 | |
| 591 | For example: |
| 592 | |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 593 | $ ls .repo/local_manifests |
| 594 | local_manifest.xml |
| 595 | another_local_manifest.xml |
| David Pursehouse | 2d5a0df | 2012-11-13 02:50:36 +0900 | [diff] [blame] | 596 | |
| Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 597 | $ cat .repo/local_manifests/local_manifest.xml |
| 598 | <?xml version="1.0" encoding="UTF-8"?> |
| 599 | <manifest> |
| 600 | <project path="manifest" |
| 601 | name="tools/manifest" /> |
| 602 | <project path="platform-manifest" |
| 603 | name="platform/manifest" /> |
| 604 | </manifest> |
| Shawn O. Pearce | 70cd4ab | 2008-11-06 08:48:44 -0800 | [diff] [blame] | 605 | |
| David Pursehouse | 2d5a0df | 2012-11-13 02:50:36 +0900 | [diff] [blame] | 606 | Users may add projects to the local manifest(s) prior to a `repo sync` |
| Shawn O. Pearce | 70cd4ab | 2008-11-06 08:48:44 -0800 | [diff] [blame] | 607 | invocation, instructing repo to automatically download and manage |
| 608 | these extra projects. |
| David Pursehouse | 2d5a0df | 2012-11-13 02:50:36 +0900 | [diff] [blame] | 609 | |
| David Pursehouse | 52f1e5d | 2012-11-14 04:53:24 +0900 | [diff] [blame] | 610 | Manifest files stored in `$TOP_DIR/.repo/local_manifests/*.xml` will |
| 611 | be loaded in alphabetical order. |
| 612 | |
| Raman Tenneti | 78f4dd3 | 2021-06-07 13:27:37 -0700 | [diff] [blame] | 613 | Projects from local manifest files are added into |
| 614 | local::<local manifest filename> group. |
| 615 | |
| Mike Frysinger | 4e1fc10 | 2020-09-06 14:42:47 -0400 | [diff] [blame] | 616 | The legacy `$TOP_DIR/.repo/local_manifest.xml` path is no longer supported. |
| Mike Frysinger | 68d5d4d | 2021-03-09 11:56:24 -0500 | [diff] [blame] | 617 | |
| 618 | |
| 619 | [copyfile]: #Element-copyfile |
| 620 | [linkfile]: #Element-linkfile |
| 621 | [Local Manifests]: #local-manifests |