diff options
author | Mike Frysinger <vapier@google.com> | 2018-10-05 19:26:15 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2018-10-05 19:32:51 -0400 |
commit | 3891b7519d35b6bac3e81744c846ca2ed0bd1be2 (patch) | |
tree | b968b6c5611ea21703dfc1144f7fe175c9409dfb | |
parent | 2b42d288c08bdfd0fc3402fa118d91a1aebdb655 (diff) | |
download | git-repo-3891b7519d35b6bac3e81744c846ca2ed0bd1be2.tar.gz |
manifest-format: convert to markdown
The gitiles system doesn't render .txt files, so convert this to .md
for better display online.
Change-Id: Ie12e46daf008dd8c97ae2ffd21fb68bd948fe625
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | docs/manifest-format.md (renamed from docs/manifest-format.txt) | 200 | ||||
-rw-r--r-- | docs/repo-hooks.md | 2 | ||||
-rw-r--r-- | subcmds/manifest.py | 2 |
4 files changed, 105 insertions, 101 deletions
@@ -11,6 +11,6 @@ that you can put anywhere in your path. | |||
11 | * Source: https://code.google.com/p/git-repo/ | 11 | * Source: https://code.google.com/p/git-repo/ |
12 | * Overview: https://source.android.com/source/developing.html | 12 | * Overview: https://source.android.com/source/developing.html |
13 | * Docs: https://source.android.com/source/using-repo.html | 13 | * Docs: https://source.android.com/source/using-repo.html |
14 | * [repo Manifest Format](./docs/manifest-format.txt) | 14 | * [repo Manifest Format](./docs/manifest-format.md) |
15 | * [repo Hooks](./docs/repo-hooks.md) | 15 | * [repo Hooks](./docs/repo-hooks.md) |
16 | * [Submitting patches](./SUBMITTING_PATCHES.md) | 16 | * [Submitting patches](./SUBMITTING_PATCHES.md) |
diff --git a/docs/manifest-format.txt b/docs/manifest-format.md index 0c957dd5..cf48698d 100644 --- a/docs/manifest-format.txt +++ b/docs/manifest-format.md | |||
@@ -6,99 +6,103 @@ the directories that are visible and where they should be obtained | |||
6 | from with git. | 6 | from with git. |
7 | 7 | ||
8 | The basic structure of a manifest is a bare Git repository holding | 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. | 9 | a single `default.xml` XML file in the top level directory. |
10 | 10 | ||
11 | Manifests are inherently version controlled, since they are kept | 11 | Manifests are inherently version controlled, since they are kept |
12 | within a Git repository. Updates to manifests are automatically | 12 | within a Git repository. Updates to manifests are automatically |
13 | obtained by clients during `repo sync`. | 13 | obtained by clients during `repo sync`. |
14 | 14 | ||
15 | [TOC] | ||
16 | |||
15 | 17 | ||
16 | XML File Format | 18 | XML File Format |
17 | --------------- | 19 | --------------- |
18 | 20 | ||
19 | A manifest XML file (e.g. 'default.xml') roughly conforms to the | 21 | A manifest XML file (e.g. `default.xml`) roughly conforms to the |
20 | following DTD: | 22 | following DTD: |
21 | 23 | ||
22 | <!DOCTYPE manifest [ | 24 | ```xml |
23 | <!ELEMENT manifest (notice?, | 25 | <!DOCTYPE manifest [ |
24 | remote*, | 26 | <!ELEMENT manifest (notice?, |
25 | default?, | 27 | remote*, |
26 | manifest-server?, | 28 | default?, |
27 | remove-project*, | 29 | manifest-server?, |
28 | project*, | 30 | remove-project*, |
29 | extend-project*, | 31 | project*, |
30 | repo-hooks?, | 32 | extend-project*, |
31 | include*)> | 33 | repo-hooks?, |
32 | 34 | include*)> | |
33 | <!ELEMENT notice (#PCDATA)> | 35 | |
34 | 36 | <!ELEMENT notice (#PCDATA)> | |
35 | <!ELEMENT remote EMPTY> | 37 | |
36 | <!ATTLIST remote name ID #REQUIRED> | 38 | <!ELEMENT remote EMPTY> |
37 | <!ATTLIST remote alias CDATA #IMPLIED> | 39 | <!ATTLIST remote name ID #REQUIRED> |
38 | <!ATTLIST remote fetch CDATA #REQUIRED> | 40 | <!ATTLIST remote alias CDATA #IMPLIED> |
39 | <!ATTLIST remote pushurl CDATA #IMPLIED> | 41 | <!ATTLIST remote fetch CDATA #REQUIRED> |
40 | <!ATTLIST remote review CDATA #IMPLIED> | 42 | <!ATTLIST remote pushurl CDATA #IMPLIED> |
41 | <!ATTLIST remote revision CDATA #IMPLIED> | 43 | <!ATTLIST remote review CDATA #IMPLIED> |
42 | 44 | <!ATTLIST remote revision CDATA #IMPLIED> | |
43 | <!ELEMENT default EMPTY> | 45 | |
44 | <!ATTLIST default remote IDREF #IMPLIED> | 46 | <!ELEMENT default EMPTY> |
45 | <!ATTLIST default revision CDATA #IMPLIED> | 47 | <!ATTLIST default remote IDREF #IMPLIED> |
46 | <!ATTLIST default dest-branch CDATA #IMPLIED> | 48 | <!ATTLIST default revision CDATA #IMPLIED> |
47 | <!ATTLIST default upstream CDATA #IMPLIED> | 49 | <!ATTLIST default dest-branch CDATA #IMPLIED> |
48 | <!ATTLIST default sync-j CDATA #IMPLIED> | 50 | <!ATTLIST default upstream CDATA #IMPLIED> |
49 | <!ATTLIST default sync-c CDATA #IMPLIED> | 51 | <!ATTLIST default sync-j CDATA #IMPLIED> |
50 | <!ATTLIST default sync-s CDATA #IMPLIED> | 52 | <!ATTLIST default sync-c CDATA #IMPLIED> |
51 | <!ATTLIST default sync-tags CDATA #IMPLIED> | 53 | <!ATTLIST default sync-s CDATA #IMPLIED> |
52 | 54 | <!ATTLIST default sync-tags CDATA #IMPLIED> | |
53 | <!ELEMENT manifest-server EMPTY> | 55 | |
54 | <!ATTLIST manifest-server url CDATA #REQUIRED> | 56 | <!ELEMENT manifest-server EMPTY> |
55 | 57 | <!ATTLIST manifest-server url CDATA #REQUIRED> | |
56 | <!ELEMENT project (annotation*, | 58 | |
57 | project*, | 59 | <!ELEMENT project (annotation*, |
58 | copyfile*, | 60 | project*, |
59 | linkfile*)> | 61 | copyfile*, |
60 | <!ATTLIST project name CDATA #REQUIRED> | 62 | linkfile*)> |
61 | <!ATTLIST project path CDATA #IMPLIED> | 63 | <!ATTLIST project name CDATA #REQUIRED> |
62 | <!ATTLIST project remote IDREF #IMPLIED> | 64 | <!ATTLIST project path CDATA #IMPLIED> |
63 | <!ATTLIST project revision CDATA #IMPLIED> | 65 | <!ATTLIST project remote IDREF #IMPLIED> |
64 | <!ATTLIST project dest-branch CDATA #IMPLIED> | 66 | <!ATTLIST project revision CDATA #IMPLIED> |
65 | <!ATTLIST project groups CDATA #IMPLIED> | 67 | <!ATTLIST project dest-branch CDATA #IMPLIED> |
66 | <!ATTLIST project sync-c CDATA #IMPLIED> | 68 | <!ATTLIST project groups CDATA #IMPLIED> |
67 | <!ATTLIST project sync-s CDATA #IMPLIED> | 69 | <!ATTLIST project sync-c CDATA #IMPLIED> |
68 | <!ATTLIST default sync-tags CDATA #IMPLIED> | 70 | <!ATTLIST project sync-s CDATA #IMPLIED> |
69 | <!ATTLIST project upstream CDATA #IMPLIED> | 71 | <!ATTLIST default sync-tags CDATA #IMPLIED> |
70 | <!ATTLIST project clone-depth CDATA #IMPLIED> | 72 | <!ATTLIST project upstream CDATA #IMPLIED> |
71 | <!ATTLIST project force-path CDATA #IMPLIED> | 73 | <!ATTLIST project clone-depth CDATA #IMPLIED> |
72 | 74 | <!ATTLIST project force-path CDATA #IMPLIED> | |
73 | <!ELEMENT annotation EMPTY> | 75 | |
74 | <!ATTLIST annotation name CDATA #REQUIRED> | 76 | <!ELEMENT annotation EMPTY> |
75 | <!ATTLIST annotation value CDATA #REQUIRED> | 77 | <!ATTLIST annotation name CDATA #REQUIRED> |
76 | <!ATTLIST annotation keep CDATA "true"> | 78 | <!ATTLIST annotation value CDATA #REQUIRED> |
77 | 79 | <!ATTLIST annotation keep CDATA "true"> | |
78 | <!ELEMENT copyfile EMPTY> | 80 | |
79 | <!ATTLIST copyfile src CDATA #REQUIRED> | 81 | <!ELEMENT copyfile EMPTY> |
80 | <!ATTLIST copyfile dest CDATA #REQUIRED> | 82 | <!ATTLIST copyfile src CDATA #REQUIRED> |
81 | 83 | <!ATTLIST copyfile dest CDATA #REQUIRED> | |
82 | <!ELEMENT linkfile EMPTY> | 84 | |
83 | <!ATTLIST linkfile src CDATA #REQUIRED> | 85 | <!ELEMENT linkfile EMPTY> |
84 | <!ATTLIST linkfile dest CDATA #REQUIRED> | 86 | <!ATTLIST linkfile src CDATA #REQUIRED> |
85 | 87 | <!ATTLIST linkfile dest CDATA #REQUIRED> | |
86 | <!ELEMENT extend-project EMPTY> | 88 | |
87 | <!ATTLIST extend-project name CDATA #REQUIRED> | 89 | <!ELEMENT extend-project EMPTY> |
88 | <!ATTLIST extend-project path CDATA #IMPLIED> | 90 | <!ATTLIST extend-project name CDATA #REQUIRED> |
89 | <!ATTLIST extend-project groups CDATA #IMPLIED> | 91 | <!ATTLIST extend-project path CDATA #IMPLIED> |
90 | <!ATTLIST extend-project revision CDATA #IMPLIED> | 92 | <!ATTLIST extend-project groups CDATA #IMPLIED> |
91 | 93 | <!ATTLIST extend-project revision CDATA #IMPLIED> | |
92 | <!ELEMENT remove-project EMPTY> | 94 | |
93 | <!ATTLIST remove-project name CDATA #REQUIRED> | 95 | <!ELEMENT remove-project EMPTY> |
94 | 96 | <!ATTLIST remove-project name CDATA #REQUIRED> | |
95 | <!ELEMENT repo-hooks EMPTY> | 97 | |
96 | <!ATTLIST repo-hooks in-project CDATA #REQUIRED> | 98 | <!ELEMENT repo-hooks EMPTY> |
97 | <!ATTLIST repo-hooks enabled-list CDATA #REQUIRED> | 99 | <!ATTLIST repo-hooks in-project CDATA #REQUIRED> |
98 | 100 | <!ATTLIST repo-hooks enabled-list CDATA #REQUIRED> | |
99 | <!ELEMENT include EMPTY> | 101 | |
100 | <!ATTLIST include name CDATA #REQUIRED> | 102 | <!ELEMENT include EMPTY> |
101 | ]> | 103 | <!ATTLIST include name CDATA #REQUIRED> |
104 | ]> | ||
105 | ``` | ||
102 | 106 | ||
103 | A description of the elements and their attributes follows. | 107 | A description of the elements and their attributes follows. |
104 | 108 | ||
@@ -193,7 +197,7 @@ XML RPC service. | |||
193 | 197 | ||
194 | The manifest server should implement the following RPC methods: | 198 | The manifest server should implement the following RPC methods: |
195 | 199 | ||
196 | GetApprovedManifest(branch, target) | 200 | GetApprovedManifest(branch, target) |
197 | 201 | ||
198 | Return a manifest in which each project is pegged to a known good revision | 202 | Return a manifest in which each project is pegged to a known good revision |
199 | for the current branch and target. This is used by repo sync when the | 203 | for the current branch and target. This is used by repo sync when the |
@@ -206,7 +210,7 @@ If one of those variables or both are not present, the program will call | |||
206 | GetApprovedManifest without the target parameter and the manifest server | 210 | GetApprovedManifest without the target parameter and the manifest server |
207 | should choose a reasonable default target. | 211 | should choose a reasonable default target. |
208 | 212 | ||
209 | GetManifest(tag) | 213 | GetManifest(tag) |
210 | 214 | ||
211 | Return a manifest in which each project is pegged to the revision at | 215 | Return a manifest in which each project is pegged to the revision at |
212 | the specified tag. This is used by repo sync when the --smart-tag option | 216 | the specified tag. This is used by repo sync when the --smart-tag option |
@@ -227,7 +231,7 @@ Attribute `name`: A unique name for this project. The project's | |||
227 | name is appended onto its remote's fetch URL to generate the actual | 231 | name is appended onto its remote's fetch URL to generate the actual |
228 | URL to configure the Git remote with. The URL gets formed as: | 232 | URL to configure the Git remote with. The URL gets formed as: |
229 | 233 | ||
230 | ${remote_fetch}/${project_name}.git | 234 | ${remote_fetch}/${project_name}.git |
231 | 235 | ||
232 | where ${remote_fetch} is the remote's fetch attribute and | 236 | where ${remote_fetch} is the remote's fetch attribute and |
233 | ${project_name} is the project's name attribute. The suffix ".git" | 237 | ${project_name} is the project's name attribute. The suffix ".git" |
@@ -326,7 +330,7 @@ Element copyfile | |||
326 | 330 | ||
327 | Zero or more copyfile elements may be specified as children of a | 331 | Zero or more copyfile elements may be specified as children of a |
328 | project element. Each element describes a src-dest pair of files; | 332 | project element. Each element describes a src-dest pair of files; |
329 | the "src" file will be copied to the "dest" place during 'repo sync' | 333 | the "src" file will be copied to the "dest" place during `repo sync` |
330 | command. | 334 | command. |
331 | "src" is project relative, "dest" is relative to the top of the tree. | 335 | "src" is project relative, "dest" is relative to the top of the tree. |
332 | 336 | ||
@@ -366,18 +370,18 @@ files stored in `$TOP_DIR/.repo/local_manifests/*.xml`. | |||
366 | 370 | ||
367 | For example: | 371 | For example: |
368 | 372 | ||
369 | $ ls .repo/local_manifests | 373 | $ ls .repo/local_manifests |
370 | local_manifest.xml | 374 | local_manifest.xml |
371 | another_local_manifest.xml | 375 | another_local_manifest.xml |
372 | 376 | ||
373 | $ cat .repo/local_manifests/local_manifest.xml | 377 | $ cat .repo/local_manifests/local_manifest.xml |
374 | <?xml version="1.0" encoding="UTF-8"?> | 378 | <?xml version="1.0" encoding="UTF-8"?> |
375 | <manifest> | 379 | <manifest> |
376 | <project path="manifest" | 380 | <project path="manifest" |
377 | name="tools/manifest" /> | 381 | name="tools/manifest" /> |
378 | <project path="platform-manifest" | 382 | <project path="platform-manifest" |
379 | name="platform/manifest" /> | 383 | name="platform/manifest" /> |
380 | </manifest> | 384 | </manifest> |
381 | 385 | ||
382 | Users may add projects to the local manifest(s) prior to a `repo sync` | 386 | Users may add projects to the local manifest(s) prior to a `repo sync` |
383 | invocation, instructing repo to automatically download and manage | 387 | invocation, instructing repo to automatically download and manage |
diff --git a/docs/repo-hooks.md b/docs/repo-hooks.md index 76113cc9..e198b390 100644 --- a/docs/repo-hooks.md +++ b/docs/repo-hooks.md | |||
@@ -24,7 +24,7 @@ repohooks project is updated and a hook is triggered. | |||
24 | 24 | ||
25 | ## Manifest Settings | 25 | ## Manifest Settings |
26 | 26 | ||
27 | For the full syntax, see the [repo manifest format](./manifest-format.txt). | 27 | For the full syntax, see the [repo manifest format](./manifest-format.md). |
28 | 28 | ||
29 | Here's a short example from | 29 | Here's a short example from |
30 | [Android](https://android.googlesource.com/platform/manifest/+/master/default.xml). | 30 | [Android](https://android.googlesource.com/platform/manifest/+/master/default.xml). |
diff --git a/subcmds/manifest.py b/subcmds/manifest.py index 5ceeb12f..4a5228ba 100644 --- a/subcmds/manifest.py +++ b/subcmds/manifest.py | |||
@@ -39,7 +39,7 @@ in a Git repository for use during future 'repo init' invocations. | |||
39 | helptext = self._helpDescription + '\n' | 39 | helptext = self._helpDescription + '\n' |
40 | r = os.path.dirname(__file__) | 40 | r = os.path.dirname(__file__) |
41 | r = os.path.dirname(r) | 41 | r = os.path.dirname(r) |
42 | fd = open(os.path.join(r, 'docs', 'manifest-format.txt')) | 42 | fd = open(os.path.join(r, 'docs', 'manifest-format.md')) |
43 | for line in fd: | 43 | for line in fd: |
44 | helptext += line | 44 | helptext += line |
45 | fd.close() | 45 | fd.close() |