diff options
author | Shuchuan Zeng <zengshuchuan@allwinnertech.com> | 2023-04-18 10:36:50 +0800 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-05-05 03:40:28 +0000 |
commit | 3e3340d94f8a680156ceaa81faca1c3b8863c6ac (patch) | |
tree | 93bcf5c0d43e2a9fc2c4c88703abe3e185cbeec8 /docs/manifest-format.md | |
parent | edcaa94ca86d29c1ea106eddac837f4a699379ba (diff) | |
download | git-repo-3e3340d94f8a680156ceaa81faca1c3b8863c6ac.tar.gz |
manifest: add support for revision in include
Attribute groups can now be added to manifest include, thus
all projects in an included manifest file can easily modify
default branch without modifying all projects in that manifest file.
For example,
the main manifest.xml has an include node contain revision attribute,
```
<include name="include.xml" revision="r1" />
```
and the include.xml has some projects,
```
<project path="project1_path" name="project1_name" revision="r2" />
<project path="project2_path" name="project2_name" />
```
With this change, the final manifest will have revision="r1" for project2.
```
<project name="project1_name" path="project1_path" revision="r2" />
<project name="project2_name" path="project2_path" revision="r1" />
```
Test: added unit tests to cover the inheritance
Change-Id: I4b8547a7198610ec3a3c6aeb2136e0c0f3557df0
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/369714
Reviewed-by: Mike Frysinger <vapier@google.com>
Commit-Queue: Shuchuan Zeng <zengshuchuan@allwinnertech.com>
Tested-by: Shuchuan Zeng <zengshuchuan@allwinnertech.com>
Diffstat (limited to 'docs/manifest-format.md')
-rw-r--r-- | docs/manifest-format.md | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/manifest-format.md b/docs/manifest-format.md index bcdf5a8e..edcb28cb 100644 --- a/docs/manifest-format.md +++ b/docs/manifest-format.md | |||
@@ -125,8 +125,9 @@ following DTD: | |||
125 | <!ATTLIST contactinfo bugurl CDATA #REQUIRED> | 125 | <!ATTLIST contactinfo bugurl CDATA #REQUIRED> |
126 | 126 | ||
127 | <!ELEMENT include EMPTY> | 127 | <!ELEMENT include EMPTY> |
128 | <!ATTLIST include name CDATA #REQUIRED> | 128 | <!ATTLIST include name CDATA #REQUIRED> |
129 | <!ATTLIST include groups CDATA #IMPLIED> | 129 | <!ATTLIST include groups CDATA #IMPLIED> |
130 | <!ATTLIST include revision CDATA #IMPLIED> | ||
130 | ]> | 131 | ]> |
131 | ``` | 132 | ``` |
132 | 133 | ||
@@ -553,6 +554,9 @@ in the included manifest belong. This appends and recurses, meaning | |||
553 | all projects in included manifests carry all parent include groups. | 554 | all projects in included manifests carry all parent include groups. |
554 | Same syntax as the corresponding element of `project`. | 555 | Same syntax as the corresponding element of `project`. |
555 | 556 | ||
557 | Attribute `revision`: Name of a Git branch (e.g. `main` or `refs/heads/main`) | ||
558 | default to which all projects in the included manifest belong. | ||
559 | |||
556 | ## Local Manifests {#local-manifests} | 560 | ## Local Manifests {#local-manifests} |
557 | 561 | ||
558 | Additional remotes and projects may be added through local manifest | 562 | Additional remotes and projects may be added through local manifest |