diff options
| author | Fredrik de Groot <fredrik.de.groot@haleytek.com> | 2024-09-09 15:54:57 +0200 |
|---|---|---|
| committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2024-10-28 16:55:10 +0000 |
| commit | 303bd963d57936873f62c7b61a885911afc46788 (patch) | |
| tree | 6970ea441a7873ca08fd5af366a0bd0ba6b7a5ca /docs | |
| parent | ae384f8623aeb36809541a5e07900a77a0960d5f (diff) | |
| download | git-repo-303bd963d57936873f62c7b61a885911afc46788.tar.gz | |
manifest: add optional base check on remove and extend
This adds an optional, built-in checker for
guarding against patches hanging on wrong
base revisions, which is useful if a lower layer of
the manifest changes after a patch was done.
When adding a patch with a new revision using
extend-project or remove-project/project:
C---D---E patches in project bla
/
A---B project bla in manifest state 1
<extend-project name="bla" revision="E" base-rev="B">
If project bla gets updated, in a new snap ID
or by a supplier or similar, to a new state:
C---D---E patches in project bla
/
A---B---F---G project bla in manifest state 2
Parsing will fail because revision of bla is now G,
giving the choice to create a new patch branch
from G and updating base-rev, or keeping previous
branch for some reason and only updating base-rev.
Intended for use in a layered manifest with
hashed revisions. Named refs like branches and tags
also work fine when comparing, but will be misleading
if a branch is used as base-rev.
Change-Id: Ic6211550a7d3cc9656057f6a2087c505b40cad2b
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/436777
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Tested-by: Fredrik de Groot <fredrik.de.groot@haleytek.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/manifest-format.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/manifest-format.md b/docs/manifest-format.md index 36dae6de..cfb80164 100644 --- a/docs/manifest-format.md +++ b/docs/manifest-format.md | |||
| @@ -107,11 +107,13 @@ following DTD: | |||
| 107 | <!ATTLIST extend-project remote CDATA #IMPLIED> | 107 | <!ATTLIST extend-project remote CDATA #IMPLIED> |
| 108 | <!ATTLIST extend-project dest-branch CDATA #IMPLIED> | 108 | <!ATTLIST extend-project dest-branch CDATA #IMPLIED> |
| 109 | <!ATTLIST extend-project upstream CDATA #IMPLIED> | 109 | <!ATTLIST extend-project upstream CDATA #IMPLIED> |
| 110 | <!ATTLIST extend-project base-rev CDATA #IMPLIED> | ||
| 110 | 111 | ||
| 111 | <!ELEMENT remove-project EMPTY> | 112 | <!ELEMENT remove-project EMPTY> |
| 112 | <!ATTLIST remove-project name CDATA #IMPLIED> | 113 | <!ATTLIST remove-project name CDATA #IMPLIED> |
| 113 | <!ATTLIST remove-project path CDATA #IMPLIED> | 114 | <!ATTLIST remove-project path CDATA #IMPLIED> |
| 114 | <!ATTLIST remove-project optional CDATA #IMPLIED> | 115 | <!ATTLIST remove-project optional CDATA #IMPLIED> |
| 116 | <!ATTLIST remove-project base-rev CDATA #IMPLIED> | ||
| 115 | 117 | ||
| 116 | <!ELEMENT repo-hooks EMPTY> | 118 | <!ELEMENT repo-hooks EMPTY> |
| 117 | <!ATTLIST repo-hooks in-project CDATA #REQUIRED> | 119 | <!ATTLIST repo-hooks in-project CDATA #REQUIRED> |
| @@ -433,6 +435,14 @@ project. Same syntax as the corresponding element of `project`. | |||
| 433 | Attribute `upstream`: If specified, overrides the upstream of the original | 435 | Attribute `upstream`: If specified, overrides the upstream of the original |
| 434 | project. Same syntax as the corresponding element of `project`. | 436 | project. Same syntax as the corresponding element of `project`. |
| 435 | 437 | ||
| 438 | Attribute `base-rev`: If specified, adds a check against the revision | ||
| 439 | to be extended. Manifest parse will fail and give a list of mismatch extends | ||
| 440 | if the revisions being extended have changed since base-rev was set. | ||
| 441 | Intended for use with layered manifests using hash revisions to prevent | ||
| 442 | patch branches hiding newer upstream revisions. Also compares named refs | ||
| 443 | like branches or tags but is misleading if branches are used as base-rev. | ||
| 444 | Same syntax as the corresponding element of `project`. | ||
| 445 | |||
| 436 | ### Element annotation | 446 | ### Element annotation |
| 437 | 447 | ||
| 438 | Zero or more annotation elements may be specified as children of a | 448 | Zero or more annotation elements may be specified as children of a |
| @@ -496,6 +506,14 @@ name. Logic otherwise behaves like both are specified. | |||
| 496 | Attribute `optional`: Set to true to ignore remove-project elements with no | 506 | Attribute `optional`: Set to true to ignore remove-project elements with no |
| 497 | matching `project` element. | 507 | matching `project` element. |
| 498 | 508 | ||
| 509 | Attribute `base-rev`: If specified, adds a check against the revision | ||
| 510 | to be removed. Manifest parse will fail and give a list of mismatch removes | ||
| 511 | if the revisions being removed have changed since base-rev was set. | ||
| 512 | Intended for use with layered manifests using hash revisions to prevent | ||
| 513 | patch branches hiding newer upstream revisions. Also compares named refs | ||
| 514 | like branches or tags but is misleading if branches are used as base-rev. | ||
| 515 | Same syntax as the corresponding element of `project`. | ||
| 516 | |||
| 499 | ### Element repo-hooks | 517 | ### Element repo-hooks |
| 500 | 518 | ||
| 501 | NB: See the [practical documentation](./repo-hooks.md) for using repo hooks. | 519 | NB: See the [practical documentation](./repo-hooks.md) for using repo hooks. |
