[RFC PATCH 0/1] add parserelations management command

Lukas Bulwahn lukas.bulwahn at gmail.com
Wed Jun 10 16:23:32 AEST 2020


On Sun, Jun 7, 2020 at 5:38 AM Rohit Sarkar <rohitsarkar5398 at gmail.com> wrote:
>
> The parserelations command will be used to bulk import patch relations into
> Patchwork using a "patch groups" file.
> The patch groups file is structured such that each line contains a
> relation and an optional upstream commit reference.
> Eg patch groups file contents.
> 1 3 4
> 2
> 5 9 10 => <commit-hash-1> <commit-hash-2>
>
> In this case 2 relations will be ingested into Patchwork, (1,3,4) and
> (5,9,10). Further group (5,9,10) also points to two upstream commit
> references.
> Note that before ingesting the relations the existing relations in the
> DB are removed.
>
> Currently the commit references are not used, as in Patchwork's model a
> patch points to a single commit reference.

Somehow, it seems strange to have that dead data in the input file.
I think all data in the input file should either be processed or not
part of the input file.

Probably, in this case, it is best to just require that it is a list
of ids and that there is no  "=> upstream commit", as that is not
processed anyway.

Any file with "=>" can be preprocessed in the right format with sed
before passing it to this command.

When you later extend the script, you can add this feature of upstream
commit and then it takes more advanced input. It is still fully
backwards compatible, i.e., if it was consumed by the first version,
it is still consumed by the second extended version.

Daniel, any further thoughts on this script?

Lukas


More information about the Patchwork mailing list