<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib, branch 0.14</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.14</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.14'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2012-06-10T23:14:56Z</updated>
<entry>
<title>lib: Treat messages in new/ as maildir messages with no flags set</title>
<updated>2012-06-10T23:14:56Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-06-09T19:14:17Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b88030bda6da084ef74e41f588589fd98e773ad7'/>
<id>urn:sha1:b88030bda6da084ef74e41f588589fd98e773ad7</id>
<content type='text'>
Previously, notmuch new only synchronized maildir flags to tags for
files with a maildir "info" part.  Since messages in new/ don't have
an info part, notmuch would ignore them for flag-to-tag
synchronization.

This patch makes notmuch consider messages in new/ to be legitimate
maildir messages that simply have no maildir flags set.  The most
visible effect of this is that such messages now automatically get the
unread tag.
</content>
</entry>
<entry>
<title>lib: Only synchronize maildir flags for messages in maildirs</title>
<updated>2012-06-10T23:13:58Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-06-09T19:14:16Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=750231bae8a0bdb3273c2f9a74da14327fbc5d52'/>
<id>urn:sha1:750231bae8a0bdb3273c2f9a74da14327fbc5d52</id>
<content type='text'>
Previously, we synchronized flags to tags for any message that looked
like it had maildir flags in its file name, regardless of whether it
was in a maildir-like directory structure.  This was asymmetric with
tag-to-flag synchronization, which only applied to messages in
directories named new/ and cur/ (introduced by 95dd5fe5).

This change makes our interpretation stricter and addresses this
asymmetry by only synchronizing flags to tags for messages in
directories named new/ or cur/.  It also prepares us to treat messages
in new/ as maildir messages, even though they lack maildir flags.
</content>
</entry>
<entry>
<title>lib: Move _filename_is_in_maildir</title>
<updated>2012-06-10T23:13:45Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-06-09T19:14:15Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=93ab4c7d119bb751c4d7297cb18a6f5eb50ae478'/>
<id>urn:sha1:93ab4c7d119bb751c4d7297cb18a6f5eb50ae478</id>
<content type='text'>
This way notmuch_message_maildir_flags_to_tags can call it.  It makes
more sense for this to be just above all of the maildir
synchronization code rather than mixed in the middle.
</content>
</entry>
<entry>
<title>lib: Don't needlessly create directory docs in _notmuch_message_remove_filename</title>
<updated>2012-05-24T01:32:12Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-05-18T04:13:42Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d9f61c26a1344b123c1812392bc39c32634a099a'/>
<id>urn:sha1:d9f61c26a1344b123c1812392bc39c32634a099a</id>
<content type='text'>
Previously, if passed a filename with a directory that did not exist
in the database, _notmuch_message_remove_filename would needlessly
create that directory document.  Fix it so that doesn't happen.
</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>
