summaryrefslogtreecommitdiffstats
path: root/docs/manifest-format.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/manifest-format.txt')
-rw-r--r--docs/manifest-format.txt72
1 files changed, 59 insertions, 13 deletions
diff --git a/docs/manifest-format.txt b/docs/manifest-format.txt
index f499868c..0bf09f6f 100644
--- a/docs/manifest-format.txt
+++ b/docs/manifest-format.txt
@@ -41,17 +41,21 @@ following DTD:
41 <!ATTLIST default revision CDATA #IMPLIED> 41 <!ATTLIST default revision CDATA #IMPLIED>
42 <!ATTLIST default sync-j CDATA #IMPLIED> 42 <!ATTLIST default sync-j CDATA #IMPLIED>
43 <!ATTLIST default sync-c CDATA #IMPLIED> 43 <!ATTLIST default sync-c CDATA #IMPLIED>
44 <!ATTLIST default sync-s CDATA #IMPLIED>
44 45
45 <!ELEMENT manifest-server (EMPTY)> 46 <!ELEMENT manifest-server (EMPTY)>
46 <!ATTLIST url CDATA #REQUIRED> 47 <!ATTLIST url CDATA #REQUIRED>
47 48
48 <!ELEMENT project (annotation?)> 49 <!ELEMENT project (annotation?,
50 project*)>
49 <!ATTLIST project name CDATA #REQUIRED> 51 <!ATTLIST project name CDATA #REQUIRED>
50 <!ATTLIST project path CDATA #IMPLIED> 52 <!ATTLIST project path CDATA #IMPLIED>
51 <!ATTLIST project remote IDREF #IMPLIED> 53 <!ATTLIST project remote IDREF #IMPLIED>
52 <!ATTLIST project revision CDATA #IMPLIED> 54 <!ATTLIST project revision CDATA #IMPLIED>
53 <!ATTLIST project groups CDATA #IMPLIED> 55 <!ATTLIST project groups CDATA #IMPLIED>
54 <!ATTLIST project sync-c CDATA #IMPLIED> 56 <!ATTLIST project sync-c CDATA #IMPLIED>
57 <!ATTLIST project sync-s CDATA #IMPLIED>
58 <!ATTLIST project upstream CDATA #IMPLIED>
55 59
56 <!ELEMENT annotation (EMPTY)> 60 <!ELEMENT annotation (EMPTY)>
57 <!ATTLIST annotation name CDATA #REQUIRED> 61 <!ATTLIST annotation name CDATA #REQUIRED>
@@ -119,6 +123,15 @@ Attribute `revision`: Name of a Git branch (e.g. `master` or
119`refs/heads/master`). Project elements lacking their own 123`refs/heads/master`). Project elements lacking their own
120revision attribute will use this revision. 124revision attribute will use this revision.
121 125
126Attribute `sync_j`: Number of parallel jobs to use when synching.
127
128Attribute `sync_c`: Set to true to only sync the given Git
129branch (specified in the `revision` attribute) rather than the
130whole ref space. Project elements lacking a sync_c element of
131their own will use this value.
132
133Attribute `sync_s`: Set to true to also sync sub-projects.
134
122 135
123Element manifest-server 136Element manifest-server
124----------------------- 137-----------------------
@@ -152,7 +165,10 @@ Element project
152 165
153One or more project elements may be specified. Each element 166One or more project elements may be specified. Each element
154describes a single Git repository to be cloned into the repo 167describes a single Git repository to be cloned into the repo
155client workspace. 168client workspace. You may specify Git-submodules by creating a
169nested project. Git-submodules will be automatically
170recognized and inherit their parent's attributes, but those
171may be overridden by an explicitly specified project element.
156 172
157Attribute `name`: A unique name for this project. The project's 173Attribute `name`: A unique name for this project. The project's
158name is appended onto its remote's fetch URL to generate the actual 174name is appended onto its remote's fetch URL to generate the actual
@@ -163,7 +179,8 @@ URL to configure the Git remote with. The URL gets formed as:
163where ${remote_fetch} is the remote's fetch attribute and 179where ${remote_fetch} is the remote's fetch attribute and
164${project_name} is the project's name attribute. The suffix ".git" 180${project_name} is the project's name attribute. The suffix ".git"
165is always appended as repo assumes the upstream is a forest of 181is always appended as repo assumes the upstream is a forest of
166bare Git repositories. 182bare Git repositories. If the project has a parent element, its
183name will be prefixed by the parent's.
167 184
168The project name must match the name Gerrit knows, if Gerrit is 185The project name must match the name Gerrit knows, if Gerrit is
169being used for code reviews. 186being used for code reviews.
@@ -171,6 +188,8 @@ being used for code reviews.
171Attribute `path`: An optional path relative to the top directory 188Attribute `path`: An optional path relative to the top directory
172of the repo client where the Git working directory for this project 189of the repo client where the Git working directory for this project
173should be placed. If not supplied the project name is used. 190should be placed. If not supplied the project name is used.
191If the project has a parent element, its path will be prefixed
192by the parent's.
174 193
175Attribute `remote`: Name of a previously defined remote element. 194Attribute `remote`: Name of a previously defined remote element.
176If not supplied the remote given by the default element is used. 195If not supplied the remote given by the default element is used.
@@ -190,6 +209,18 @@ its name:`name` and path:`path`. E.g. for
190definition is implicitly in the following manifest groups: 209definition is implicitly in the following manifest groups:
191default, name:monkeys, and path:barrel-of. If you place a project in the 210default, name:monkeys, and path:barrel-of. If you place a project in the
192group "notdefault", it will not be automatically downloaded by repo. 211group "notdefault", it will not be automatically downloaded by repo.
212If the project has a parent element, the `name` and `path` here
213are the prefixed ones.
214
215Attribute `sync_c`: Set to true to only sync the given Git
216branch (specified in the `revision` attribute) rather than the
217whole ref space.
218
219Attribute `sync_s`: Set to true to also sync sub-projects.
220
221Attribute `upstream`: Name of the Git branch in which a sha1
222can be found. Used when syncing a revision locked manifest in
223-c mode to avoid having to sync the entire ref space.
193 224
194Element annotation 225Element annotation
195------------------ 226------------------
@@ -209,7 +240,7 @@ Deletes the named project from the internal manifest table, possibly
209allowing a subsequent project element in the same manifest file to 240allowing a subsequent project element in the same manifest file to
210replace the project with a different source. 241replace the project with a different source.
211 242
212This element is mostly useful in the local_manifest.xml, where 243This element is mostly useful in a local manifest file, where
213the user can remove a project, and possibly replace it with their 244the user can remove a project, and possibly replace it with their
214own definition. 245own definition.
215 246
@@ -218,21 +249,25 @@ Element include
218 249
219This element provides the capability of including another manifest 250This element provides the capability of including another manifest
220file into the originating manifest. Normal rules apply for the 251file into the originating manifest. Normal rules apply for the
221target manifest to include- it must be a usable manifest on it's own. 252target manifest to include - it must be a usable manifest on its own.
222 253
223Attribute `name`; the manifest to include, specified relative to 254Attribute `name`: the manifest to include, specified relative to
224the manifest repositories root. 255the manifest repository's root.
225 256
226 257
227Local Manifest 258Local Manifests
228============== 259===============
229 260
230Additional remotes and projects may be added through a local 261Additional remotes and projects may be added through local manifest
231manifest, stored in `$TOP_DIR/.repo/local_manifest.xml`. 262files stored in `$TOP_DIR/.repo/local_manifests/*.xml`.
232 263
233For example: 264For example:
234 265
235 $ cat .repo/local_manifest.xml 266 $ ls .repo/local_manifests
267 local_manifest.xml
268 another_local_manifest.xml
269
270 $ cat .repo/local_manifests/local_manifest.xml
236 <?xml version="1.0" encoding="UTF-8"?> 271 <?xml version="1.0" encoding="UTF-8"?>
237 <manifest> 272 <manifest>
238 <project path="manifest" 273 <project path="manifest"
@@ -241,6 +276,17 @@ For example:
241 name="platform/manifest" /> 276 name="platform/manifest" />
242 </manifest> 277 </manifest>
243 278
244Users may add projects to the local manifest prior to a `repo sync` 279Users may add projects to the local manifest(s) prior to a `repo sync`
245invocation, instructing repo to automatically download and manage 280invocation, instructing repo to automatically download and manage
246these extra projects. 281these extra projects.
282
283Manifest files stored in `$TOP_DIR/.repo/local_manifests/*.xml` will
284be loaded in alphabetical order.
285
286Additional remotes and projects may also be added through a local
287manifest, stored in `$TOP_DIR/.repo/local_manifest.xml`. This method
288is deprecated in favor of using multiple manifest files as mentioned
289above.
290
291If `$TOP_DIR/.repo/local_manifest.xml` exists, it will be loaded before
292any manifest files stored in `$TOP_DIR/.repo/local_manifests/*.xml`.