[notmuch] Mailstore abstraction & maildir synchronization

Michal Sojka sojkam1 at fel.cvut.cz
Sat Mar 27 13:42:58 PDT 2010


On Fri, 26 Mar 2010, Michal Sojka wrote:
> On Wed, 24 Mar 2010, Stewart Smith wrote:
> > On Thu, 18 Mar 2010 16:39:36 +0100, Michal Sojka <sojkam1 at fel.cvut.cz> wrote:
> > > - Only file-based storage is suported. Notmuch access the files
> > >   directly, and not via the mailstore interface.
> > 
> > It'll be great when this is fixed... should be trivial to add a git
> > backend then.
> 
> Yes, it seems to be quite trivial. I'll probably look at this tomorrow.

Here it is. It was not so trivial, because it was needed to change
absolute paths to relative ones at several places.

So the changes since v2 are:

- "Tests for maildir-based mailstore": removed absolute paths as found
  on my computer.
- Added "Access messages through mail store interface"
- Added "Add 'cat' subcommand"

Michal Sojka (6):
  Mailstore abstraction interface
  Conversion to mailstore abstraction
  Add maildir-based mailstore
  Tests for maildir-based mailstore
  Access messages through mail store interface
  Add 'cat' subcommand

 emacs/notmuch.el        |    8 +-
 lib/Makefile.local      |    2 +
 lib/database-private.h  |    1 +
 lib/database.cc         |   36 ++-
 lib/index.cc            |    8 +-
 lib/mailstore-files.c   |  831 +++++++++++++++++++++++++++++++++++++++++++++++
 lib/mailstore-private.h |   59 ++++
 lib/mailstore.c         |   78 +++++
 lib/message-file.c      |    8 +-
 lib/message.cc          |   85 +++++-
 lib/notmuch-private.h   |   10 +-
 lib/notmuch.h           |   98 ++++++-
 lib/sha1.c              |    6 +-
 notmuch-client.h        |   12 +-
 notmuch-config.c        |   34 ++
 notmuch-count.c         |    3 +-
 notmuch-dump.c          |    3 +-
 notmuch-new.c           |  646 ++++---------------------------------
 notmuch-reply.c         |   13 +-
 notmuch-restore.c       |    3 +-
 notmuch-search-tags.c   |    3 +-
 notmuch-search.c        |    3 +-
 notmuch-show.c          |   79 +++++-
 notmuch-tag.c           |    3 +-
 notmuch.c               |    4 +
 show-message.c          |   14 +-
 test/t0006-maildir.sh   |  208 ++++++++++++
 test/test-lib.sh        |    7 +-
 28 files changed, 1611 insertions(+), 654 deletions(-)
 create mode 100644 lib/mailstore-files.c
 create mode 100644 lib/mailstore-private.h
 create mode 100644 lib/mailstore.c
 create mode 100755 test/t0006-maildir.sh






More information about the notmuch mailing list