1 Return-Path: <tomi.ollila@iki.fi>
\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 8F88B431FC2
\r
6 for <notmuch@notmuchmail.org>; Sun, 23 Nov 2014 03:42:26 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id nwuDtlG9Gz7x for <notmuch@notmuchmail.org>;
\r
16 Sun, 23 Nov 2014 03:42:22 -0800 (PST)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 95C1D431FBC
\r
19 for <notmuch@notmuchmail.org>; Sun, 23 Nov 2014 03:42:22 -0800 (PST)
\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])
\r
21 by guru.guru-group.fi (Postfix) with ESMTP id 85535100090;
\r
22 Sun, 23 Nov 2014 13:42:15 +0200 (EET)
\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
24 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org
\r
25 Subject: Re: [PATCH] lib: drop the deprecation message for single-message
\r
27 In-Reply-To: <1416741312-26332-1-git-send-email-jani@nikula.org>
\r
28 References: <1416741312-26332-1-git-send-email-jani@nikula.org>
\r
29 User-Agent: Notmuch/0.19+6~g8725b09 (http://notmuchmail.org) Emacs/24.3.1
\r
30 (x86_64-unknown-linux-gnu)
\r
31 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
32 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
33 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
34 Date: Sun, 23 Nov 2014 13:42:15 +0200
\r
35 Message-ID: <m2k32mp2i0.fsf@guru.guru-group.fi>
\r
37 Content-Type: text/plain
\r
38 X-BeenThere: notmuch@notmuchmail.org
\r
39 X-Mailman-Version: 2.1.13
\r
41 List-Id: "Use and development of the notmuch mail system."
\r
42 <notmuch.notmuchmail.org>
\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
46 List-Post: <mailto:notmuch@notmuchmail.org>
\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
50 X-List-Received-Date: Sun, 23 Nov 2014 11:42:26 -0000
\r
52 On Sun, Nov 23 2014, Jani Nikula wrote:
\r
54 > We generally do not support mbox files, but for historical reasons
\r
55 > we've supported single-message mbox files, with a deprecation
\r
56 > message. We've tried dropping the support altogether, but backed out
\r
57 > of it because we'd need to stop indexing them, while keeping support
\r
58 > for previously indexed files. This would be more complicated than
\r
59 > simply supporting single-message mbox files. Therefore, drop the
\r
60 > deprecation message, and just silently accept single-message mboxes.
\r
63 LGTM. Tests pass. +1
\r
67 > lib/message-file.c | 21 ++++-----------------
\r
68 > test/T050-new.sh | 6 +-----
\r
69 > 2 files changed, 5 insertions(+), 22 deletions(-)
\r
71 > diff --git a/lib/message-file.c b/lib/message-file.c
\r
72 > index eda1b748e202..a41d9ad2a719 100644
\r
73 > --- a/lib/message-file.c
\r
74 > +++ b/lib/message-file.c
\r
75 > @@ -170,25 +170,12 @@ _notmuch_message_file_parse (notmuch_message_file_t *message)
\r
80 > - if (! g_mime_parser_eos (parser)) {
\r
81 > - /* This is a multi-message mbox. */
\r
82 > - status = NOTMUCH_STATUS_FILE_NOT_EMAIL;
\r
85 > + if (is_mbox && ! g_mime_parser_eos (parser)) {
\r
87 > - * For historical reasons, we support single-message mboxes,
\r
88 > - * but this behavior is likely to change in the future, so
\r
90 > + * This is a multi-message mbox. (For historical reasons, we
\r
91 > + * do support single-message mboxes.)
\r
93 > - static notmuch_bool_t mbox_warning = FALSE;
\r
94 > - if (! mbox_warning) {
\r
95 > - mbox_warning = TRUE;
\r
96 > - fprintf (stderr, "\
\r
97 > -Warning: %s is an mbox containing a single message,\n\
\r
98 > -likely caused by misconfigured mail delivery. Support for single-message\n\
\r
99 > -mboxes is deprecated and may be removed in the future.\n", message->filename);
\r
101 > + status = NOTMUCH_STATUS_FILE_NOT_EMAIL;
\r
105 > diff --git a/test/T050-new.sh b/test/T050-new.sh
\r
106 > index ad46ee6d51b6..7119356fc9fe 100755
\r
107 > --- a/test/T050-new.sh
\r
108 > +++ b/test/T050-new.sh
\r
109 > @@ -173,11 +173,7 @@ Subject: Test mbox message 1
\r
112 > output=$(NOTMUCH_NEW 2>&1)
\r
113 > -test_expect_equal "$output" \
\r
114 > -"Warning: ${MAIL_DIR}/mbox_file1 is an mbox containing a single message,
\r
115 > -likely caused by misconfigured mail delivery. Support for single-message
\r
116 > -mboxes is deprecated and may be removed in the future.
\r
117 > -Added 1 new message to the database."
\r
118 > +test_expect_equal "$output" "Added 1 new message to the database."
\r
120 > # This test requires that notmuch new has been run at least once.
\r
121 > test_begin_subtest "Skip and report non-mail files"
\r
125 > _______________________________________________
\r
126 > notmuch mailing list
\r
127 > notmuch@notmuchmail.org
\r
128 > http://notmuchmail.org/mailman/listinfo/notmuch
\r