[PATCH v4 0/1] add replacerelations management command
rohitsarkar5398 at gmail.com
Mon Jul 20 20:42:22 AEST 2020
The replacerelations 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
Eg patch groups file contents.
1 3 4
5 9 10
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.
- remove commit references from the patch groups file.
- Update documentation
- rename some variables to remove the overloading.
- use filter and update instead of get and save to reduce the db calls.
(Visible performance enhancement)
- add a unit test
- rename command from parserelations to replacerelations
- update documentation
- strip trailing whitespace
Rohit Sarkar (1):
management: introduce replacerelations command
docs/deployment/management.rst | 28 ++++++++
.../management/commands/replacerelations.py | 72 +++++++++++++++++++
patchwork/tests/__init__.py | 1 +
patchwork/tests/relations/patch-groups | 3 +
.../relations/patch-groups-missing-patch-ids | 4 ++
patchwork/tests/test_management.py | 27 ++++++-
6 files changed, 134 insertions(+), 1 deletion(-)
create mode 100644 patchwork/management/commands/replacerelations.py
create mode 100644 patchwork/tests/relations/patch-groups
create mode 100644 patchwork/tests/relations/patch-groups-missing-patch-ids
More information about the Patchwork