From 3bb2c2b193a1dde45f266297e453771468e0cc73 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Sat, 27 Mar 2010 21:42:58 +0100 Subject: [PATCH] Re: [notmuch] Mailstore abstraction & maildir synchronization --- e6/06d2b5e78992ea168941d6be23304d74a32280 | 128 ++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 e6/06d2b5e78992ea168941d6be23304d74a32280 diff --git a/e6/06d2b5e78992ea168941d6be23304d74a32280 b/e6/06d2b5e78992ea168941d6be23304d74a32280 new file mode 100644 index 000000000..4eac9828f --- /dev/null +++ b/e6/06d2b5e78992ea168941d6be23304d74a32280 @@ -0,0 +1,128 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id D6E214196F3 + for ; Sat, 27 Mar 2010 13:43:03 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -1.9 +X-Spam-Level: +X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 + tests=[BAYES_00=-1.9] autolearn=ham +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id LTHPebT5JTBc for ; + Sat, 27 Mar 2010 13:43:02 -0700 (PDT) +Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) + by olra.theworths.org (Postfix) with ESMTP id 82A354196F2 + for ; Sat, 27 Mar 2010 13:43:02 -0700 (PDT) +Received: from localhost (unknown [192.168.200.4]) + by max.feld.cvut.cz (Postfix) with ESMTP id F343F19F3419; + Sat, 27 Mar 2010 21:43:00 +0100 (CET) +X-Virus-Scanned: IMAP AMAVIS +Received: from max.feld.cvut.cz ([192.168.200.1]) + by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, + port 10044) + with ESMTP id 8ncqEvcYq+H9; Sat, 27 Mar 2010 21:42:59 +0100 (CET) +Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) + by max.feld.cvut.cz (Postfix) with ESMTP id 73BC719F3411; + Sat, 27 Mar 2010 21:42:59 +0100 (CET) +Received: from steelpick.2x.cz (r5da224.net.upc.cz [86.49.116.224]) + (Authenticated sender: sojkam1) + by imap.feld.cvut.cz (Postfix) with ESMTPSA id 5A0E4FA003; + Sat, 27 Mar 2010 21:42:59 +0100 (CET) +Received: from wsh by steelpick.2x.cz with local (Exim 4.71) + (envelope-from ) + id 1NvcqQ-0001n4-Ay; Sat, 27 Mar 2010 21:42:58 +0100 +From: Michal Sojka +To: Stewart Smith , notmuch@notmuchmail.org +In-Reply-To: <87sk7m91mt.fsf@steelpick.2x.cz> +References: <1268926780-20045-1-git-send-email-sojkam1@fel.cvut.cz> + <874ok68g1z.fsf@willster.local.flamingspork.com> + <87sk7m91mt.fsf@steelpick.2x.cz> +Date: Sat, 27 Mar 2010 21:42:58 +0100 +Message-ID: <8739zlijhp.fsf@steelpick.2x.cz> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Subject: Re: [notmuch] Mailstore abstraction & maildir synchronization +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 27 Mar 2010 20:43:04 -0000 + +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 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 + + + + -- 2.26.2