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