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
This commit is contained in:
Mike Frysinger 2018-10-05 19:26:15 -04:00
parent 2b42d288c0
commit 3891b7519d
4 changed files with 92 additions and 88 deletions

View File

@ -11,6 +11,6 @@ that you can put anywhere in your path.
* Source: https://code.google.com/p/git-repo/ * Source: https://code.google.com/p/git-repo/
* Overview: https://source.android.com/source/developing.html * Overview: https://source.android.com/source/developing.html
* Docs: https://source.android.com/source/using-repo.html * Docs: https://source.android.com/source/using-repo.html
* [repo Manifest Format](./docs/manifest-format.txt) * [repo Manifest Format](./docs/manifest-format.md)
* [repo Hooks](./docs/repo-hooks.md) * [repo Hooks](./docs/repo-hooks.md)
* [Submitting patches](./SUBMITTING_PATCHES.md) * [Submitting patches](./SUBMITTING_PATCHES.md)

View File

@ -6,99 +6,103 @@ the directories that are visible and where they should be obtained
from with git. from with git.
The basic structure of a manifest is a bare Git repository holding The basic structure of a manifest is a bare Git repository holding
a single 'default.xml' XML file in the top level directory. a single `default.xml` XML file in the top level directory.
Manifests are inherently version controlled, since they are kept Manifests are inherently version controlled, since they are kept
within a Git repository. Updates to manifests are automatically within a Git repository. Updates to manifests are automatically
obtained by clients during `repo sync`. obtained by clients during `repo sync`.
[TOC]
XML File Format XML File Format
--------------- ---------------
A manifest XML file (e.g. 'default.xml') roughly conforms to the A manifest XML file (e.g. `default.xml`) roughly conforms to the
following DTD: following DTD:
<!DOCTYPE manifest [ ```xml
<!ELEMENT manifest (notice?, <!DOCTYPE manifest [
remote*, <!ELEMENT manifest (notice?,
default?, remote*,
manifest-server?, default?,
remove-project*, manifest-server?,
project*, remove-project*,
extend-project*, project*,
repo-hooks?, extend-project*,
include*)> repo-hooks?,
include*)>
<!ELEMENT notice (#PCDATA)> <!ELEMENT notice (#PCDATA)>
<!ELEMENT remote EMPTY> <!ELEMENT remote EMPTY>
<!ATTLIST remote name ID #REQUIRED> <!ATTLIST remote name ID #REQUIRED>
<!ATTLIST remote alias CDATA #IMPLIED> <!ATTLIST remote alias CDATA #IMPLIED>
<!ATTLIST remote fetch CDATA #REQUIRED> <!ATTLIST remote fetch CDATA #REQUIRED>
<!ATTLIST remote pushurl CDATA #IMPLIED> <!ATTLIST remote pushurl CDATA #IMPLIED>
<!ATTLIST remote review CDATA #IMPLIED> <!ATTLIST remote review CDATA #IMPLIED>
<!ATTLIST remote revision CDATA #IMPLIED> <!ATTLIST remote revision CDATA #IMPLIED>
<!ELEMENT default EMPTY> <!ELEMENT default EMPTY>
<!ATTLIST default remote IDREF #IMPLIED> <!ATTLIST default remote IDREF #IMPLIED>
<!ATTLIST default revision CDATA #IMPLIED> <!ATTLIST default revision CDATA #IMPLIED>
<!ATTLIST default dest-branch CDATA #IMPLIED> <!ATTLIST default dest-branch CDATA #IMPLIED>
<!ATTLIST default upstream CDATA #IMPLIED> <!ATTLIST default upstream CDATA #IMPLIED>
<!ATTLIST default sync-j CDATA #IMPLIED> <!ATTLIST default sync-j CDATA #IMPLIED>
<!ATTLIST default sync-c CDATA #IMPLIED> <!ATTLIST default sync-c CDATA #IMPLIED>
<!ATTLIST default sync-s CDATA #IMPLIED> <!ATTLIST default sync-s CDATA #IMPLIED>
<!ATTLIST default sync-tags CDATA #IMPLIED> <!ATTLIST default sync-tags CDATA #IMPLIED>
<!ELEMENT manifest-server EMPTY> <!ELEMENT manifest-server EMPTY>
<!ATTLIST manifest-server url CDATA #REQUIRED> <!ATTLIST manifest-server url CDATA #REQUIRED>
<!ELEMENT project (annotation*, <!ELEMENT project (annotation*,
project*, project*,
copyfile*, copyfile*,
linkfile*)> linkfile*)>
<!ATTLIST project name CDATA #REQUIRED> <!ATTLIST project name CDATA #REQUIRED>
<!ATTLIST project path CDATA #IMPLIED> <!ATTLIST project path CDATA #IMPLIED>
<!ATTLIST project remote IDREF #IMPLIED> <!ATTLIST project remote IDREF #IMPLIED>
<!ATTLIST project revision CDATA #IMPLIED> <!ATTLIST project revision CDATA #IMPLIED>
<!ATTLIST project dest-branch CDATA #IMPLIED> <!ATTLIST project dest-branch CDATA #IMPLIED>
<!ATTLIST project groups CDATA #IMPLIED> <!ATTLIST project groups CDATA #IMPLIED>
<!ATTLIST project sync-c CDATA #IMPLIED> <!ATTLIST project sync-c CDATA #IMPLIED>
<!ATTLIST project sync-s CDATA #IMPLIED> <!ATTLIST project sync-s CDATA #IMPLIED>
<!ATTLIST default sync-tags CDATA #IMPLIED> <!ATTLIST default sync-tags CDATA #IMPLIED>
<!ATTLIST project upstream CDATA #IMPLIED> <!ATTLIST project upstream CDATA #IMPLIED>
<!ATTLIST project clone-depth CDATA #IMPLIED> <!ATTLIST project clone-depth CDATA #IMPLIED>
<!ATTLIST project force-path CDATA #IMPLIED> <!ATTLIST project force-path CDATA #IMPLIED>
<!ELEMENT annotation EMPTY> <!ELEMENT annotation EMPTY>
<!ATTLIST annotation name CDATA #REQUIRED> <!ATTLIST annotation name CDATA #REQUIRED>
<!ATTLIST annotation value CDATA #REQUIRED> <!ATTLIST annotation value CDATA #REQUIRED>
<!ATTLIST annotation keep CDATA "true"> <!ATTLIST annotation keep CDATA "true">
<!ELEMENT copyfile EMPTY> <!ELEMENT copyfile EMPTY>
<!ATTLIST copyfile src CDATA #REQUIRED> <!ATTLIST copyfile src CDATA #REQUIRED>
<!ATTLIST copyfile dest CDATA #REQUIRED> <!ATTLIST copyfile dest CDATA #REQUIRED>
<!ELEMENT linkfile EMPTY> <!ELEMENT linkfile EMPTY>
<!ATTLIST linkfile src CDATA #REQUIRED> <!ATTLIST linkfile src CDATA #REQUIRED>
<!ATTLIST linkfile dest CDATA #REQUIRED> <!ATTLIST linkfile dest CDATA #REQUIRED>
<!ELEMENT extend-project EMPTY> <!ELEMENT extend-project EMPTY>
<!ATTLIST extend-project name CDATA #REQUIRED> <!ATTLIST extend-project name CDATA #REQUIRED>
<!ATTLIST extend-project path CDATA #IMPLIED> <!ATTLIST extend-project path CDATA #IMPLIED>
<!ATTLIST extend-project groups CDATA #IMPLIED> <!ATTLIST extend-project groups CDATA #IMPLIED>
<!ATTLIST extend-project revision CDATA #IMPLIED> <!ATTLIST extend-project revision CDATA #IMPLIED>
<!ELEMENT remove-project EMPTY> <!ELEMENT remove-project EMPTY>
<!ATTLIST remove-project name CDATA #REQUIRED> <!ATTLIST remove-project name CDATA #REQUIRED>
<!ELEMENT repo-hooks EMPTY> <!ELEMENT repo-hooks EMPTY>
<!ATTLIST repo-hooks in-project CDATA #REQUIRED> <!ATTLIST repo-hooks in-project CDATA #REQUIRED>
<!ATTLIST repo-hooks enabled-list CDATA #REQUIRED> <!ATTLIST repo-hooks enabled-list CDATA #REQUIRED>
<!ELEMENT include EMPTY> <!ELEMENT include EMPTY>
<!ATTLIST include name CDATA #REQUIRED> <!ATTLIST include name CDATA #REQUIRED>
]> ]>
```
A description of the elements and their attributes follows. A description of the elements and their attributes follows.
@ -193,7 +197,7 @@ XML RPC service.
The manifest server should implement the following RPC methods: The manifest server should implement the following RPC methods:
GetApprovedManifest(branch, target) GetApprovedManifest(branch, target)
Return a manifest in which each project is pegged to a known good revision Return a manifest in which each project is pegged to a known good revision
for the current branch and target. This is used by repo sync when the 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
GetApprovedManifest without the target parameter and the manifest server GetApprovedManifest without the target parameter and the manifest server
should choose a reasonable default target. should choose a reasonable default target.
GetManifest(tag) GetManifest(tag)
Return a manifest in which each project is pegged to the revision at Return a manifest in which each project is pegged to the revision at
the specified tag. This is used by repo sync when the --smart-tag option 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
name is appended onto its remote's fetch URL to generate the actual name is appended onto its remote's fetch URL to generate the actual
URL to configure the Git remote with. The URL gets formed as: URL to configure the Git remote with. The URL gets formed as:
${remote_fetch}/${project_name}.git ${remote_fetch}/${project_name}.git
where ${remote_fetch} is the remote's fetch attribute and where ${remote_fetch} is the remote's fetch attribute and
${project_name} is the project's name attribute. The suffix ".git" ${project_name} is the project's name attribute. The suffix ".git"
@ -326,7 +330,7 @@ Element copyfile
Zero or more copyfile elements may be specified as children of a Zero or more copyfile elements may be specified as children of a
project element. Each element describes a src-dest pair of files; project element. Each element describes a src-dest pair of files;
the "src" file will be copied to the "dest" place during 'repo sync' the "src" file will be copied to the "dest" place during `repo sync`
command. command.
"src" is project relative, "dest" is relative to the top of the tree. "src" is project relative, "dest" is relative to the top of the tree.
@ -366,18 +370,18 @@ files stored in `$TOP_DIR/.repo/local_manifests/*.xml`.
For example: For example:
$ ls .repo/local_manifests $ ls .repo/local_manifests
local_manifest.xml local_manifest.xml
another_local_manifest.xml another_local_manifest.xml
$ cat .repo/local_manifests/local_manifest.xml $ cat .repo/local_manifests/local_manifest.xml
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<manifest> <manifest>
<project path="manifest" <project path="manifest"
name="tools/manifest" /> name="tools/manifest" />
<project path="platform-manifest" <project path="platform-manifest"
name="platform/manifest" /> name="platform/manifest" />
</manifest> </manifest>
Users may add projects to the local manifest(s) prior to a `repo sync` Users may add projects to the local manifest(s) prior to a `repo sync`
invocation, instructing repo to automatically download and manage invocation, instructing repo to automatically download and manage

View File

@ -24,7 +24,7 @@ repohooks project is updated and a hook is triggered.
## Manifest Settings ## Manifest Settings
For the full syntax, see the [repo manifest format](./manifest-format.txt). For the full syntax, see the [repo manifest format](./manifest-format.md).
Here's a short example from Here's a short example from
[Android](https://android.googlesource.com/platform/manifest/+/master/default.xml). [Android](https://android.googlesource.com/platform/manifest/+/master/default.xml).

View File

@ -39,7 +39,7 @@ in a Git repository for use during future 'repo init' invocations.
helptext = self._helpDescription + '\n' helptext = self._helpDescription + '\n'
r = os.path.dirname(__file__) r = os.path.dirname(__file__)
r = os.path.dirname(r) r = os.path.dirname(r)
fd = open(os.path.join(r, 'docs', 'manifest-format.txt')) fd = open(os.path.join(r, 'docs', 'manifest-format.md'))
for line in fd: for line in fd:
helptext += line helptext += line
fd.close() fd.close()