[PATCH v2 5/6] models: Add callbacks for events

2017-01-30 Thread Stephen Finucane
When models are modified, fire signal handlers to create the relevant events. Signed-off-by: Stephen Finucane --- Changes since v1: - Rework to support additional event types Changes since RFC: - Make use of database-provided foreign keys rather than reimplementing them

[PATCH 1/6] views: Use consistent 'list'/'detail' names

2017-01-30 Thread Stephen Finucane
The 'setbundles' view is also removed as it's not called by anything/anyone. Signed-off-by: Stephen Finucane --- patchwork/urls.py | 28 +- patchwork/views/bundle.py | 72 -- patchwork/views/cover.py | 2

[PATCH 4/6] views: Add 'series' parameter to '/mbox' endpoint

2017-01-30 Thread Stephen Finucane
This allows a user to download dependencies for a patch without having to do it manually. Signed-off-by: Stephen Finucane --- patchwork/views/__init__.py | 50 + patchwork/views/patch.py| 27 2 files

[PATCH v2 1/6] models: Move signal to 'signals'

2017-01-30 Thread Stephen Finucane
Additional signals are going to be added shortly and they shouldn't pollute 'models.py'. Signed-off-by: Stephen Finucane --- patchwork/__init__.py | 20 patchwork/apps.py | 29 patchwork/models.py | 41

[PATCH v2 4/6] docs: Add events to usage guide

2017-01-30 Thread Stephen Finucane
Signed-off-by: Stephen Finucane --- docs/usage/overview.md | 115 + 1 file changed, 115 insertions(+) diff --git a/docs/usage/overview.md b/docs/usage/overview.md index af72092..6be673b 100644 --- a/docs/usage/overview.md +++

[PATCH v2 2/6] models: Add 'Event' model

2017-01-30 Thread Stephen Finucane
Events record Patch-related things like initial creation, state transitions, delegation assigning etc. Signed-off-by: Stephen Finucane --- v2: - Add new events - series-created - cover-created These require additional fields on the model - Rename some events to present a

[PATCH 2/4] bin: Run scripts through shellcheck

2017-01-30 Thread Stephen Finucane
This mostly results in the addition of quotes to prevent globbing. Signed-off-by: Stephen Finucane --- patchwork/bin/parsemail-batch.sh | 17 +++-- patchwork/bin/parsemail.sh | 12 ++-- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git

[PATCH 1/4] tools: Run scripts through shellcheck

2017-01-30 Thread Stephen Finucane
This mostly results in the addition of quotes to prevent globbing. Signed-off-by: Stephen Finucane --- tools/patchwork-update-commits | 8 tools/post-receive.hook| 22 +++--- tools/vagrant/install.sh | 2 -- 3 files changed, 15

[PATCH 2/6] views: Make 'patch_to_mbox' return a string

2017-01-30 Thread Stephen Finucane
The 'patch_to_mbox' function returns an object which is coverted to a string in all places where this call occurs. The string conversion differs between Python 2 and 3 and while one it has been updated in one place, it was missed in two others. Resole these issues and ensure they don't happen