diff options
author | Andy Doan <andy.doan@linaro.org> | 2016-06-30 13:21:06 -0500 |
---|---|---|
committer | Andy Doan <andy.doan@linaro.org> | 2016-07-01 09:38:12 -0500 |
commit | e39489cd8c7e02dc7d337b435928ccd8f48ab984 (patch) | |
tree | 963991a51c2033a3faa43a624fd510304026b963 /import_emails.py | |
parent | 202760573480b28ce333eac7c80ef65fac4aa81e (diff) |
linaro_metrics: update queries to match new CoverLetter support
Patchwork recently broke up the "Patch" object to support cover-letters.
The Patch object now extends a Submission. Under the covers this is done
via two DB tables patchwork_submission and patchwork_patch with a
patchwork_patch having a "submission_ptr_id" column.
This causes our queries to have to join across 3 tables. I couldn't
really see a good way to do this through the Django ORM and furthermore
found a more efficient way to handle things via a single SQL query.
We *actually* have unit test code in place that checks that both of
these functions work and they *still* pass! (i was shocked).
Additionally, the "diff" of a patch is now in the "diff" attribute and
not the "content" attribute, so import_email and patch_matcher needed
small updates (again caught by *tests*).
Additionally, the test_members_show test no longer works under sqlite
due to the complexity of the queries. It now gets skipped when detected.
Change-Id: Iaf2009d38be4d67c98afb2fba17eb6c5446e516a
Diffstat (limited to 'import_emails.py')
-rwxr-xr-x | import_emails.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/import_emails.py b/import_emails.py index 7039e7f..7c6af77 100755 --- a/import_emails.py +++ b/import_emails.py @@ -21,7 +21,7 @@ log = logging.getLogger('import_emails') def find_old_revisions(patch): log.debug('looking for old versions of patch %d', patch.id) it = patch_matcher.get_patches_matching( - patch.project, [patch.submitter], patch.name, patch.content) + patch.project, [patch.submitter], patch.name, patch.diff) for p in it: # skip ourself if p.id != patch.id: |