Re: [PATCH 2/2] lib/message-property: sync removed properties to the database

2023-03-29 Thread Kevin Boulain
On 2023-03-29 at 08:32 -03, David Bremner wrote: > It would be nice to structure this in terms of a known broken test > (perhaps modify the existing one to reopen the database and dump the > properties) > that is then fixed by patch adding the sync. I have restructured the commits to hopefully

Re: [PATCH v2 1/2] test: uncaught exception when editing properties of a removed message

2023-03-29 Thread Kevin Boulain
On 2023-03-29 at 07:42 -03, David Bremner wrote: > Thanks for the speedy update. I hate to do this but I think the message > is now _too_ specific. Goldilocks and the three tests I guess. > > In particular, is there some reason to think that the number 54 is > stable here? I'm worried about the

[PATCH v3 2/2] lib/message-property: catch xapian exceptions

2023-03-29 Thread Kevin Boulain
Since libnotmuch exposes a C interface there's no way for clients to catch this. Inspired by what's done for tags (see notmuch_message_remove_tag). --- lib/message-property.cc | 36 +-- test/T610-message-property.sh | 2 -- 2 files changed, 30 insertions(+),

[PATCH v3 1/2] test: uncaught exception when editing properties of a removed message

2023-03-29 Thread Kevin Boulain
These two functions don't fail gracefully when editing a removed message: BROKEN edit property on removed message without uncaught exception --- T610-message-property.20.EXPECTED 2023-02-27 11:33:25.792764376 + +++ T610-message-property.20.OUTPUT 2023-02-27

[PATCH v2 5/5] test: add test for notmuch_message_remove_all_properties_with_prefix

2023-03-29 Thread Kevin Boulain
It wasn't covered, though it shares most of its implementation with notmuch_message_remove_all_properties. --- test/T610-message-property.sh | 15 +++ 1 file changed, 15 insertions(+) diff --git a/test/T610-message-property.sh b/test/T610-message-property.sh index e4a4b89c..480b04fc

[PATCH v2 3/5] test: reorganize tests and mark a few of them as broken

2023-03-29 Thread Kevin Boulain
notmuch_message_remove_all_properties should have removed the testkey1 = testvalue1 property but hasn't. Delay the execution of the corresponding test to avoid updating a few tests that actually relied on the broken behavior. --- test/T610-message-property.sh | 39

[PATCH v2 4/5] lib/message-property: sync removed properties to the database

2023-03-29 Thread Kevin Boulain
_notmuch_message_remove_all_properties wasn't syncing the message back to the database but was still invalidating the metadata, giving the impression the properties had actually been removed. Also move the metadata invalidation to _notmuch_message_remove_terms to be closer to what's done in

[PATCH v2 2/5] test: remove unnecessary sorting

2023-03-29 Thread Kevin Boulain
The other tests rely on a stable output. --- test/T610-message-property.sh | 12 1 file changed, 12 deletions(-) diff --git a/test/T610-message-property.sh b/test/T610-message-property.sh index 7ebddae3..383090e8 100755 --- a/test/T610-message-property.sh +++

[PATCH v2 1/5] test: display key name in property tests

2023-03-29 Thread Kevin Boulain
To make the tests a bit easier to understand. --- test/T610-message-property.sh | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/test/T610-message-property.sh b/test/T610-message-property.sh index 2685f3b5..7ebddae3 100755 ---

Re: Reimagining notmuch-git/nmbug

2023-03-29 Thread Felipe Contreras
On Wed, Mar 29, 2023 at 3:50 AM Michael J Gruber wrote: > > Am Mi., 29. März 2023 um 10:41 Uhr schrieb Felipe Contreras > : > > > > Hi, > > > > I noticed you promoted notmuch-git as a user tool to toy around with it. > > > > Very quickly I realized that most of what it does is something I've > >

Re: [PATCH 2/2] lib/message-property: sync removed properties to the database

2023-03-29 Thread David Bremner
Kevin Boulain writes: > > Yeah, talloc's documentation confirms that when the context is free'd > every child is also free'd. Not quite sure what style is preferred > (explicit or implicit, implicit sure leads to nicer code here). In general implicit de-allocation is fine.

Re: [PATCH 2/2] lib/message-property: sync removed properties to the database

2023-03-29 Thread David Bremner
Kevin Boulain writes: > On 2023-03-03 at 00:39 +02, Tomi Ollila wrote: >> Somehow testkey1 = testvalue1 disappeared from the test code (which is >> probably expected -- perhaps the commit message of the *change* 1/2 >> tried to point to that ;D) > > Yes, that proves

Re: [PATCH v2 1/2] test: uncaught exception when editing properties of a removed message

2023-03-29 Thread David Bremner
Kevin Boulain writes: > +== stderr == > +A Xapian exception occurred at message-property.cc:XXX: No termlist for > document 54 > +EOF > +test_expect_equal_file EXPECTED OUTPUT > + > +add_email_corpus Hi Kevin; Thanks for the speedy update. I hate to do this but I think the message is now

Re: Reimagining notmuch-git/nmbug

2023-03-29 Thread Michael J Gruber
Am Mi., 29. März 2023 um 10:41 Uhr schrieb Felipe Contreras : > > Hi, > > I noticed you promoted notmuch-git as a user tool to toy around with it. > > Very quickly I realized that most of what it does is something I've > been working on for at least 10 years: making git work with other > tools. >

Reimagining notmuch-git/nmbug

2023-03-29 Thread Felipe Contreras
Hi, I noticed you promoted notmuch-git as a user tool to toy around with it. Very quickly I realized that most of what it does is something I've been working on for at least 10 years: making git work with other tools. I presume you haven't heard of git remote-helpers [1], because they do