]> git.ipfire.org Git - thirdparty/patchwork.git/commit
Fix parsing of interesing series reply structures
authorDaniel Axtens <dja@axtens.net>
Thu, 17 Nov 2016 05:11:59 +0000 (16:11 +1100)
committerStephen Finucane <stephen@that.guru>
Sat, 19 Nov 2016 16:40:03 +0000 (16:40 +0000)
commitc21b305256b407036a23539913c041976b33fc66
tree6d5ff829b3f7f17bcc45266f89926ab095607f1b
parentfebad055fb6609369f1a465a5eec323549c5c065
Fix parsing of interesing series reply structures

There are some things you probably shouldn't do on public
mailing lists, but which people do anyway.

The first, and most understandable, is this:

          - [PATCH 1/2] test: Add some lorem ipsum
            - [PATCH 2/2] test: Convert to Markdown
              - [PATCH v2 1/2] test: Add some lorem ipsum
                - [PATCH v2 2/2] test: Convert to Markdown

We should correctly parse these by:
 - creating a new series if the version number changes
 - when deciding whether to create a SeriesReference, search by
   message-id alone, not the message-id/series pair. (Otherwise,
   we try to create a series ref for v1 2/2 in the series for v2,
   which breaks a uniqueness constraint.

The second, and less excusable, is this:

          - [PATCH 1/2] test: Add some lorem ipsum
            - [PATCH 2/2] test: Convert to Markdown
              - [PATCH 1/2] test: Add some lorem ipsum
                - [PATCH 2/2] test: Convert to Markdown

With this patch:
 - if we get a x/n for a series that already has an x/n, create a
   new series for it.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Stephen Finucane <stephen@that.guru>
patchwork/parser.py
patchwork/tests/series/bugs-nocover-noversion.mbox [new file with mode: 0644]
patchwork/tests/series/bugs-nocover.mbox [new file with mode: 0644]
patchwork/tests/test_series.py