diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/manifest-format.txt (renamed from docs/manifest_xml.txt) | 59 | ||||
-rw-r--r-- | docs/manifest_submodule.txt | 136 |
2 files changed, 56 insertions, 139 deletions
diff --git a/docs/manifest_xml.txt b/docs/manifest-format.txt index 37fbd5cd..38868f10 100644 --- a/docs/manifest_xml.txt +++ b/docs/manifest-format.txt | |||
@@ -25,30 +25,48 @@ following DTD: | |||
25 | default?, | 25 | default?, |
26 | manifest-server?, | 26 | manifest-server?, |
27 | remove-project*, | 27 | remove-project*, |
28 | project*)> | 28 | project*, |
29 | repo-hooks?)> | ||
29 | 30 | ||
30 | <!ELEMENT notice (#PCDATA)> | 31 | <!ELEMENT notice (#PCDATA)> |
31 | 32 | ||
32 | <!ELEMENT remote (EMPTY)> | 33 | <!ELEMENT remote (EMPTY)> |
33 | <!ATTLIST remote name ID #REQUIRED> | 34 | <!ATTLIST remote name ID #REQUIRED> |
35 | <!ATTLIST remote alias CDATA #IMPLIED> | ||
34 | <!ATTLIST remote fetch CDATA #REQUIRED> | 36 | <!ATTLIST remote fetch CDATA #REQUIRED> |
35 | <!ATTLIST remote review CDATA #IMPLIED> | 37 | <!ATTLIST remote review CDATA #IMPLIED> |
36 | 38 | ||
37 | <!ELEMENT default (EMPTY)> | 39 | <!ELEMENT default (EMPTY)> |
38 | <!ATTLIST default remote IDREF #IMPLIED> | 40 | <!ATTLIST default remote IDREF #IMPLIED> |
39 | <!ATTLIST default revision CDATA #IMPLIED> | 41 | <!ATTLIST default revision CDATA #IMPLIED> |
40 | 42 | <!ATTLIST default sync-j CDATA #IMPLIED> | |
43 | <!ATTLIST default sync-c CDATA #IMPLIED> | ||
44 | |||
41 | <!ELEMENT manifest-server (EMPTY)> | 45 | <!ELEMENT manifest-server (EMPTY)> |
42 | <!ATTLIST url CDATA #REQUIRED> | 46 | <!ATTLIST url CDATA #REQUIRED> |
43 | 47 | ||
44 | <!ELEMENT project (EMPTY)> | 48 | <!ELEMENT project (annotation?)> |
45 | <!ATTLIST project name CDATA #REQUIRED> | 49 | <!ATTLIST project name CDATA #REQUIRED> |
46 | <!ATTLIST project path CDATA #IMPLIED> | 50 | <!ATTLIST project path CDATA #IMPLIED> |
47 | <!ATTLIST project remote IDREF #IMPLIED> | 51 | <!ATTLIST project remote IDREF #IMPLIED> |
48 | <!ATTLIST project revision CDATA #IMPLIED> | 52 | <!ATTLIST project revision CDATA #IMPLIED> |
53 | <!ATTLIST project groups CDATA #IMPLIED> | ||
54 | <!ATTLIST project sync-c CDATA #IMPLIED> | ||
55 | |||
56 | <!ELEMENT annotation (EMPTY)> | ||
57 | <!ATTLIST annotation name CDATA #REQUIRED> | ||
58 | <!ATTLIST annotation value CDATA #REQUIRED> | ||
59 | <!ATTLIST annotation keep CDATA "true"> | ||
49 | 60 | ||
50 | <!ELEMENT remove-project (EMPTY)> | 61 | <!ELEMENT remove-project (EMPTY)> |
51 | <!ATTLIST remove-project name CDATA #REQUIRED> | 62 | <!ATTLIST remove-project name CDATA #REQUIRED> |
63 | |||
64 | <!ELEMENT repo-hooks (EMPTY)> | ||
65 | <!ATTLIST repo-hooks in-project CDATA #REQUIRED> | ||
66 | <!ATTLIST repo-hooks enabled-list CDATA #REQUIRED> | ||
67 | |||
68 | <!ELEMENT include (EMPTY)> | ||
69 | <!ATTLIST include name CDATA #REQUIRED> | ||
52 | ]> | 70 | ]> |
53 | 71 | ||
54 | A description of the elements and their attributes follows. | 72 | A description of the elements and their attributes follows. |
@@ -72,6 +90,12 @@ name specified here is used as the remote name in each project's | |||
72 | .git/config, and is therefore automatically available to commands | 90 | .git/config, and is therefore automatically available to commands |
73 | like `git fetch`, `git remote`, `git pull` and `git push`. | 91 | like `git fetch`, `git remote`, `git pull` and `git push`. |
74 | 92 | ||
93 | Attribute `alias`: The alias, if specified, is used to override | ||
94 | `name` to be set as the remote name in each project's .git/config. | ||
95 | Its value can be duplicated while attribute `name` has to be unique | ||
96 | in the manifest file. This helps each project to be able to have | ||
97 | same remote name which actually points to different remote url. | ||
98 | |||
75 | Attribute `fetch`: The Git URL prefix for all projects which use | 99 | Attribute `fetch`: The Git URL prefix for all projects which use |
76 | this remote. Each project's name is appended to this prefix to | 100 | this remote. Each project's name is appended to this prefix to |
77 | form the actual URL used to clone the project. | 101 | form the actual URL used to clone the project. |
@@ -152,6 +176,25 @@ Tags and/or explicit SHA-1s should work in theory, but have not | |||
152 | been extensively tested. If not supplied the revision given by | 176 | been extensively tested. If not supplied the revision given by |
153 | the default element is used. | 177 | the default element is used. |
154 | 178 | ||
179 | Attribute `groups`: List of groups to which this project belongs, | ||
180 | whitespace or comma separated. All projects belong to the group | ||
181 | "default", and each project automatically belongs to a group of | ||
182 | it's name:`name` and path:`path`. E.g. for | ||
183 | <project name="monkeys" path="barrel-of"/>, that project | ||
184 | definition is implicitly in the following manifest groups: | ||
185 | default, name:monkeys, and path:barrel-of. | ||
186 | |||
187 | Element annotation | ||
188 | ------------------ | ||
189 | |||
190 | Zero or more annotation elements may be specified as children of a | ||
191 | project element. Each element describes a name-value pair that will be | ||
192 | exported into each project's environment during a 'forall' command, | ||
193 | prefixed with REPO__. In addition, there is an optional attribute | ||
194 | "keep" which accepts the case insensitive values "true" (default) or | ||
195 | "false". This attribute determines whether or not the annotation will | ||
196 | be kept when exported with the manifest subcommand. | ||
197 | |||
155 | Element remove-project | 198 | Element remove-project |
156 | ---------------------- | 199 | ---------------------- |
157 | 200 | ||
@@ -163,6 +206,16 @@ This element is mostly useful in the local_manifest.xml, where | |||
163 | the user can remove a project, and possibly replace it with their | 206 | the user can remove a project, and possibly replace it with their |
164 | own definition. | 207 | own definition. |
165 | 208 | ||
209 | Element include | ||
210 | --------------- | ||
211 | |||
212 | This element provides the capability of including another manifest | ||
213 | file into the originating manifest. Normal rules apply for the | ||
214 | target manifest to include- it must be a usable manifest on it's own. | ||
215 | |||
216 | Attribute `name`; the manifest to include, specified relative to | ||
217 | the manifest repositories root. | ||
218 | |||
166 | 219 | ||
167 | Local Manifest | 220 | Local Manifest |
168 | ============== | 221 | ============== |
diff --git a/docs/manifest_submodule.txt b/docs/manifest_submodule.txt deleted file mode 100644 index 1718284b..00000000 --- a/docs/manifest_submodule.txt +++ /dev/null | |||
@@ -1,136 +0,0 @@ | |||
1 | repo Manifest Format (submodule) | ||
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 'gitmodules' file in the top level directory, and one or more | ||
10 | gitlink references pointing at commits from the referenced projects. | ||
11 | This is the same structure as used by 'git submodule'. | ||
12 | |||
13 | Manifests are inherently version controlled, since they are kept | ||
14 | within a Git repository. Updates to manifests are automatically | ||
15 | obtained by clients during `repo sync`. | ||
16 | |||
17 | .gitmodules | ||
18 | =========== | ||
19 | |||
20 | The '.gitmodules' file, located in the top-level directory of the | ||
21 | client's working tree (or manifest repository), is a text file with | ||
22 | a syntax matching the requirements of 'git config'. | ||
23 | |||
24 | This file contains one subsection per project (also called a | ||
25 | submodule by git), and the subsection value is a unique name to | ||
26 | describe the project. Each submodule section must contain the | ||
27 | following required keys: | ||
28 | |||
29 | * path | ||
30 | * url | ||
31 | |||
32 | submodule.<name>.path | ||
33 | --------------------- | ||
34 | |||
35 | Defines the path, relative to the top-level directory of the client's | ||
36 | working tree, where the project is expected to be checked out. The | ||
37 | path name must not end with a '/'. All paths must be unique within | ||
38 | the .gitmodules file. | ||
39 | |||
40 | At the specified path within the manifest repository a gitlink | ||
41 | tree entry (an entry with file mode 160000) must exist referencing | ||
42 | a commit SHA-1 from the project. This tree entry specifies the | ||
43 | exact version of the project that `repo sync` will synchronize the | ||
44 | client's working tree to. | ||
45 | |||
46 | submodule.<name>.url | ||
47 | -------------------- | ||
48 | |||
49 | Defines a URL from where the project repository can be cloned. | ||
50 | By default `repo sync` will clone from this URL whenever a user | ||
51 | needs to access this project. | ||
52 | |||
53 | submodule.<name>.revision | ||
54 | ------------------------- | ||
55 | |||
56 | Name of the branch in the project repository that Gerrit Code Review | ||
57 | should automatically refresh the project's gitlink entry from. | ||
58 | |||
59 | If set, during submit of a change within the referenced project, | ||
60 | Gerrit Code Review will automatically update the manifest | ||
61 | repository's corresponding gitlink to the new commit SHA-1 of | ||
62 | this branch. | ||
63 | |||
64 | Valid values are a short branch name (e.g. 'master'), a full ref | ||
65 | name (e.g. 'refs/heads/master'), or '.' to request using the same | ||
66 | branch name as the manifest branch itself. Since '.' automatically | ||
67 | uses the manifest branch, '.' is the recommended value. | ||
68 | |||
69 | If this key is not set, Gerrit Code Review will NOT automatically | ||
70 | update the gitlink. An unset key requires the manifest maintainer | ||
71 | to manually update the gitlink when it is necessary to reference | ||
72 | a different revision of the project. | ||
73 | |||
74 | submodule.<name>.update | ||
75 | ----------------------- | ||
76 | |||
77 | This key is not supported by repo. If set, it will be ignored. | ||
78 | |||
79 | repo.notice | ||
80 | ----------- | ||
81 | |||
82 | A message displayed when repo sync uses this manifest. | ||
83 | |||
84 | |||
85 | .review | ||
86 | ======= | ||
87 | |||
88 | The optional '.review' file, located in the top-level directory of | ||
89 | the client's working tree (or manifest repository), is a text file | ||
90 | with a syntax matching the requirements of 'git config'. | ||
91 | |||
92 | This file describes how `repo upload` should interact with the | ||
93 | project's preferred code review system. | ||
94 | |||
95 | review.url | ||
96 | ---------- | ||
97 | |||
98 | URL of the default Gerrit Code Review server. If a project does | ||
99 | not have a specific URL in the '.review' file, this default URL | ||
100 | will be used instead. | ||
101 | |||
102 | review.<name>.url | ||
103 | ----------------- | ||
104 | |||
105 | Project specific URL of the Gerrit Code Review server, for the | ||
106 | submodule whose project name is <name>. | ||
107 | |||
108 | Example | ||
109 | ======= | ||
110 | |||
111 | $ cat .gitmodules | ||
112 | [submodule "app/Clock"] | ||
113 | path = clock | ||
114 | url = git://vcs.example.com/ClockWidget.git | ||
115 | revision = . | ||
116 | [submodule "app/Browser"] | ||
117 | path = net/browser | ||
118 | url = git://netgroup.example.com/network/web/Browser.git | ||
119 | revision = . | ||
120 | |||
121 | $ cat .review | ||
122 | [review] | ||
123 | url = vcs-gerrit.example.com | ||
124 | [review "app/Browser"] | ||
125 | url = netgroup.example.com | ||
126 | |||
127 | In the above example, the app/Clock project will send its code | ||
128 | reviews to the default server, vcs-gerrit.example.com, while | ||
129 | app/Browser will send its code reviews to netgroup.example.com. | ||
130 | |||
131 | See Also | ||
132 | ======== | ||
133 | |||
134 | * http://www.kernel.org/pub/software/scm/git/docs/gitmodules.html | ||
135 | * http://www.kernel.org/pub/software/scm/git/docs/git-config.html | ||
136 | * http://code.google.com/p/gerrit/ | ||