<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/notmuch-new.c, branch 0.10</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.10</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.10'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2011-10-22T22:42:54Z</updated>
<entry>
<title>cli: change argument parsing convention for subcommands</title>
<updated>2011-10-22T22:42:54Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2011-10-21T12:19:17Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=61f0a5b8ee2adf540106a09c5f83fe634da6beb3'/>
<id>urn:sha1:61f0a5b8ee2adf540106a09c5f83fe634da6beb3</id>
<content type='text'>
previously we deleted the subcommand name from argv before passing to
the subcommand. In this version, the deletion is done in the actual
subcommands. Although this causes some duplication of code, it allows
us to be more flexible about how we parse command line arguments in
the subcommand, including possibly using off-the-shelf routines like
getopt_long that expect the name of the command in argv[0].
</content>
</entry>
<entry>
<title>lib: make find_message{,by_filename) report errors</title>
<updated>2011-10-04T04:55:29Z</updated>
<author>
<name>Ali Polatel</name>
<email>alip@exherbo.org</email>
</author>
<published>2011-10-04T04:55:29Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=02a30767116ad8abcbd0a3351f2e4d43bbbd655f'/>
<id>urn:sha1:02a30767116ad8abcbd0a3351f2e4d43bbbd655f</id>
<content type='text'>
Previously, the functions notmuch_database_find_message() and
notmuch_database_find_message_by_filename() functions did not properly
report error condition to the library user.

For more information, read the thread on the notmuch mailing list
starting with my mail "id:871uv2unfd.fsf@gmail.com"

Make these functions accept a pointer to 'notmuch_message_t' as argument
and return notmuch_status_t which may be used to check for any error
condition.

restore: Modify for the new notmuch_database_find_message()
new: Modify for the new notmuch_database_find_message_by_filename()
</content>
</entry>
<entry>
<title>new: Wrap adding and removing messages in atomic sections.</title>
<updated>2011-09-24T23:00:29Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2011-01-29T16:25:56Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=bff30540d86c77aacbc2c133c83aa7ccee823b48'/>
<id>urn:sha1:bff30540d86c77aacbc2c133c83aa7ccee823b48</id>
<content type='text'>
This addresses atomicity of tag synchronization, the last atomicity
problems in notmuch new.  Each message add or remove is wrapped in its
own atomic section, so interrupting notmuch new doesn't lose progress.
</content>
</entry>
<entry>
<title>new: Synchronize maildir flags eagerly.</title>
<updated>2011-09-24T23:00:28Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2011-01-28T01:51:04Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=8305f0aac7f31aeddd54d0af683475ab1492e2b7'/>
<id>urn:sha1:8305f0aac7f31aeddd54d0af683475ab1492e2b7</id>
<content type='text'>
Because flag synchronization is stateless, it can be performed at any
time as long as it's guaranteed to be performed after any change to a
message's filename list.  Take advantage of this to synchronize tags
immediately after a filename is added or removed.

This does not yet make adding or removing a message atomic, but it is
a big step toward atomicity because it reduces the window where the
database tags are inconsistent from nearly the entire notmuch-new to
just around when the message is added or removed.
</content>
</entry>
<entry>
<title>new: Cleanup.  De-duplicate file name removal code.</title>
<updated>2011-09-24T23:00:28Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2011-02-06T09:28:01Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=191c4ae693c35ecd9e905e64c7619734171c4a8a'/>
<id>urn:sha1:191c4ae693c35ecd9e905e64c7619734171c4a8a</id>
<content type='text'>
Previously, file name removal was implemented identically in two
places.  Now it's captured in one function.

This is important because file name removal is about to get slightly
more complicated with eager tag synchronization and correct removal
atomicity.
</content>
</entry>
<entry>
<title>new: Cleanup.  Put removed/renamed message count in add_files_state_t.</title>
<updated>2011-09-24T23:00:28Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2011-06-11T16:54:05Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=1353dbe8642ebf5fc7e4ff562bb4b8f3a8e15132'/>
<id>urn:sha1:1353dbe8642ebf5fc7e4ff562bb4b8f3a8e15132</id>
<content type='text'>
Previously, pointers to these variables were passed around
individually.  This was okay when only one function needed them, but
we're about to need them in a few more places.
</content>
</entry>
<entry>
<title>lib: Add support for nested atomic sections.</title>
<updated>2011-09-24T01:50:38Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2011-06-11T03:35:06Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e59cc0031fbf84f49e32dedb9927f427d2c49309'/>
<id>urn:sha1:e59cc0031fbf84f49e32dedb9927f427d2c49309</id>
<content type='text'>
notmuch_database_t now keeps a nesting count and we only start a
transaction or commit for the outermost atomic section.

Introduces a new error, NOTMUCH_STATUS_UNBALANCED_ATOMIC.
</content>
</entry>
<entry>
<title>new: Defer updating directory mtimes until the end.</title>
<updated>2011-09-24T01:50:38Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2011-02-08T23:24:33Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=fcd433709eff6b7f0fbbd1e5018ca0e37315ce26'/>
<id>urn:sha1:fcd433709eff6b7f0fbbd1e5018ca0e37315ce26</id>
<content type='text'>
Previously, if notmuch new were interrupted between updating the
directory mtime and handling removals from that directory, a
subsequent notmuch new would not handle those removals until something
else changed in that directory.  This defers recording the updated
mtime until after removals are handled to eliminate this problem.
</content>
</entry>
<entry>
<title>new: Don't lose messages on SIGINT.</title>
<updated>2011-09-14T01:00:15Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2011-02-09T01:56:31Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=bdaee77e1b0853b0dab00565e4c5b6164248f85a'/>
<id>urn:sha1:bdaee77e1b0853b0dab00565e4c5b6164248f85a</id>
<content type='text'>
Previously, message removals were always performed, even after a
SIGINT.  As a result, when a message was moved from one folder to
another, a SIGINT between processing the directory the message was
removed from and processing the directory it was added to would result
in notmuch removing that message from the database.
</content>
</entry>
<entry>
<title>new: Improved workaround for mistaken new directories</title>
<updated>2011-06-29T23:10:41Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2011-06-29T23:00:01Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=bb2b33fbb85b88eb7d3bedf4cb261a89da20f504'/>
<id>urn:sha1:bb2b33fbb85b88eb7d3bedf4cb261a89da20f504</id>
<content type='text'>
Currently, notmuch new assumes any directory with a database mtime of
0 is new, but we don't set the mtime until after processing messages
and subdirectories in that directory.  Hence, anything that prevents
the mtime update (such as an interruption or the wall-clock logic
introduced in 8c39e8d6) will cause the next notmuch new to think the
directory is still new.

We work around this by setting the new directory's database mtime to
-1 before scanning anything in the new directory.  This also obviates
the need for the workaround used in 8c39e8d6.
</content>
</entry>
</feed>
