[RFC PATCH 0/1] add parserelations management command

Rohit Sarkar rohitsarkar5398 at gmail.com
Sun Jun 7 13:37:43 AEST 2020

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
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
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.
Some more tests will be added if this patch looks good.

Rohit Sarkar (1):
  management: introduce parserelations command

 docs/deployment/management.rst                | 27 +++++++
 .../management/commands/parserelations.py     | 78 +++++++++++++++++++
 patchwork/tests/test_management.py            |  7 ++
 3 files changed, 112 insertions(+)
 create mode 100644 patchwork/management/commands/parserelations.py


More information about the Patchwork mailing list