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 | |
| 24 | |
| 25 | remote*, |
| 26 | default?, |
| 27 | manifest-server?, |
| 28 | remove-project*, |
| 29 | project*, |
| 30 | extend-project*, |
| 31 | repo-hooks?, |
| 32 | include*)> |
Chirayu Desai | d5a5b19 | 2013-11-21 19:15:30 +0530 | [diff] [blame] | 33 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 34 | |
Chirayu Desai | d5a5b19 | 2013-11-21 19:15:30 +0530 | [diff] [blame] | 35 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
Chirayu Desai | d5a5b19 | 2013-11-21 19:15:30 +0530 | [diff] [blame] | 43 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
Nico Sallembien | a1bfd2c | 2010-04-06 10:40:01 -0700 | [diff] [blame] | 53 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 54 | |
| 55 | |
Chirayu Desai | d5a5b19 | 2013-11-21 19:15:30 +0530 | [diff] [blame] | 56 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 57 | |
| 58 | project*, |
| 59 | copyfile*, |
| 60 | linkfile*)> |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
Kyunam Jo | 01019d9 | 2019-03-18 13:30:58 +0900 | [diff] [blame] | 69 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 70 | |
| 71 | |
| 72 | |
James W. Mills | 24c1308 | 2012-04-12 15:04:13 -0500 | [diff] [blame] | 73 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 74 | |
| 75 | |
| 76 | |
| 77 | |
Chirayu Desai | d5a5b19 | 2013-11-21 19:15:30 +0530 | [diff] [blame] | 78 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 79 | |
| 80 | |
| 81 | |
Ruslan Bilovol | 54527e7 | 2015-09-08 13:11:23 +0300 | [diff] [blame] | 82 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 83 | |
| 84 | |
| 85 | |
Ruslan Bilovol | 54527e7 | 2015-09-08 13:11:23 +0300 | [diff] [blame] | 86 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
Kyunam Jo | bd0aae9 | 2020-02-04 11:38:53 +0900 | [diff] [blame] | 92 | |
Josh Triplett | 884a387 | 2014-06-12 14:57:29 -0700 | [diff] [blame] | 93 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 94 | |
| 95 | |
Doug Anderson | 37282b4 | 2011-03-04 11:54:18 -0800 | [diff] [blame] | 96 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 97 | |
| 98 | |
| 99 | |
Brian Harring | 2644874 | 2011-04-28 05:04:41 -0700 | [diff] [blame] | 100 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 101 | |
Fredrik de Groot | 352c93b | 2020-10-06 12:55:14 +0200 | [diff] [blame] | 102 | |
| 103 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 104 | ]> |
| 105 | ``` |
Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 106 | |
| 107 | A description of the elements and their attributes follows. |
| 108 | |
| 109 | |
Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 110 | ### Element manifest |
Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 111 | |
| 112 | The root element of the file. |
| 113 | |
Mike Frysinger | 51e39d5 | 2020-12-04 05:32:06 -0500 | [diff] [blame^] | 114 | ### Element notice |
| 115 | |
| 116 | Arbitrary text that is displayed to users whenever `repo sync` finishes. |
| 117 | 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] | 118 | |
Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 119 | ### Element remote |
Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 120 | |
| 121 | One or more remote elements may be specified. Each remote element |
| 122 | specifies a Git URL shared by one or more projects and (optionally) |
| 123 | the Gerrit review server those projects upload changes through. |
| 124 | |
| 125 | Attribute `name`: A short name unique to this manifest file. The |
| 126 | name specified here is used as the remote name in each project's |
| 127 | .git/config, and is therefore automatically available to commands |
| 128 | like `git fetch`, `git remote`, `git pull` and `git push`. |
| 129 | |
Yestin Sun | b292b98 | 2012-07-02 07:32:50 -0700 | [diff] [blame] | 130 | Attribute `alias`: The alias, if specified, is used to override |
| 131 | `name` to be set as the remote name in each project's .git/config. |
| 132 | Its value can be duplicated while attribute `name` has to be unique |
| 133 | in the manifest file. This helps each project to be able to have |
| 134 | same remote name which actually points to different remote url. |
| 135 | |
Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 136 | Attribute `fetch`: The Git URL prefix for all projects which use |
| 137 | this remote. Each project's name is appended to this prefix to |
| 138 | form the actual URL used to clone the project. |
| 139 | |
Steve Rae | d648045 | 2016-08-10 15:00:00 -0700 | [diff] [blame] | 140 | Attribute `pushurl`: The Git "push" URL prefix for all projects |
| 141 | which use this remote. Each project's name is appended to this |
| 142 | prefix to form the actual URL used to "git push" the project. |
| 143 | This attribute is optional; if not specified then "git push" |
| 144 | will use the same URL as the `fetch` attribute. |
| 145 | |
Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 146 | Attribute `review`: Hostname of the Gerrit server where reviews |
| 147 | are uploaded to by `repo upload`. This attribute is optional; |
| 148 | if not specified then `repo upload` will not function. |
| 149 | |
Mike Frysinger | 6e89c96 | 2020-11-15 18:42:26 -0500 | [diff] [blame] | 150 | Attribute `revision`: Name of a Git branch (e.g. `main` or |
| 151 | `refs/heads/main`). Remotes with their own revision will override |
Anthony King | 36ea2fb | 2014-05-06 11:54:01 +0100 | [diff] [blame] | 152 | the default revision. |
| 153 | |
Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 154 | ### Element default |
Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 155 | |
| 156 | At most one default element may be specified. Its remote and |
| 157 | revision attributes are used when a project element does not |
| 158 | specify its own remote or revision attribute. |
| 159 | |
| 160 | Attribute `remote`: Name of a previously defined remote element. |
| 161 | Project elements lacking a remote attribute of their own will use |
| 162 | this remote. |
| 163 | |
Mike Frysinger | 6e89c96 | 2020-11-15 18:42:26 -0500 | [diff] [blame] | 164 | Attribute `revision`: Name of a Git branch (e.g. `main` or |
| 165 | `refs/heads/main`). Project elements lacking their own |
Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 166 | revision attribute will use this revision. |
| 167 | |
Mike Frysinger | 6e89c96 | 2020-11-15 18:42:26 -0500 | [diff] [blame] | 168 | Attribute `dest-branch`: Name of a Git branch (e.g. `main`). |
Bryan Jacobs | f609f91 | 2013-05-06 13:36:24 -0400 | [diff] [blame] | 169 | Project elements not setting their own `dest-branch` will inherit |
| 170 | this value. If this value is not set, projects will use `revision` |
| 171 | by default instead. |
| 172 | |
Nasser Grainawi | da40341 | 2018-05-04 12:53:29 -0600 | [diff] [blame] | 173 | Attribute `upstream`: Name of the Git ref in which a sha1 |
| 174 | can be found. Used when syncing a revision locked manifest in |
| 175 | -c mode to avoid having to sync the entire ref space. Project elements |
| 176 | not setting their own `upstream` will inherit this value. |
| 177 | |
Mani Chandel | 7a91d51 | 2014-07-24 16:27:08 +0530 | [diff] [blame] | 178 | Attribute `sync-j`: Number of parallel jobs to use when synching. |
David Pursehouse | 4e46520 | 2012-11-27 22:20:10 +0900 | [diff] [blame] | 179 | |
Mani Chandel | 7a91d51 | 2014-07-24 16:27:08 +0530 | [diff] [blame] | 180 | Attribute `sync-c`: Set to true to only sync the given Git |
David Pursehouse | 4e46520 | 2012-11-27 22:20:10 +0900 | [diff] [blame] | 181 | branch (specified in the `revision` attribute) rather than the |
Mani Chandel | 7a91d51 | 2014-07-24 16:27:08 +0530 | [diff] [blame] | 182 | whole ref space. Project elements lacking a sync-c element of |
David Pursehouse | 4e46520 | 2012-11-27 22:20:10 +0900 | [diff] [blame] | 183 | their own will use this value. |
| 184 | |
Mani Chandel | 7a91d51 | 2014-07-24 16:27:08 +0530 | [diff] [blame] | 185 | Attribute `sync-s`: Set to true to also sync sub-projects. |
David Pursehouse | 4e46520 | 2012-11-27 22:20:10 +0900 | [diff] [blame] | 186 | |
YOUNG HO CHA | a32c92c | 2018-02-14 16:57:31 +0900 | [diff] [blame] | 187 | Attribute `sync-tags`: Set to false to only sync the given Git |
| 188 | branch (specified in the `revision` attribute) rather than |
| 189 | the other ref tags. |
| 190 | |
Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 191 | |
Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 192 | ### Element manifest-server |
Nico Sallembien | a1bfd2c | 2010-04-06 10:40:01 -0700 | [diff] [blame] | 193 | |
| 194 | At most one manifest-server may be specified. The url attribute |
| 195 | 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] | 196 | XML RPC service. |
Nico Sallembien | a1bfd2c | 2010-04-06 10:40:01 -0700 | [diff] [blame] | 197 | |
David Pursehouse | 9a27d01 | 2012-08-21 14:23:49 +0900 | [diff] [blame] | 198 | The manifest server should implement the following RPC methods: |
Nico Sallembien | a1bfd2c | 2010-04-06 10:40:01 -0700 | [diff] [blame] | 199 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 200 | GetApprovedManifest(branch, target) |
Nico Sallembien | a1bfd2c | 2010-04-06 10:40:01 -0700 | [diff] [blame] | 201 | |
David Pursehouse | 9a27d01 | 2012-08-21 14:23:49 +0900 | [diff] [blame] | 202 | Return a manifest in which each project is pegged to a known good revision |
David Pursehouse | e868841 | 2016-04-13 17:55:34 +0900 | [diff] [blame] | 203 | for the current branch and target. This is used by repo sync when the |
| 204 | --smart-sync option is given. |
David Pursehouse | 9a27d01 | 2012-08-21 14:23:49 +0900 | [diff] [blame] | 205 | |
Nico Sallembien | a1bfd2c | 2010-04-06 10:40:01 -0700 | [diff] [blame] | 206 | The target to use is defined by environment variables TARGET_PRODUCT |
| 207 | and TARGET_BUILD_VARIANT. These variables are used to create a string |
| 208 | of the form $TARGET_PRODUCT-$TARGET_BUILD_VARIANT, e.g. passion-userdebug. |
| 209 | If one of those variables or both are not present, the program will call |
David Pursehouse | daa851f | 2012-08-21 13:52:18 +0900 | [diff] [blame] | 210 | GetApprovedManifest without the target parameter and the manifest server |
Nico Sallembien | a1bfd2c | 2010-04-06 10:40:01 -0700 | [diff] [blame] | 211 | should choose a reasonable default target. |
| 212 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 213 | GetManifest(tag) |
David Pursehouse | 9a27d01 | 2012-08-21 14:23:49 +0900 | [diff] [blame] | 214 | |
| 215 | Return a manifest in which each project is pegged to the revision at |
David Pursehouse | e868841 | 2016-04-13 17:55:34 +0900 | [diff] [blame] | 216 | the specified tag. This is used by repo sync when the --smart-tag option |
| 217 | is given. |
David Pursehouse | 9a27d01 | 2012-08-21 14:23:49 +0900 | [diff] [blame] | 218 | |
Nico Sallembien | a1bfd2c | 2010-04-06 10:40:01 -0700 | [diff] [blame] | 219 | |
Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 220 | ### Element project |
Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 221 | |
| 222 | One or more project elements may be specified. Each element |
| 223 | describes a single Git repository to be cloned into the repo |
Che-Liang Chiou | b2bd91c | 2012-01-11 11:28:42 +0800 | [diff] [blame] | 224 | client workspace. You may specify Git-submodules by creating a |
| 225 | nested project. Git-submodules will be automatically |
| 226 | recognized and inherit their parent's attributes, but those |
| 227 | may be overridden by an explicitly specified project element. |
Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 228 | |
| 229 | Attribute `name`: A unique name for this project. The project's |
| 230 | name is appended onto its remote's fetch URL to generate the actual |
| 231 | URL to configure the Git remote with. The URL gets formed as: |
| 232 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 233 | ${remote_fetch}/${project_name}.git |
Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 234 | |
| 235 | where ${remote_fetch} is the remote's fetch attribute and |
| 236 | ${project_name} is the project's name attribute. The suffix ".git" |
David Pursehouse | daa851f | 2012-08-21 13:52:18 +0900 | [diff] [blame] | 237 | 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] | 238 | bare Git repositories. If the project has a parent element, its |
| 239 | name will be prefixed by the parent's. |
Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 240 | |
| 241 | The project name must match the name Gerrit knows, if Gerrit is |
| 242 | being used for code reviews. |
| 243 | |
| 244 | Attribute `path`: An optional path relative to the top directory |
| 245 | of the repo client where the Git working directory for this project |
| 246 | should be placed. If not supplied the project name is used. |
Che-Liang Chiou | b2bd91c | 2012-01-11 11:28:42 +0800 | [diff] [blame] | 247 | If the project has a parent element, its path will be prefixed |
| 248 | by the parent's. |
Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 249 | |
| 250 | Attribute `remote`: Name of a previously defined remote element. |
| 251 | If not supplied the remote given by the default element is used. |
| 252 | |
| 253 | Attribute `revision`: Name of the Git branch the manifest wants |
| 254 | to track for this project. Names can be relative to refs/heads |
Mike Frysinger | 6e89c96 | 2020-11-15 18:42:26 -0500 | [diff] [blame] | 255 | (e.g. just "main") or absolute (e.g. "refs/heads/main"). |
Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 256 | Tags and/or explicit SHA-1s should work in theory, but have not |
| 257 | been extensively tested. If not supplied the revision given by |
Anthony King | 36ea2fb | 2014-05-06 11:54:01 +0100 | [diff] [blame] | 258 | the remote element is used if applicable, else the default |
| 259 | element is used. |
Shawn O. Pearce | 3e54819 | 2008-11-04 11:19:36 -0800 | [diff] [blame] | 260 | |
Mike Frysinger | 6e89c96 | 2020-11-15 18:42:26 -0500 | [diff] [blame] | 261 | Attribute `dest-branch`: Name of a Git branch (e.g. `main`). |
Bryan Jacobs | f609f91 | 2013-05-06 13:36:24 -0400 | [diff] [blame] | 262 | When using `repo upload`, changes will be submitted for code |
| 263 | review on this branch. If unspecified both here and in the |
| 264 | default element, `revision` is used instead. |
| 265 | |
Colin Cross | 5acde75 | 2012-03-28 20:15:45 -0700 | [diff] [blame] | 266 | Attribute `groups`: List of groups to which this project belongs, |
Conley Owens | 971de8e | 2012-04-16 10:36:08 -0700 | [diff] [blame] | 267 | whitespace or comma separated. All projects belong to the group |
Conley Owens | bb1b5f5 | 2012-08-13 13:11:18 -0700 | [diff] [blame] | 268 | "all", and each project automatically belongs to a group of |
| 269 | its name:`name` and path:`path`. E.g. for |
Brian Harring | 7da1314 | 2012-06-15 02:24:20 -0700 | [diff] [blame] | 270 | , that project |
| 271 | definition is implicitly in the following manifest groups: |
Conley Owens | bb1b5f5 | 2012-08-13 13:11:18 -0700 | [diff] [blame] | 272 | default, name:monkeys, and path:barrel-of. If you place a project in the |
| 273 | group "notdefault", it will not be automatically downloaded by repo. |
Che-Liang Chiou | b2bd91c | 2012-01-11 11:28:42 +0800 | [diff] [blame] | 274 | If the project has a parent element, the `name` and `path` here |
| 275 | are the prefixed ones. |
Colin Cross | 5acde75 | 2012-03-28 20:15:45 -0700 | [diff] [blame] | 276 | |
Mani Chandel | 7a91d51 | 2014-07-24 16:27:08 +0530 | [diff] [blame] | 277 | Attribute `sync-c`: Set to true to only sync the given Git |
David Pursehouse | 4e46520 | 2012-11-27 22:20:10 +0900 | [diff] [blame] | 278 | branch (specified in the `revision` attribute) rather than the |
| 279 | whole ref space. |
| 280 | |
Mani Chandel | 7a91d51 | 2014-07-24 16:27:08 +0530 | [diff] [blame] | 281 | Attribute `sync-s`: Set to true to also sync sub-projects. |
David Pursehouse | 4e46520 | 2012-11-27 22:20:10 +0900 | [diff] [blame] | 282 | |
Nasser Grainawi | 909d58b | 2014-09-19 12:13:04 -0600 | [diff] [blame] | 283 | Attribute `upstream`: Name of the Git ref in which a sha1 |
David Pursehouse | 4e46520 | 2012-11-27 22:20:10 +0900 | [diff] [blame] | 284 | can be found. Used when syncing a revision locked manifest in |
| 285 | -c mode to avoid having to sync the entire ref space. |
| 286 | |
David Pursehouse | ede7f12 | 2012-11-27 22:25:30 +0900 | [diff] [blame] | 287 | Attribute `clone-depth`: Set the depth to use when fetching this |
| 288 | project. If specified, this value will override any value given |
| 289 | to repo init with the --depth option on the command line. |
| 290 | |
Scott Fan | db83b1b | 2013-02-28 09:34:14 +0800 | [diff] [blame] | 291 | Attribute `force-path`: Set to true to force this project to create the |
| 292 | local mirror repository according to its `path` attribute (if supplied) |
| 293 | rather than the `name` attribute. This attribute only applies to the |
| 294 | local mirrors syncing, it will be ignored when syncing the projects in a |
| 295 | client working directory. |
| 296 | |
Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 297 | ### Element extend-project |
Josh Triplett | 884a387 | 2014-06-12 14:57:29 -0700 | [diff] [blame] | 298 | |
| 299 | Modify the attributes of the named project. |
| 300 | |
| 301 | This element is mostly useful in a local manifest file, to modify the |
| 302 | attributes of an existing project without completely replacing the |
| 303 | existing project definition. This makes the local manifest more robust |
| 304 | against changes to the original manifest. |
| 305 | |
| 306 | Attribute `path`: If specified, limit the change to projects checked out |
| 307 | at the specified path, rather than all projects with the given name. |
| 308 | |
| 309 | Attribute `groups`: List of additional groups to which this project |
| 310 | belongs. Same syntax as the corresponding element of `project`. |
| 311 | |
Luis Hector Chavez | 7d52585 | 2018-03-15 09:54:08 -0700 | [diff] [blame] | 312 | Attribute `revision`: If specified, overrides the revision of the original |
| 313 | project. Same syntax as the corresponding element of `project`. |
| 314 | |
Kyunam Jo | bd0aae9 | 2020-02-04 11:38:53 +0900 | [diff] [blame] | 315 | Attribute `remote`: If specified, overrides the remote of the original |
| 316 | project. Same syntax as the corresponding element of `project`. |
| 317 | |
Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 318 | ### Element annotation |
James W. Mills | 24c1308 | 2012-04-12 15:04:13 -0500 | [diff] [blame] | 319 | |
| 320 | Zero or more annotation elements may be specified as children of a |
| 321 | project element. Each element describes a name-value pair that will be |
| 322 | exported into each project's environment during a 'forall' command, |
| 323 | prefixed with REPO__. In addition, there is an optional attribute |
| 324 | "keep" which accepts the case insensitive values "true" (default) or |
| 325 | "false". This attribute determines whether or not the annotation will |
| 326 | be kept when exported with the manifest subcommand. |
| 327 | |
Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 328 | ### Element copyfile |
Ruslan Bilovol | 54527e7 | 2015-09-08 13:11:23 +0300 | [diff] [blame] | 329 | |
| 330 | Zero or more copyfile elements may be specified as children of a |
| 331 | project element. Each element describes a src-dest pair of files; |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 332 | the "src" file will be copied to the "dest" place during `repo sync` |
Ruslan Bilovol | 54527e7 | 2015-09-08 13:11:23 +0300 | [diff] [blame] | 333 | command. |
Mike Frysinger | c5b172a | 2019-07-31 17:34:23 -0400 | [diff] [blame] | 334 | |
Ruslan Bilovol | 54527e7 | 2015-09-08 13:11:23 +0300 | [diff] [blame] | 335 | "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] | 336 | Copying from paths outside of the project or to paths outside of the repo |
| 337 | client is not allowed. |
| 338 | |
| 339 | "src" and "dest" must be files. Directories or symlinks are not allowed. |
| 340 | Intermediate paths must not be symlinks either. |
Ruslan Bilovol | 54527e7 | 2015-09-08 13:11:23 +0300 | [diff] [blame] | 341 | |
Mike Frysinger | 50d2763 | 2019-08-01 18:57:10 -0400 | [diff] [blame] | 342 | Parent directories of "dest" will be automatically created if missing. |
| 343 | |
Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 344 | ### Element linkfile |
Ruslan Bilovol | 54527e7 | 2015-09-08 13:11:23 +0300 | [diff] [blame] | 345 | |
| 346 | It's just like copyfile and runs at the same time as copyfile but |
| 347 | instead of copying it creates a symlink. |
| 348 | |
Mike Frysinger | c5b172a | 2019-07-31 17:34:23 -0400 | [diff] [blame] | 349 | 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] | 350 | 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] | 351 | |
Mike Frysinger | 50d2763 | 2019-08-01 18:57:10 -0400 | [diff] [blame] | 352 | Parent directories of "dest" will be automatically created if missing. |
| 353 | |
Mike Frysinger | c5b172a | 2019-07-31 17:34:23 -0400 | [diff] [blame] | 354 | The symlink target may be a file or directory, but it may not point outside |
| 355 | of the repo client. |
| 356 | |
Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 357 | ### Element remove-project |
Shawn O. Pearce | 03eaf07 | 2008-11-20 11:42:22 -0800 | [diff] [blame] | 358 | |
| 359 | Deletes the named project from the internal manifest table, possibly |
| 360 | allowing a subsequent project element in the same manifest file to |
| 361 | replace the project with a different source. |
| 362 | |
David Pursehouse | b1525bf | 2012-11-14 08:51:38 +0900 | [diff] [blame] | 363 | This element is mostly useful in a local manifest file, where |
Shawn O. Pearce | 03eaf07 | 2008-11-20 11:42:22 -0800 | [diff] [blame] | 364 | the user can remove a project, and possibly replace it with their |
| 365 | own definition. |
| 366 | |
Mike Frysinger | 51e39d5 | 2020-12-04 05:32:06 -0500 | [diff] [blame^] | 367 | ### Element repo-hooks |
| 368 | |
| 369 | NB: See the [practical documentation](./repo-hooks.md) for using repo hooks. |
| 370 | |
| 371 | Only one repo-hooks element may be specified at a time. |
| 372 | Attempting to redefine it will fail to parse. |
| 373 | |
| 374 | Attribute `in-project`: The project where the hooks are defined. The value |
| 375 | must match the `name` attribute (**not** the `path` attribute) of a previously |
| 376 | defined `project` element. |
| 377 | |
| 378 | Attribute `enabled-list`: List of hooks to use, whitespace or comma separated. |
| 379 | |
Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 380 | ### Element include |
Brian Harring | 2644874 | 2011-04-28 05:04:41 -0700 | [diff] [blame] | 381 | |
| 382 | This element provides the capability of including another manifest |
| 383 | file into the originating manifest. Normal rules apply for the |
David Pursehouse | 9f3406e | 2012-11-14 08:52:25 +0900 | [diff] [blame] | 384 | 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] | 385 | |
David Pursehouse | 9f3406e | 2012-11-14 08:52:25 +0900 | [diff] [blame] | 386 | Attribute `name`: the manifest to include, specified relative to |
| 387 | the manifest repository's root. |
Brian Harring | 2644874 | 2011-04-28 05:04:41 -0700 | [diff] [blame] | 388 | |
Fredrik de Groot | 352c93b | 2020-10-06 12:55:14 +0200 | [diff] [blame] | 389 | Attribute `groups`: List of additional groups to which all projects |
| 390 | in the included manifest belong. This appends and recurses, meaning |
| 391 | all projects in sub-manifests carry all parent include groups. |
| 392 | Same syntax as the corresponding element of `project`. |
Shawn O. Pearce | 03eaf07 | 2008-11-20 11:42:22 -0800 | [diff] [blame] | 393 | |
Mike Frysinger | b8f7bb0 | 2018-10-10 01:05:11 -0400 | [diff] [blame] | 394 | ## Local Manifests |
Shawn O. Pearce | 70cd4ab | 2008-11-06 08:48:44 -0800 | [diff] [blame] | 395 | |
David Pursehouse | 2d5a0df | 2012-11-13 02:50:36 +0900 | [diff] [blame] | 396 | Additional remotes and projects may be added through local manifest |
| 397 | files stored in `$TOP_DIR/.repo/local_manifests/*.xml`. |
Shawn O. Pearce | 70cd4ab | 2008-11-06 08:48:44 -0800 | [diff] [blame] | 398 | |
| 399 | For example: |
| 400 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 401 | $ ls .repo/local_manifests |
| 402 | local_manifest.xml |
| 403 | another_local_manifest.xml |
David Pursehouse | 2d5a0df | 2012-11-13 02:50:36 +0900 | [diff] [blame] | 404 | |
Mike Frysinger | 3891b75 | 2018-10-05 19:26:15 -0400 | [diff] [blame] | 405 | $ cat .repo/local_manifests/local_manifest.xml |
| 406 | |
| 407 | |
| 408 | |
| 409 | name="tools/manifest" /> |
| 410 | |
| 411 | name="platform/manifest" /> |
| 412 | |
Shawn O. Pearce | 70cd4ab | 2008-11-06 08:48:44 -0800 | [diff] [blame] | 413 | |
David Pursehouse | 2d5a0df | 2012-11-13 02:50:36 +0900 | [diff] [blame] | 414 | 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] | 415 | invocation, instructing repo to automatically download and manage |
| 416 | these extra projects. |
David Pursehouse | 2d5a0df | 2012-11-13 02:50:36 +0900 | [diff] [blame] | 417 | |
David Pursehouse | 52f1e5d | 2012-11-14 04:53:24 +0900 | [diff] [blame] | 418 | Manifest files stored in `$TOP_DIR/.repo/local_manifests/*.xml` will |
| 419 | be loaded in alphabetical order. |
| 420 | |
Mike Frysinger | 4e1fc10 | 2020-09-06 14:42:47 -0400 | [diff] [blame] | 421 | The legacy `$TOP_DIR/.repo/local_manifest.xml` path is no longer supported. |