[PATCH 0/3] Speed up notmuch new for unchanged directories

2012-06-26 Thread Sascha Silbe
maxima, if you'd like to check the math. -- http://sascha.silbe.org/ http://www.infra-silbe.de/ -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 489 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120626/5ac1aa57/attachment.pgp>

[RFC PATCH 01/14] All access to mail files goes through the mailstore module

2012-06-26 Thread Ethan Glasser-Camp
This commit introduces the mailstore module which provides two functions, notmuch_mailstore_open and notmuch_mailstore_close. These functions are currently just stub calls to fopen and fclose, but later can be made more complex in order to support mail storage systems where one message might not

[RFC PATCH 02/14] Introduce uriparser

2012-06-26 Thread Ethan Glasser-Camp
Seeing as there is no glib-standard way to parse URIs, an external library is needed. This commit introduces another program in compat/ and a stanza in ./configure to test if uriparser is there. Signed-off-by: Ethan Glasser-Camp et...@betacantrips.com --- Makefile.local |2 +-

[RFC PATCH 03/14] mailstore can read from maildir: URLs

2012-06-26 Thread Ethan Glasser-Camp
No code uses this yet. Signed-off-by: Ethan Glasser-Camp et...@betacantrips.com --- lib/mailstore.c | 37 - 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/lib/mailstore.c b/lib/mailstore.c index 48acd47..ae02c12 100644 --- a/lib/mailstore.c

[RFC PATCH 04/14] Not all filenames need to be converted to absolute paths

2012-06-26 Thread Ethan Glasser-Camp
_notmuch_message_ensure_filename_list converts relative paths, such as those stored in Xapian until now, to absolute paths. However, URLs are already absolute, and prepending the database path will just confuse matters. Signed-off-by: Ethan Glasser-Camp et...@betacantrips.com --- lib/message.cc

[RFC PATCH 05/14] new: use new URL-based filenames for messages

2012-06-26 Thread Ethan Glasser-Camp
This commit breaks a bunch of tests; fixes follow. Signed-off-by: Ethan Glasser-Camp et...@betacantrips.com --- notmuch-new.c | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index 938ae29..1f11b2c 100644 ---

[RFC PATCH 06/14] maildir URIs can be used in tags_to_maildir_flags

2012-06-26 Thread Ethan Glasser-Camp
A better fix would probably be based on scheme. Signed-off-by: Ethan Glasser-Camp et...@betacantrips.com --- lib/message.cc | 51 ++- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/lib/message.cc b/lib/message.cc index

[RFC PATCH 07/14] Update tests that need to see filenames to use URIs

2012-06-26 Thread Ethan Glasser-Camp
This fixes all tests except atomicity, which should be next. Signed-off-by: Ethan Glasser-Camp et...@betacantrips.com --- test/emacs |2 +- test/json|4 ++-- test/maildir-sync|7 --- test/multipart |4 ++--

[RFC PATCH 09/14] Fix atomicity test to work without relocatable mailstores

2012-06-26 Thread Ethan Glasser-Camp
Instead of assuming that the mailstore doesn't store its absolute filenames, we use a symlink that can change back and forth. As long as filenames contain this symlink, they can work in either the real database, or the current snapshot. Signed-off-by: Ethan Glasser-Camp et...@betacantrips.com ---

[RFC PATCH 10/14] new: add scan option

2012-06-26 Thread Ethan Glasser-Camp
This is just a quick hack to get started on adding an mbox backend. The fact that the default maildir is scanned automagically is a little weird, but it doesn't do any harm unless you decide to put mail there that you really don't want indexed. Signed-off-by: Ethan Glasser-Camp

[RFC PATCH 11/14] notmuch-new: pull out useful bits of add_files_recursive

2012-06-26 Thread Ethan Glasser-Camp
This is part of notmuch-new refactor phase 1: make add_files stuff safe for other backends. add_files_recursive is essentially a maildir-crawling function that periodically adds files to the database or adds filenames to remove_files or remove_directory lists. I don't see an easy way to adapt

[RFC PATCH 12/14] mailstore: support for mbox:// URIs

2012-06-26 Thread Ethan Glasser-Camp
Signed-off-by: Ethan Glasser-Camp et...@betacantrips.com --- lib/mailstore.c | 85 +++ 1 file changed, 85 insertions(+) diff --git a/lib/mailstore.c b/lib/mailstore.c index ae02c12..e8d9bc1 100644 --- a/lib/mailstore.c +++ b/lib/mailstore.c

[RFC PATCH 13/14] Tests for mbox support

2012-06-26 Thread Ethan Glasser-Camp
These need to be improved, rather than hard-coding byte offsets. Signed-off-by: Ethan Glasser-Camp et...@betacantrips.com --- test/mbox | 59 + test/notmuch-test |1 + 2 files changed, 60 insertions(+) create mode 100755

[RFC PATCH 14/14] new: Add scan support for mbox:// URIs

2012-06-26 Thread Ethan Glasser-Camp
A lot of code is duplicated from maildir, I don't think I handled all those errors correctly, and I didn't report any progress. Signed-off-by: Ethan Glasser-Camp et...@betacantrips.com --- notmuch-new.c | 299 +++-- 1 file changed, 289