Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support dependency relations between patch series #583

Open
loudonlune opened this issue Feb 20, 2024 · 3 comments
Open

Support dependency relations between patch series #583

loudonlune opened this issue Feb 20, 2024 · 3 comments

Comments

@loudonlune
Copy link

loudonlune commented Feb 20, 2024

The DPDK project has defined syntax for a "Depends-on" tag. A contributor can add this label to their patch or cover letter if it depends on another patch or series that has not yet been applied to the target branch.

The syntax for this tag and where it appears in a patch file is as follows:

... MIME headers and such go here ...

Some commit message

Signed-off-by: someone
---
Depends-on: patch-##### ("title of patch")
Depends-on: series-##### ("title of series")

... git diff summary goes here ...

---
... diff goes here ...

These tags may also appear in a cover letter for a series.

There can be multiple of these tags defined with differing values. An implementation is intended to collect them into a list. When applying a patch which has these tags, they should be applied in the order listed in the patch file. This process is not recursive, as in if the dependents of a patch have additional dependents, those are not applied.

All dependencies are translated to inter-series dependencies. As in, if a patch a in series A references a patch b in series B, then we can infer that series A depends on series B. Same thing if a patch a depends on series B.

The ask is for, when running git pw patch apply or git pw series apply , the command will scan for these dependent patches or series and apply them automatically as described above.

Related: getpatchwork/git-pw#71

@pevik
Copy link
Contributor

pevik commented Jun 7, 2024

Wouldn't it be possible to at least support b4 change-id: (or gerritchange-id:) feature?

@pevik
Copy link
Contributor

pevik commented Jun 7, 2024

Using this view to perform actions on all patches at once would be a big win.

The top checkbox in the list of all patches or in the list of patches of the series helps to apply the change to all patches.

@loudonlune
Copy link
Author

Wouldn't it be possible to at least support b4 change-id: (or gerritchange-id:) feature?

This could be possible. Supporting this will require some additional parsing -- we will need to look for the Change-Id entry in the content of the cover letter or in the first patch of the series, and add a new field to the Series object to store that information.

When the change ID is referenced by a patch/cover letter to signal that it has a dependency, do you think this should be done via the Depends-on entry? This would give the patch author a total of three options, to give the series/patch ID, URL, or the change-id of the series as a value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants