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