[PATCH 00/15] Series models & parsing (v2)

Damien Lespiau damien.lespiau at intel.com
Fri Oct 9 21:39:47 AEDT 2015


This is the second iteration on the models and mail parsing the series aware
patchwork.

Since the first iteration, the main big addition is some handling of new
versions of patches and series after the initial submission and review
comments. All revisions of the same series are aggregated into the same top
level "Series" object. More details in the actual commit messages.

It's also a good time to start documenting what patchwork understands. If you
are reading this and your project uses a wildly different way to send v2/v3/..
patches after review, please do speak up.

  http://patchwork.readthedocs.org/en/freedesktop.org/manual.html

I'm fixed a number of bugs compared to the initial submission, tightened a bit
the schema constraints as well to catch errors early. Note that the code
actually parses a larger number of cases that the ones discussed in the
documentation page above.

I'm fully expecting this doesn't handle some cases we'd like to support, but
works on a reasonable amount of mails I use for testing (~10,000 mails from the
intel-gfx mailing-list). I also know some cases that aren't supported and that
I don't intend to support unless there is some demand. For instance, resending
a full v2 series as a reply of the v1 cover letter doesn't work and, while I
have seen that occurence happen on intel-gfx, it's usually new contributors
that don't quite know how we'd like v2 of series to be sent (because it's not
really well clear/documented).

-- 
Damien

Damien Lespiau (15):
  parsemail: Return the list of prefixes when cleaning up the subject
  parsemail: Make find_content() return a MailContent object
  parsemail: Add a function to parse series markers eg. "1/12"
  parsemail: Extract building the list of mail references
  tests: Make sure all emails have a valid msgid
  series: Add a Series model
  series: Provide the migration step to add series
  series: Create Series objects when parsing mails
  series: Add unit tests for Series parsing
  tests: Save the test project if we're going to use it
  tests: Add a utility class to create Series
  series: Parse new versions of patches sent as replies to a Series
  series: Add a signal to notify when a revision is complete
  series: New series with similar titles as previous ones are new
    revisions
  docs: Add a user-oriented explanation of series parsing

 docs/index.rst                                     |   1 +
 docs/manual.rst                                    | 143 ++++++
 patchwork/bin/parsemail.py                         | 332 +++++++++++--
 patchwork/migrations/0003_series.py                |  73 +++
 patchwork/models.py                                | 119 +++++
 patchwork/tests/mail/series/0001-single-mail.mbox  |  75 +++
 .../series/0010-multiple-mails-cover-letter.mbox   |  57 +++
 .../series/0011-multiple-mails-cover-letter.mbox   |  64 +++
 .../series/0012-multiple-mails-cover-letter.mbox   | 348 ++++++++++++++
 .../series/0013-multiple-mails-cover-letter.mbox   |  63 +++
 .../series/0014-multiple-mails-cover-letter.mbox   | 232 +++++++++
 .../0020-multiple-mails-no-cover-letter.mbox       | 103 ++++
 .../0021-multiple-mails-no-cover-letter.mbox       | 104 ++++
 .../0022-multiple-mails-no-cover-letter.mbox       |  95 ++++
 .../tests/mail/series/0030-patch-v2-in-reply.mbox  |  80 ++++
 .../tests/mail/series/0031-patch-v2-in-reply.mbox  | 119 +++++
 .../tests/mail/series/0032-patch-v2-in-reply.mbox  |  97 ++++
 .../tests/mail/series/0033-patch-v2-in-reply.mbox  |  88 ++++
 patchwork/tests/test_patchparser.py                | 121 +++--
 patchwork/tests/test_series.py                     | 529 +++++++++++++++++++++
 patchwork/tests/utils.py                           |  92 +++-
 21 files changed, 2869 insertions(+), 66 deletions(-)
 create mode 100644 docs/manual.rst
 create mode 100644 patchwork/migrations/0003_series.py
 create mode 100644 patchwork/tests/mail/series/0001-single-mail.mbox
 create mode 100644 patchwork/tests/mail/series/0010-multiple-mails-cover-letter.mbox
 create mode 100644 patchwork/tests/mail/series/0011-multiple-mails-cover-letter.mbox
 create mode 100644 patchwork/tests/mail/series/0012-multiple-mails-cover-letter.mbox
 create mode 100644 patchwork/tests/mail/series/0013-multiple-mails-cover-letter.mbox
 create mode 100644 patchwork/tests/mail/series/0014-multiple-mails-cover-letter.mbox
 create mode 100644 patchwork/tests/mail/series/0020-multiple-mails-no-cover-letter.mbox
 create mode 100644 patchwork/tests/mail/series/0021-multiple-mails-no-cover-letter.mbox
 create mode 100644 patchwork/tests/mail/series/0022-multiple-mails-no-cover-letter.mbox
 create mode 100644 patchwork/tests/mail/series/0030-patch-v2-in-reply.mbox
 create mode 100644 patchwork/tests/mail/series/0031-patch-v2-in-reply.mbox
 create mode 100644 patchwork/tests/mail/series/0032-patch-v2-in-reply.mbox
 create mode 100644 patchwork/tests/mail/series/0033-patch-v2-in-reply.mbox
 create mode 100644 patchwork/tests/test_series.py

-- 
2.1.0



More information about the Patchwork mailing list