<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/notmuch-private.h, branch 0.4</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.4</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.4'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2010-11-02T05:35:48Z</updated>
<entry>
<title>lib: Add GCC visibility(hidden) pragmas to private header files.</title>
<updated>2010-11-02T05:35:48Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-11-02T05:01:15Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=c81cecf620d506653a1ead83858b8b3fc240abb5'/>
<id>urn:sha1:c81cecf620d506653a1ead83858b8b3fc240abb5</id>
<content type='text'>
This prevents any of the private functions from being leaked out
through the library interface (at least when compiling with a
recent-enough gcc to support the visibility pragma).
</content>
</entry>
<entry>
<title>Add support (and tests) for messages with really long message IDs.</title>
<updated>2010-06-04T20:35:07Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-06-04T19:39:36Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=7b78eb4af6e87532795d09bd82152002ab4a74b1'/>
<id>urn:sha1:7b78eb4af6e87532795d09bd82152002ab4a74b1</id>
<content type='text'>
Scott Henson reported an internal error that occurred when he tried to
add a message that referenced another message with a message ID well
over 300 characters in length. The bug here was running into a Xapian
limit for the length of metadata key names, (which is even more
restrictive than the Xapian limit for the length of terms).

We fix this by noticing long message ID values and instead using a
message ID of the form "notmuch-sha1-&lt;sha1_sum_of_message_id&gt;". That
is, we use SHA1 to generate a compressed, (but still unique), version
of the message ID.

We add support to the test suite to exercise this fix. The tests add a
message referencing the long message ID, then add the message with the
long message ID, then finally add another message referencing the long
ID. Each of these tests exercise different code paths where the
special handling is implemented.

A final test ensures that all three messages are stitched together
into a single thread---guaranteeing that the three code paths all act
consistently.
</content>
</entry>
<entry>
<title>Avoid database corruption by not adding partially-constructed mail documents.</title>
<updated>2010-06-04T17:16:53Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-06-04T17:16:53Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=98845fdbb2a4acaa0036f8e2e998e726b18e6b13'/>
<id>urn:sha1:98845fdbb2a4acaa0036f8e2e998e726b18e6b13</id>
<content type='text'>
Previously we were using Xapian's add_document to allocate document ID
values for notmuch_message_t objects.  This had the drawback of adding
a partially constructed mail document to the database. If notmuch was
subsequently interrupted before fully populating this document, then
later runs would be quite confused when seeing the partial documents.

There are reports from the wild of people hitting internal errors of
the form "Message ... has no thread ID" for example, (which is
currently an unrecoverable error).

We fix this by manually allocating document IDs without adding
documents. With this change, we never call Xapian's add_document
method, but only replace_document with either the current document ID
of a message or a new one that we have allocated.
</content>
</entry>
<entry>
<title>Make Received: header special in notmuch_message_file_get_header</title>
<updated>2010-04-26T21:44:06Z</updated>
<author>
<name>Dirk Hohndel</name>
<email>hohndel@infradead.org</email>
</author>
<published>2010-04-26T19:58:34Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=5b8b0377cb68904eac8fc58a933d47f605a81725'/>
<id>urn:sha1:5b8b0377cb68904eac8fc58a933d47f605a81725</id>
<content type='text'>
With this patch the Received: header becomes special in the way
we treat headers - this is the only header for which we concatenate
all the instances we find (instead of just returning the first one).

This will be used in the From guessing code for replies as we need to
be able to walk ALL of the Received: headers in a message to have a
good chance to guess which mailbox this email was delivered to.

Signed-off-by: Dirk Hohndel &lt;hohndel@infradead.org&gt;
</content>
</entry>
<entry>
<title>Add authors member to message</title>
<updated>2010-04-26T18:44:49Z</updated>
<author>
<name>Dirk Hohndel</name>
<email>hohndel@infradead.org</email>
</author>
<published>2010-04-24T18:20:53Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=57561414d76297c16b4b6f3da570f14b4ddf020c'/>
<id>urn:sha1:57561414d76297c16b4b6f3da570f14b4ddf020c</id>
<content type='text'>
message-&gt;authors contains the author's name (as we want to print it)
get / set methods are declared in notmuch-private.h

Signed-off-by: Dirk Hohndel &lt;hohndel@infradead.org&gt;
</content>
</entry>
<entry>
<title>Name thread based on matching msgs instead of first msg.</title>
<updated>2010-04-21T21:56:53Z</updated>
<author>
<name>Jesse Rosenthal</name>
<email>jrosenthal@jhu.edu</email>
</author>
<published>2010-04-17T17:59:22Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=4971b85641def6b17072ae1b0de0adf15d197f2c'/>
<id>urn:sha1:4971b85641def6b17072ae1b0de0adf15d197f2c</id>
<content type='text'>
At the moment all threads are named based on the name of the first message
in the thread. However, this can cause problems if people either start
new threads by replying-all (as unfortunately, many out there do) or
change the subject of their mails to reflect a shift in a thread on a
list.

This patch names threads based on (a) matches for the query, and (b) the
search order. If the search order is oldest-first (as in the default
inbox) it chooses the oldest matching message as the subject. If the
search order is newest-first it chooses the newest one.

Reply prefixes ("Re: ", "Aw: ", "Sv: ", "Vs: ") are ignored
(case-insensitively) so a Re: won't change the subject.

Note that this adds a "sort" argument to _notmuch_thread_create and
_thread_add_matched_message, so that when constructing the thread we can
be aware of the sort order.

Signed-off-by: Jesse Rosenthal &lt;jrosenthal@jhu.edu&gt;
</content>
</entry>
<entry>
<title>lib: Rename iterator functions to prepare for reverse iteration.</title>
<updated>2010-03-09T17:22:29Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-03-09T17:22:29Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=4e5d2f22db290a830c0267f34b519c6138af00ed'/>
<id>urn:sha1:4e5d2f22db290a830c0267f34b519c6138af00ed</id>
<content type='text'>
We rename 'has_more' to 'valid' so that it can function whether
iterating in a forward or reverse direction. We also rename
'advance' to 'move_to_next' to setup parallel naming with
the proposed functions 'move_to_first', 'move_to_last', and
'move_to_previous'.
</content>
</entry>
<entry>
<title>lib: Split the database upgrade into two phases for safer operation.</title>
<updated>2010-01-09T19:13:12Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-01-09T19:13:12Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d12801c8b4d04a50fcb912b75017244fb09658e8'/>
<id>urn:sha1:d12801c8b4d04a50fcb912b75017244fb09658e8</id>
<content type='text'>
The first phase copies data from the old format to the new format
without deleting anything. This allows an old notmuch to still use the
database if the upgrade process gets interrupted. The second phase
performs the deletion (after updating the database version number). If
the second phase is interrupted, there will be some unused data in the
database, but it shouldn't cause any actual harm.
</content>
</entry>
<entry>
<title>lib: Implement versioning in the database and provide upgrade function.</title>
<updated>2010-01-08T02:26:31Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-01-08T02:26:31Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=909f52bd8c4bdfa11cd3e75e3d0959e0293689bd'/>
<id>urn:sha1:909f52bd8c4bdfa11cd3e75e3d0959e0293689bd</id>
<content type='text'>
The recent support for renames in the database is our first time
(since notmuch has had more than a single user) that we have a
database format change. To support smooth upgrades we now encode a
database format version number in the Xapian metadata.

Going forward notmuch will emit a warning if used to read from a
database with a newer version than it natively supports, and will
refuse to write to a database with a newer version.

The library also provides functions to query the database format
version:

	notmuch_database_get_version

to ask if notmuch wants a newer version than that:

	notmuch_database_needs_upgrade

and a function to actually perform that upgrade:

	notmuch_database_upgrade
</content>
</entry>
<entry>
<title>Prefer READ_ONLY consistently over READONLY.</title>
<updated>2010-01-07T18:29:05Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-01-07T18:29:05Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=807aef93d3bf02884f7a37b44b894c11d9e1df58'/>
<id>urn:sha1:807aef93d3bf02884f7a37b44b894c11d9e1df58</id>
<content type='text'>
Previously we had NOTMUCH_DATABASE_MODE_READ_ONLY but
NOTMUCH_STATUS_READONLY_DATABASE which was ugly and confusing. Rename
the latter to NOTMUCH_STATUS_READ_ONLY_DATABASE for consistency.
</content>
</entry>
</feed>
