<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/database.cc, branch 0.16_rc2</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.16_rc2</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.16_rc2'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2013-06-08T23:42:33Z</updated>
<entry>
<title>cli: Guard deprecated g_type_init calls</title>
<updated>2013-06-08T23:42:33Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2013-06-07T18:41:13Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=8d6aa603ef3a9680c7032cabf59e3673f773dea3'/>
<id>urn:sha1:8d6aa603ef3a9680c7032cabf59e3673f773dea3</id>
<content type='text'>
g_type_init was deprecated in GLib 2.35.1.  In order to compile
cleanly, guard these with a suitable #if.

(commit msg from https://bugs.freedesktop.org/attachment.cgi?id=73774 )
</content>
</entry>
<entry>
<title>lib/database.cc: change how the parent of a message is calculated</title>
<updated>2013-05-14T00:29:13Z</updated>
<author>
<name>Aaron Ecay</name>
<email>aaronecay@gmail.com</email>
</author>
<published>2013-03-06T03:31:49Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=cf8aaafbad6815ebdfcd9b3b36cfe3ca5ff2764b'/>
<id>urn:sha1:cf8aaafbad6815ebdfcd9b3b36cfe3ca5ff2764b</id>
<content type='text'>
Presently, the code which finds the parent of a message as it is being
added to the database assumes that the first Message-ID-like substring
of the In-Reply-To header is the parent Message ID.  Some mail clients,
however, put stuff other than the Message-ID of the parent in the
In-Reply-To header, such as the email address of the sender of the
parent.  This can fool notmuch.

The updated algorithm prefers the last Message ID in the References
header.  The References header lists messages oldest-first, so the last
Message ID is the parent (RFC2822, p. 24).  The References header is
also less likely to be in a non-standard
syntax (http://cr.yp.to/immhf/thread.html,
http://www.jwz.org/doc/threading.html).  In case the References header
is not to be found, fall back to the old behavior.

V2 of this patch, incorporating feedback from Jani and (indirectly)
Austin.
</content>
</entry>
<entry>
<title>lib: Reject multi-message mboxes and deprecate single-message mbox</title>
<updated>2012-11-27T01:12:10Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-11-25T06:16:01Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=610f0e09929a5f351f7c1c3850ac7e0d83ffe388'/>
<id>urn:sha1:610f0e09929a5f351f7c1c3850ac7e0d83ffe388</id>
<content type='text'>
Previously, we would treat multi-message mboxes as one giant email,
which, besides the obvious incorrect indexing, often led to
out-of-memory errors for archival mboxes.  Now we explicitly reject
multi-message mboxes.  For historical reasons, we retain support for
single-message mboxes, but official deprecate this behavior.
</content>
</entry>
<entry>
<title>lib: add date range query support</title>
<updated>2012-10-31T19:55:32Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2012-10-30T20:32:37Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=90cd1bac4eeb0d57fbe2740625aaa58d8d925ee5'/>
<id>urn:sha1:90cd1bac4eeb0d57fbe2740625aaa58d8d925ee5</id>
<content type='text'>
Add a custom value range processor to enable date and time searches of
the form date:since..until, where "since" and "until" are expressions
understood by the previously added date/time parser, to restrict the
results to messages within a particular time range (based on the Date:
header).

If "since" or "until" describes date/time at an accuracy of days or
less, the values are rounded according to the accuracy, towards past
for "since" and towards future for "until". For example,
date:november..yesterday would match from the beginning of November
until the end of yesterday. Expressions such as date:today..today
means since the beginning of today until the end of today.

Open-ended ranges are supported (since Xapian 1.2.1), i.e. you can
specify date:..until or date:since.. to not limit the start or end
date, respectively.

CAVEATS:

Xapian does not support spaces in range expressions. You can replace
the spaces with '_', or (in most cases) '-', or (in some cases) leave
the spaces out altogether.

Entering date:expr without ".." (for example date:yesterday) will not
work as you might expect. You can achieve the expected result by
duplicating the expr both sides of ".." (for example
date:yesterday..yesterday).

Open-ended ranges won't work with pre-1.2.1 Xapian, but they don't
produce an error either.

Signed-off-by: Jani Nikula &lt;jani@nikula.org&gt;
</content>
</entry>
<entry>
<title>lib: Make notmuch_database_find_message_by_filename not crash on read-only databases</title>
<updated>2012-05-24T01:31:47Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-18T04:13:40Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=cdd698f96976dc8fc43efd19c452d0fca48e2618'/>
<id>urn:sha1:cdd698f96976dc8fc43efd19c452d0fca48e2618</id>
<content type='text'>
Previously, _notmuch_database_filename_to_direntry would abort with an
internal error when called on a read-only database.  Now that creating
the directory document is optional,
notmuch_database_find_message_by_filename can disable directory
document creation (as it should) and, as a result, not abort on
read-only databases.
</content>
</entry>
<entry>
<title>lib: Make notmuch_database_get_directory return NULL if the directory is not found</title>
<updated>2012-05-24T01:30:55Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-18T04:13:37Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=fe1ca1410423d99db09543f4a97bc2ba0c6ade81'/>
<id>urn:sha1:fe1ca1410423d99db09543f4a97bc2ba0c6ade81</id>
<content type='text'>
Using the new support from _notmuch_directory_create, this makes
notmuch_database_get_directory a read-only operation that simply
returns the directory object if it exists or NULL otherwise.  This
also means that notmuch_database_get_directory can work on read-only
databases.

This change breaks the directory mtime workaround in notmuch-new.c by
fixing the exact issue it was working around.  This permits mtime
update races to prevent scans of changed directories, which
non-deterministically breaks a few tests.  The next patch fixes this.
</content>
</entry>
<entry>
<title>lib: Perform the same transformation to _notmuch_database_filename_to_direntry</title>
<updated>2012-05-24T01:30:43Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-18T04:13:36Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=67ae2377a9ec2da296a2e012352f962664a4d1a8'/>
<id>urn:sha1:67ae2377a9ec2da296a2e012352f962664a4d1a8</id>
<content type='text'>
Now _notmuch_database_filename_to_direntry takes a flags argument and
can indicate if the necessary directory documents do not exist.
Again, callers have been updated, but retain their original behavior.
</content>
</entry>
<entry>
<title>lib: Perform the same transformation to _notmuch_database_find_directory_id</title>
<updated>2012-05-24T01:30:32Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-18T04:13:35Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=0c950146a14fa2bb0a0bf542073b2cdca141afd1'/>
<id>urn:sha1:0c950146a14fa2bb0a0bf542073b2cdca141afd1</id>
<content type='text'>
Now _notmuch_database_find_directory_id takes a flags argument, which
it passes through to _notmuch_directory_create and can indicate if the
directory does not exist.  Again, callers have been updated, but
retain their original behavior.
</content>
</entry>
<entry>
<title>lib: Make directory document creation optional for _notmuch_directory_create</title>
<updated>2012-05-24T01:30:20Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-18T04:13:34Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f69314fbd37f403a395b7c1c44595c8f696b05b7'/>
<id>urn:sha1:f69314fbd37f403a395b7c1c44595c8f696b05b7</id>
<content type='text'>
Previously this function would create directory documents if they
didn't exist.  As a result, it could only be used on writable
databases.  This adds an argument to make creation optional and to
make this function work on read-only databases.  We use a flag
argument to avoid a bare boolean and to permit future expansion.

Both callers have been updated, but currently retain the old behavior.
We'll take advantage of the new argument in the following patches.
</content>
</entry>
<entry>
<title>lib/cli: Make notmuch_database_get_directory return a status code</title>
<updated>2012-05-15T11:56:33Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-13T23:36:09Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=7199d22f4394abdf72ab791fc0aba2c697bf1209'/>
<id>urn:sha1:7199d22f4394abdf72ab791fc0aba2c697bf1209</id>
<content type='text'>
Previously, notmuch_database_get_directory had no way to indicate how
it had failed.  This changes its prototype to return a status code and
set an out-argument to the retrieved directory, like similar functions
in the library API.  This does *not* change its currently broken
behavior of creating directory objects when they don't exist, but it
does document it and paves the way for fixing this.  Also, it can now
check for a read-only database and return
NOTMUCH_STATUS_READ_ONLY_DATABASE instead of crashing.

In the interest of atomicity, this also updates calls from the CLI so
that notmuch still compiles.
</content>
</entry>
</feed>
