From e86259f1e39b91339732ec8dc477c1bed81ae7a0 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Fri, 24 Oct 2014 08:30:33 +2000 Subject: [PATCH] [PATCH v3 1/9] lib: Add a ghost messages database feature --- a6/696541bb6454e3e35b994c829afe08a2d0093c | 120 ++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 a6/696541bb6454e3e35b994c829afe08a2d0093c diff --git a/a6/696541bb6454e3e35b994c829afe08a2d0093c b/a6/696541bb6454e3e35b994c829afe08a2d0093c new file mode 100644 index 000000000..f553c63a2 --- /dev/null +++ b/a6/696541bb6454e3e35b994c829afe08a2d0093c @@ -0,0 +1,120 @@ +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 26664429E37 + for ; Thu, 23 Oct 2014 05:31:07 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled +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 Vn1B6EnoXByo for ; + Thu, 23 Oct 2014 05:31:01 -0700 (PDT) +Received: from dmz-mailsec-scanner-7.mit.edu (dmz-mailsec-scanner-7.mit.edu + [18.7.68.36]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id CF78B431FDD + for ; Thu, 23 Oct 2014 05:30:52 -0700 (PDT) +X-AuditID: 12074424-f79346d000004923-06-5448f4fc4ba1 +Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) + (using TLS with cipher AES256-SHA (256/256 bits)) + (Client did not present a certificate) + by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP + id AB.1C.18723.CF4F8445; Thu, 23 Oct 2014 08:30:52 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id s9NCUmgN027180; + Thu, 23 Oct 2014 08:30:48 -0400 +Received: from drake.dyndns.org + (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com + [216.15.114.40]) (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s9NCUhqY008926 + (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); + Thu, 23 Oct 2014 08:30:47 -0400 +Received: from amthrax by drake.dyndns.org with local (Exim 4.84) + (envelope-from ) + id 1XhHXP-0007bc-5W; Thu, 23 Oct 2014 08:30:43 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH v3 1/9] lib: Add a ghost messages database feature +Date: Thu, 23 Oct 2014 08:30:33 -0400 +Message-Id: <1414067441-29054-2-git-send-email-aclements@csail.mit.edu> +X-Mailer: git-send-email 2.1.0 +In-Reply-To: <1414067441-29054-1-git-send-email-aclements@csail.mit.edu> +References: <1414067441-29054-1-git-send-email-aclements@csail.mit.edu> +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsUixG6novvni0eIwcbXahar5/JYXL85k9mB + yWPnrLvsHs9W3WIOYIrisklJzcksSy3St0vgyljQ85Gt4AZXxfPzk1gbGBdwdDFyckgImEjs + mrWLCcIWk7hwbz1bFyMXh5DAbCaJln/fWCGcjYwSy1fcZYZw7jBJPJvwmwnCWcIocf7sK7B+ + NgF9iRVrJ7GC2CIC0hI7784Gs5kFHCU+71/EBmILCzhJrPkxgR3EZhFQldi0+S5YL6+Au8Ti + NetZIe6Qk9iw+z8jiM0p4CGxZ8cdsF4hoJrtzw+yTmDkX8DIsIpRNiW3Sjc3MTOnODVZtzg5 + MS8vtUjXXC83s0QvNaV0EyM4lFxUdjA2H1I6xCjAwajEw1uR7BEixJpYVlyZe4hRkoNJSZQ3 + 5gFQiC8pP6UyI7E4I76oNCe1+BCjBAezkghv/AWgHG9KYmVValE+TEqag0VJnHfTD74QIYH0 + xJLU7NTUgtQimKwMB4eSBC8jMGaEBItS01Mr0jJzShDSTBycIMN5gIbf+gwyvLggMbc4Mx0i + f4pRUUqcNxkkIQCSyCjNg+uFxforRnGgV4R5N4BU8QDTBFz3K6DBTCBXbwAbXJKIkJJqYAwK + S2O+9a3+SYsUm1X8bDOnnYev8z7jjmjWMWjmyWU3XS5qa3eZRXpFd56+9v4OnUlTJu5e9k+2 + 8MCr3ppzPx9ftvk0vZvBaMf7hL36MbOi+f5dfXY6/4mI/FHv3Y9256d1xFUt5P5w7kz5S7+M + gG36PlLLZ0ZWlJ39odpksLrkbsSpn97JkUosxRmJhlrMRcWJALtMtkvQAgAA +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: Thu, 23 Oct 2014 12:31:07 -0000 + +From: Austin Clements + +This will be implemented over the next several patches. The feature +is not yet "enabled" (this does not add it to +NOTMUCH_FEATURES_CURRENT). +--- + lib/database-private.h | 7 +++++++ + lib/database.cc | 2 ++ + 2 files changed, 9 insertions(+) + +diff --git a/lib/database-private.h b/lib/database-private.h +index ca0751c..e2e4bc8 100644 +--- a/lib/database-private.h ++++ b/lib/database-private.h +@@ -85,6 +85,13 @@ enum _notmuch_features { + * + * Introduced: version 2. */ + NOTMUCH_FEATURE_BOOL_FOLDER = 1 << 3, ++ ++ /* If set, missing messages are stored in ghost mail documents. ++ * If unset, thread IDs of ghost messages are stored as database ++ * metadata instead of in ghost documents. ++ * ++ * Introduced: version 3. */ ++ NOTMUCH_FEATURE_GHOSTS = 1 << 4, + }; + + /* In C++, a named enum is its own type, so define bitwise operators +diff --git a/lib/database.cc b/lib/database.cc +index 1c6ffc5..8fd7fad 100644 +--- a/lib/database.cc ++++ b/lib/database.cc +@@ -286,6 +286,8 @@ static const struct { + "from/subject/message-ID in database", "w" }, + { NOTMUCH_FEATURE_BOOL_FOLDER, + "exact folder:/path: search", "rw" }, ++ { NOTMUCH_FEATURE_GHOSTS, ++ "mail documents for missing messages", "w"}, + }; + + const char * +-- +2.1.0 + -- 2.26.2