| Age | Commit message (Collapse) | Author |
|
This is mostly just (horizontal) code movement due to wrapping
everything in a try / catch.
|
|
Exception will be caught in next commit.
|
|
This will require some care for the caller to check the sign, and not
just add error returns into a running total.
|
|
This will be fixed in the next commit.
|
|
This allows the function to return an error value rather than
crashing.
|
|
This will be fixed in the next commit.
|
|
This should not change functionality, but does slightly reduce code
duplication. Perhaps more importantly it allows consistent changes to
all of the similar exception handling in message.cc.
|
|
This function catches Xapian exceptions. The test is intended to make
sure it stays that way.
|
|
Exception caught in next commit. Note that FLAG_GHOST is the only one
that triggers the I/O code path.
|
|
This is essentially copied from the change to notmuch_message_get_filename
|
|
This will be fixed in the next commit
|
|
This is the same machinery as applied for
notmuch_message_get_{thread,message}_id
|
|
This will be fixed in the next commit
|
|
We need to to set a query and retrieve the threads to meaningfully
test this function.
|
|
This function already catches Xapian exceptions, and we want to make
sure it stays that way.
|
|
This is just for consistency, and a small reduction in the amount of
boilerplate.
|
|
Instead of printing the same static string for each test, can replace
the assert with something simpler (or at least easier to integrate
into the test suite).
|
|
Since these backups are never restored, they should be safe to remove.
|
|
These are not used since b90d852
|
|
These are less crucial since we stopped generating new database
versions and relied primarily on features. They also rely on a
pre-generated v1 database which happens to be chert format. This
backend is not supported by Xapian 1.5.
Also drop the tool gen-testdb.sh, which is currently broken, due to
changes in the testing infrastructure.
|
|
This will be mandatory as of Xapian 1.5. The API is also more
consistent with the FieldProcessor API, which helps code re-use a bit.
Note that this switches to using the built-in Xapian support for
prefixes on ranges (i.e. deleted code at beginning of
ParseTimeRangeProcessor::operator(), added prefix to constructor).
Another side effect of the migration is that we are generating smaller
queries, using one OP_VALUE_RANGE instead of an AND of two OP_VALUE_*
queries.
|
|
The old API was deprecated in Xapian 1.3.4 and (will be) removed in 1.5.0
|
|
gzip includes the name of the uncompressed file and its modification
timestamp into the compressed archive. The latter makes it hard to
reproduce the generated files bit for bit at a later time, so omit this
information from the archive using the "--no-name" option. This is a
reproducibility best practice, see
https://wiki.debian.org/ReproducibleBuilds/TimestampsInGzipHeaders
|
|
|
|
|
|
|
|
|
|
This allows us to return an error value from the library.
|
|
This will be fixed in the next commit.
|
|
By catching it at the library top level, we can return an error value.
|
|
Based on id:87d05je1j6.fsf@powell.devork.be
|
|
Today Defalos on #notmuch asked for a signed tarball for
0.30~rc2. This is a minimal change to support this in the future. The
question of automagically uploading will need more thought; currently
I like the fact that tags from pre-releases are only pushed manually.
|
|
It seems (at least in 3.8.4~rc1-1 on Debian) that set_content requires
at least one line.
|
|
|
|
|
|
Attempt to avoid breaking "pip install ."
As far as I can tell, we need to have a copy (not just a relative
symlink) of the version file.
|
|
Fedora still has an old gmime-devel which is 2.6.x. This is no longer
supported by notmuch. Also apparently dnf is a better choice than yum.
|
|
We make use of the just-introduced configure test.
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
|
|
If https://dev.gnupg.org/T3464 is unresolved in the version of gpgme
we are testing against, then we should know about it, because it
affects the behavior of notmuch.
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
|
|
I haven't traced the code path as exhaustively for the SMIME test, but
the expiry date in question is larger then representable in a signed
32 bit integer.
|
|
Certain tests involving timestamps > 32 bits cannot pass with the
current libnotmuch API. We will avoid this issue for now by disabling
those tests on "old" architectures with 32 bit time_t.
|
|
Since October 2018 building notmuch has actually required compiler
that knows C11.
Also this -std=gnu99 was not used in code compiled by configure,
so in theory this could have caused problems...
...but no related reports have been sent, perhaps ever.
Both gcc and clang has been shipping compilers supporting C11
(or later) by default for more than four years now.
Therefore, just dropping -std=gnu99 (and not checking C11
compatibility for now, for simplicity) is easiest to do,
and removes inconsistency between configure and build time
compilations.
|
|
This keeps it in sync with the main notmuch version which is less
confusing to users.
|
|
|
|
|
|
|
|
Yay, we gained a new author, thanks Anton.
|
|
Since it is possible to use an atomic context to abort a number of
changes support this usage. Because the only way to actually abort
the transaction is to close the database this must also do so.
Amended by db: Note the limitation requiring close is a limitation of
the underlying notmuch API, which should be fixed in a future notmuch
release.
|
|
This reverses the logic of StandaloneMessage to instead create a
OwnedMessage. Only the Thread class allows retrieving messages more
then once so it can explicitly create such messages.
The added test fails with SIGABRT without the fix for the message
re-use in threads being present.
|
|
Any messages retrieved from a query - either directly via
search_messages() or indirectly via thread objects - are owned by that
query. Retrieving the same message (i.e. corresponding to the same
message ID / database object) several times will always yield the same
C object.
The caller is allowed to destroy message objects owned by a query before
the query itself - which can save memory for long-lived queries.
However, that message must then never be retrieved again from that
query.
The python-notmuch2 bindings will currently destroy every message object
in Message._destroy(), which will lead to an invalid free if the same
message is then retrieved again. E.g. the following python program leads
to libtalloc abort()ing:
import notmuch2
db = notmuch2.Database(mode = notmuch2.Database.MODE.READ_ONLY)
t = next(db.threads('*'))
msgs = list(zip(t.toplevel(), t.toplevel()))
msgs = list(zip(t.toplevel(), t.toplevel()))
Fix this issue by creating a subclass of Message, which is used for
"standalone" message which have to be freed by the caller. Message class
is then used only for messages descended from a query, which do not need
to be freed by the caller.
|