]> git.notmuchmail.org Git - notmuch/commitdiff
lib: drop the deprecation message for single-message mbox files
authorJani Nikula <jani@nikula.org>
Sun, 23 Nov 2014 11:15:12 +0000 (13:15 +0200)
committerDavid Bremner <david@tethera.net>
Thu, 1 Jan 2015 15:47:47 +0000 (16:47 +0100)
We generally do not support mbox files, but for historical reasons
we've supported single-message mbox files, with a deprecation
message. We've tried dropping the support altogether, but backed out
of it because we'd need to stop indexing them, while keeping support
for previously indexed files. This would be more complicated than
simply supporting single-message mbox files. Therefore, drop the
deprecation message, and just silently accept single-message mboxes.

lib/message-file.c
test/T050-new.sh

index eda1b748e2022d73d2d8737f04151f342e0787ad..a41d9ad2a719df507d3091316d594bc38b3e4fc5 100644 (file)
@@ -170,25 +170,12 @@ _notmuch_message_file_parse (notmuch_message_file_t *message)
        goto DONE;
     }
 
-    if (is_mbox) {
-       if (! g_mime_parser_eos (parser)) {
-           /* This is a multi-message mbox. */
-           status = NOTMUCH_STATUS_FILE_NOT_EMAIL;
-           goto DONE;
-       }
+    if (is_mbox && ! g_mime_parser_eos (parser)) {
        /*
-        * For historical reasons, we support single-message mboxes,
-        * but this behavior is likely to change in the future, so
-        * warn.
+        * This is a multi-message mbox. (For historical reasons, we
+        * do support single-message mboxes.)
         */
-       static notmuch_bool_t mbox_warning = FALSE;
-       if (! mbox_warning) {
-           mbox_warning = TRUE;
-           fprintf (stderr, "\
-Warning: %s is an mbox containing a single message,\n\
-likely caused by misconfigured mail delivery.  Support for single-message\n\
-mboxes is deprecated and may be removed in the future.\n", message->filename);
-       }
+       status = NOTMUCH_STATUS_FILE_NOT_EMAIL;
     }
 
   DONE:
index ad46ee6d51b695f1144de64e406145d26f289452..7119356fc9fe1dc20d6a8d5f4be20f5117bb816a 100755 (executable)
@@ -173,11 +173,7 @@ Subject: Test mbox message 1
 Body.
 EOF
 output=$(NOTMUCH_NEW 2>&1)
-test_expect_equal "$output" \
-"Warning: ${MAIL_DIR}/mbox_file1 is an mbox containing a single message,
-likely caused by misconfigured mail delivery.  Support for single-message
-mboxes is deprecated and may be removed in the future.
-Added 1 new message to the database."
+test_expect_equal "$output" "Added 1 new message to the database."
 
 # This test requires that notmuch new has been run at least once.
 test_begin_subtest "Skip and report non-mail files"