[PATCH v2 0/8] URI-based modular mail stores

Ethan Glasser-Camp ethan.glasser.camp at gmail.com
Sun Jul 1 09:39:42 PDT 2012


Hi guys,

Based on the feedback from the last patch series (thanks a lot to Mark
Walters and Jani Nikula for taking the time to look at it!) I revised
this patch series to not change the handling of maildir filenames at
all. This meant not having to give up relocatability, and also
simplified the patch series a great deal (down to 8 patches instead of
14). I also noticed that there is only one use of notmuch_sha1_of_file
and it is only used on messages, so instead of splitting the function
as in the last patch series, I just renamed it.

As a reminder, this patch series proposes a mailstore.c module, which
is responsible for accessing "filenames" which, in addition to
ordinary filenames, can also be URIs.

- Patches 1-5 add the mailstore module and complementary interfaces,
  such as a new.scan option that tell notmuch-new where to look for
  other mail.

- Patches 6-8 prove the validity of this interface by using it to add
  mbox support.

I know this is still pretty big and does two different things, but
mbox support relies on URI support, and URI support is meaningless
without some new kind of mail store.

There are a few missing features in this patch series, but I was
hesitant to add them because I didn't want to make the series any more
complex. To wit, future series could include:

- notmuch-new.c: some code is shared between add_files_recursive and
  add_files_mbox{,_file}, specifically the code that scans directories
  for subdirectories and then recurses, and the code that scans
  directories for regular files and then does something else. Some
  guidance on how best to refactor that, or whether to even bother,
  would be appreciated.

- notmuch-config.c: I think instead of one option for new.scan, it
  would be good to have a section called [urls], for which each entry
  is name=url. This would also allow relocatability for mail not
  located in the central maildir (store the name in Xapian, and
  translate it to the URL on the way in/out).

- notmuch-new.c: code could be added to notice when we "walked past" a
  message in an mbox file and mark it as deleted, as is currently done
  with maildir.

- notmuch-new.c: no support for count_files kinds of operations
  exists.

Unlike the previous patch series, I would appreciate it if you
reviewed this one :)

Thanks for your time!

Ethan



More information about the notmuch mailing list