[PATCH] parsemail.py: Avoid skipping patches when parsing
Damien Lespiau
damien.lespiau at intel.com
Wed Aug 19 23:35:36 AEST 2015
Hi,
On Mon, Aug 17, 2015 at 09:46:06AM -0500, Jose Lamego wrote:
> Avoids some email patch notifications to be
> wrongly skipped when the commit's descriptor string
> includes or is missing a character/space from the
> expected format.
> An example of a missed email patch notification
> can be found in [1].
>
> [1] http://patchwork.openembedded.org/patch/96385/
>
> Signed-off-by: Jose Lamego <jose.a.lamego at linux.intel.com>
There's already a bit of coverage of that function in
tests/test_patchparser.py, would you mind adding coverage for the case
you're fixing? requiring unit tests is really the best way to make sure
we continue building up the test suite with cases users care about.
--
Damien
> ---
> patchwork/bin/parsemail.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/patchwork/bin/parsemail.py b/patchwork/bin/parsemail.py
> index f2b10bd..902e554 100755
> --- a/patchwork/bin/parsemail.py
> +++ b/patchwork/bin/parsemail.py
> @@ -141,8 +141,8 @@ def mail_headers(mail):
>
> def find_pull_request(content):
> git_re = re.compile('^The following changes since commit.*' +
> - '^are available in the git repository at:\n'
> - '^\s*([\S]+://[^\n]+)$',
> + '^are available in the git repository at.*:
> + '^\s*([\S]+://[^\n]+)',
> re.DOTALL | re.MULTILINE)
> match = git_re.search(content)
> if match:
> --
> 1.9.1
>
> _______________________________________________
> Patchwork mailing list
> Patchwork at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/patchwork
More information about the Patchwork
mailing list