1 Return-Path: <jani@nikula.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 89D67431FD9
\r
6 for <notmuch@notmuchmail.org>; Thu, 15 Jan 2015 09:20:01 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=1.738 tagged_above=-999 required=5
\r
12 tests=[DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_LOW=-0.7]
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id Jin5SmFeJTix for <notmuch@notmuchmail.org>;
\r
17 Thu, 15 Jan 2015 09:19:58 -0800 (PST)
\r
18 Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com
\r
19 [74.125.82.42]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
20 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
21 24C04431FD5 for <notmuch@notmuchmail.org>; Thu, 15 Jan 2015 09:19:58 -0800
\r
23 Received: by mail-wg0-f42.google.com with SMTP id k14so16229632wgh.1
\r
24 for <notmuch@notmuchmail.org>; Thu, 15 Jan 2015 09:19:57 -0800 (PST)
\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
26 d=1e100.net; s=20130820;
\r
27 h=x-gm-message-state:from:to:subject:in-reply-to:references
\r
28 :user-agent:date:message-id:mime-version:content-type;
\r
29 bh=wzK08QjoKRUVg/bT0rffPTKZCAXfSvGmgOyXTAuYJOs=;
\r
30 b=jvy7hhnnWakVMLOP8qUMmWGGCYNj+Kb3Q77g1BTxLSm2S+ZQEG0zzA/Y94jxRl1gmE
\r
31 WpJWqEGNG6ERUnB1jkGv6vF+vSFAYa5WvFzaIqlSa+IG1HVO/ttALW6b+hDNCVuHkqAD
\r
32 kKuZFzAgq3gR+qPSxnr08vfH0N7dbQ+DBvKFmW41RIURaRE8pxHl5HRHQR0H21E4HhMG
\r
33 erInMRCZK7R2YneyjXJY0G8j9csLVyfjaIaW5c35bSPxTD21sG3H8OIa1EJ91K62ADrR
\r
34 8AepoYm4bFsibBOGklKLGoVn7WK4KLd37l5fdAo4sLUDAhdoIobMLyuoFBYhOhPrMRNa
\r
37 ALoCoQnW41a/nqa87M0pRM3ObMo0lroGy0c9JaAX2ee1Z9GcF8yoC4YTKXSEoOpQW+BBOqHkYJd8
\r
38 X-Received: by 10.180.75.199 with SMTP id e7mr63214332wiw.21.1421342396384;
\r
39 Thu, 15 Jan 2015 09:19:56 -0800 (PST)
\r
40 Received: from localhost (mobile-internet-bcee14-89.dhcp.inet.fi.
\r
41 [188.238.20.89]) by mx.google.com with ESMTPSA id
\r
42 js5sm23546868wid.11.2015.01.15.09.19.55
\r
43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
\r
44 Thu, 15 Jan 2015 09:19:55 -0800 (PST)
\r
45 From: Jani Nikula <jani@nikula.org>
\r
46 To: Todd <todd@electricoding.com>, notmuch@notmuchmail.org,
\r
47 Austin Clements <aclements@csail.mit.edu>
\r
48 Subject: Re: [PATCH v2 2/5] Add the NOTMUCH_FEATURE_INDEXED_MIMETYPES
\r
50 In-Reply-To: <1421193628-2699-3-git-send-email-todd@electricoding.com>
\r
51 References: <1421193628-2699-1-git-send-email-todd@electricoding.com>
\r
52 <1421193628-2699-3-git-send-email-todd@electricoding.com>
\r
53 User-Agent: Notmuch/0.19+19~g9060a1f (http://notmuchmail.org) Emacs/24.4.1
\r
54 (x86_64-pc-linux-gnu)
\r
55 Date: Thu, 15 Jan 2015 19:20:08 +0200
\r
56 Message-ID: <87y4p47ygn.fsf@nikula.org>
\r
58 Content-Type: text/plain
\r
59 X-BeenThere: notmuch@notmuchmail.org
\r
60 X-Mailman-Version: 2.1.13
\r
62 List-Id: "Use and development of the notmuch mail system."
\r
63 <notmuch.notmuchmail.org>
\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
67 List-Post: <mailto:notmuch@notmuchmail.org>
\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
70 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
71 X-List-Received-Date: Thu, 15 Jan 2015 17:20:01 -0000
\r
74 Austin, would you mind having a look at this one please?
\r
79 On Wed, 14 Jan 2015, Todd <todd@electricoding.com> wrote:
\r
81 > lib/database-private.h | 15 ++++++++++++---
\r
82 > lib/database.cc | 10 ++++++++--
\r
83 > 2 files changed, 20 insertions(+), 5 deletions(-)
\r
85 > diff --git a/lib/database-private.h b/lib/database-private.h
\r
86 > index 15e03cc..6d6fa2c 100644
\r
87 > --- a/lib/database-private.h
\r
88 > +++ b/lib/database-private.h
\r
89 > @@ -92,6 +92,14 @@ enum _notmuch_features {
\r
91 > * Introduced: version 3. */
\r
92 > NOTMUCH_FEATURE_GHOSTS = 1 << 4,
\r
95 > + /* If set, then the database was created after the introduction of
\r
96 > + * indexed mime types. If unset, then the database may contain a
\r
97 > + * mixture of messages with indexed and non-indexed mime types.
\r
99 > + * Introduced: version 3. */
\r
100 > + NOTMUCH_FEATURE_INDEXED_MIMETYPES = 1 << 5,
\r
103 > /* In C++, a named enum is its own type, so define bitwise operators
\r
104 > @@ -161,9 +169,10 @@ struct _notmuch_database {
\r
106 > /* Current database features. If any of these are missing from a
\r
107 > * database, request an upgrade.
\r
108 > - * NOTMUCH_FEATURE_FROM_SUBJECT_ID_VALUES is not included because
\r
109 > - * upgrade doesn't currently introduce the feature (though brand new
\r
110 > - * databases will have it). */
\r
111 > + * NOTMUCH_FEATURE_FROM_SUBJECT_ID_VALUES and
\r
112 > + * NOTMUCH_FEATURE_INDEXED_MIMETYPES are not included because upgrade
\r
113 > + * doesn't currently introduce the features (though brand new databases
\r
114 > + * will have it). */
\r
115 > #define NOTMUCH_FEATURES_CURRENT \
\r
116 > (NOTMUCH_FEATURE_FILE_TERMS | NOTMUCH_FEATURE_DIRECTORY_DOCS | \
\r
117 > NOTMUCH_FEATURE_BOOL_FOLDER | NOTMUCH_FEATURE_GHOSTS)
\r
118 > diff --git a/lib/database.cc b/lib/database.cc
\r
119 > index 3601f9d..2de60f8 100644
\r
120 > --- a/lib/database.cc
\r
121 > +++ b/lib/database.cc
\r
122 > @@ -304,6 +304,11 @@ static const struct {
\r
123 > "exact folder:/path: search", "rw" },
\r
124 > { NOTMUCH_FEATURE_GHOSTS,
\r
125 > "mail documents for missing messages", "w"},
\r
126 > + /* Knowledge of the index mime-types are not required for reading
\r
127 > + * a database because a reader will just be unable to query
\r
129 > + { NOTMUCH_FEATURE_INDEXED_MIMETYPES,
\r
130 > + "mime-types in database", "w"},
\r
134 > @@ -646,9 +651,10 @@ notmuch_database_create (const char *path, notmuch_database_t **database)
\r
138 > - /* Upgrade doesn't add this feature to existing databases, but new
\r
139 > - * databases have it. */
\r
140 > + /* Upgrade doesn't add these feature to existing databases, but
\r
141 > + * new databases have them. */
\r
142 > notmuch->features |= NOTMUCH_FEATURE_FROM_SUBJECT_ID_VALUES;
\r
143 > + notmuch->features |= NOTMUCH_FEATURE_INDEXED_MIMETYPES;
\r
145 > status = notmuch_database_upgrade (notmuch, NULL, NULL);
\r
150 > _______________________________________________
\r
151 > notmuch mailing list
\r
152 > notmuch@notmuchmail.org
\r
153 > http://notmuchmail.org/mailman/listinfo/notmuch
\r