[PATCH 1/5] test: two new messages for the 'broken' corpus

2018-04-13 Thread David Bremner
These have an 'In-Reply-To' loop, which currently confuses "notmuch new". Courtesy of anarcat. --- ...521463752.R13151765805797588408.curie:2,FS | 173 + ...1521463753.R9368947314807690338.curie:2,FS | 180 ++ 2 files changed, 353 insertions(+) create mode 100644

reference loop fix and tests, v2

2018-04-13 Thread David Bremner
Here's a tidied version of the reference loop fix. There's actually only one non-comment line of code changed. As you can guess from the NEWS patch, I'm planning a point release to include this bugfix. I'd also like to include the mset fix [1], so it would be great if someone could test that.

[PATCH 4/5] test: add second reference loop test

2018-04-13 Thread David Bremner
Guard against regressions where there is no crash, but output is wrong. --- test/T050-new.sh | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/T050-new.sh b/test/T050-new.sh index 222c341e..91722e24 100755 --- a/test/T050-new.sh +++ b/test/T050-new.sh @@ -355,7

[PATCH 2/5] test: add known broken test for indexing an In-Reply-To loop.

2018-04-13 Thread David Bremner
This documents the bug discussed in id:87d10042pu@curie.anarc.at --- test/T050-new.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/test/T050-new.sh b/test/T050-new.sh index cd522364..c55a2d97 100755 --- a/test/T050-new.sh +++ b/test/T050-new.sh @@ -354,4 +354,9 @@ exit

[PATCH 3/5] lib: break reference loop by choosing arbitrary top level msg

2018-04-13 Thread David Bremner
Other parts of notmuch (e.g. notmuch show) expect each thread to contain at least one top level message, and crash if this expectation is not met. --- lib/thread.cc| 8 +++- test/T050-new.sh | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/thread.cc

[PATCH 5/5] NEWS: add item for reference loop fix.

2018-04-13 Thread David Bremner
--- NEWS | 9 + 1 file changed, 9 insertions(+) diff --git a/NEWS b/NEWS index 39ce7707..e9b1dcd9 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,12 @@ +Notmuch 0.26.2 (UNRELEASED) +=== + +Library Changes +--- + +Make thread indexing more robust against

Re: [PATCH 2/2] test: pytest runner for the test suite

2018-04-13 Thread Floris Bruynooghe
On Sun 08 Apr 2018 at 19:14 -0300, David Bremner wrote: > Floris Bruynooghe writes: > >> This series looks good to me, would be great to have! Do you want to >> commit them this or should I just incorporate it and submit together >> with tests once actual tests exist. You could

Re: [PATCH] WIP: test patch for reference loop problem

2018-04-13 Thread David Bremner
Antoine Beaupré writes: > Hi! > > So I've tried the patch and it seems to fix the bug. I'll run with a > patch version for a while to see if anything's off, but so far so good > I'd say. > > Furthermore, it's not possible for me to reproduce the bug in my regular >

[PATCH] WIP: add attachment checks

2018-04-13 Thread Antoine Beaupré
This implements basic attachment checks like those present in other MUAs (e.g. Thunderbird, IIRC). A hook watches for keywords, which are implemented using a customizable regex, that indicate the user might have wanted to include an attachement while writing the email, but has forgotten. We