<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/directory.cc, branch 0.18_rc1</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.18_rc1</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.18_rc1'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2012-05-24T01:30:32Z</updated>
<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>Add a generic function to get a list of terms with some prefix.</title>
<updated>2011-03-21T06:45:18Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2010-12-09T05:32:35Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=206938ec9b4ddee28793f2f052a5314d6d7ab08d'/>
<id>urn:sha1:206938ec9b4ddee28793f2f052a5314d6d7ab08d</id>
<content type='text'>
Replace _notmuch_convert_tags with this and simplify
_create_filenames_for_terms_with_prefix.  This will also come in handy
shortly to get the message file name list.
</content>
</entry>
<entry>
<title>Implement an internal generic string list and use it.</title>
<updated>2011-03-21T06:45:18Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2010-12-09T00:26:05Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f3c1eebfaf8526129ae6946cbcd44a3c602563d6'/>
<id>urn:sha1:f3c1eebfaf8526129ae6946cbcd44a3c602563d6</id>
<content type='text'>
This replaces the guts of the filename list and tag list, making those
interfaces simple iterators over the generic string list.  The
directory, message filename, and tags-related code now build generic
string lists and then wraps them in specific iterators.  The real wins
come in later patches, when we use these for even more generic
functionality.

As a nice side-effect, this also eliminates the annoying dependency on
GList in the tag list.
</content>
</entry>
<entry>
<title>lib: Add new, public notmuch_message_get_filenames</title>
<updated>2010-11-11T11:40:19Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-11-11T08:07:24Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=1d02dd64afe245a2b5a8461feeba975e61f0c233'/>
<id>urn:sha1:1d02dd64afe245a2b5a8461feeba975e61f0c233</id>
<content type='text'>
This augments the existing notmuch_message_get_filename by allowing
the caller access to all filenames in the case of multiple files for a
single message.

To support this, we split the iterator (notmuch_filenames_t) away from
the list storage (notmuch_filename_list_t) where previously these were
a single object (notmuch_filenames_t). Then, whenever the user asks
for a file or filename, the message object lazily creates a complete
notmuch_filename_list_t and then:

	For notmuch_message_get_filename, returns the first filename
	in the list.

	For notmuch_message_get_filenames, creates and returns a new
	iterator for the filename list.
</content>
</entry>
<entry>
<title>lib: Add new implementation of notmuch_filenames_t</title>
<updated>2010-11-11T11:40:19Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-11-11T07:26:31Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d87db8843266caf6b11c1f2f1874328830b23878'/>
<id>urn:sha1:d87db8843266caf6b11c1f2f1874328830b23878</id>
<content type='text'>
The new implementation is simply a talloc-based list of strings. The
former support (a list of database terms with a common prefix) is
implemented by simply pre-iterating over the terms and populating the
list. This should provide no performance disadvantage as callers of
thigns like notmuch_directory_get_child_files are very likely to
always iterate over all filenames anyway.

This new implementation of notmuch_filenames_t is in preparation for
adding API to query all of the filenames for a single message.
</content>
</entry>
<entry>
<title>lib: Eliminate some redundant includes of xapian.h</title>
<updated>2010-11-02T06:24:40Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-11-02T05:31:45Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d064bd696ccc443a7ece9cfc8816999c69943223'/>
<id>urn:sha1:d064bd696ccc443a7ece9cfc8816999c69943223</id>
<content type='text'>
Most files including this already include database-private.h which
includes xapian.h already.
</content>
</entry>
<entry>
<title>lib: Add some missing static qualifiers.</title>
<updated>2010-11-02T04:58:43Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-11-02T04:58:43Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=67c3bc9db48c9e12d648df4792c706cae723676c'/>
<id>urn:sha1:67c3bc9db48c9e12d648df4792c706cae723676c</id>
<content type='text'>
These various functions and data are all used only locally, so should
be marked static. Ensuring we get these right will avoid us accidentally
leaking unintended symbols through the library interface.
</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>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>
</feed>
