Re: WARNING: database upgrade coming
authorJani Nikula <jani@nikula.org>
Mon, 17 Mar 2014 21:31:40 +0000 (23:31 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:00:48 +0000 (10:00 -0800)
bb/4dc8937fc7ccd499b258aa6f37b22128c72c52 [new file with mode: 0644]

diff --git a/bb/4dc8937fc7ccd499b258aa6f37b22128c72c52 b/bb/4dc8937fc7ccd499b258aa6f37b22128c72c52
new file mode 100644 (file)
index 0000000..420a9c6
--- /dev/null
@@ -0,0 +1,108 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 2F1F7431FC0\r
+       for <notmuch@notmuchmail.org>; Mon, 17 Mar 2014 14:31:54 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id Fun51tjKtDub for <notmuch@notmuchmail.org>;\r
+       Mon, 17 Mar 2014 14:31:46 -0700 (PDT)\r
+Received: from mail-ee0-f43.google.com (mail-ee0-f43.google.com\r
+ [74.125.83.43])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ 42397431FBD   for <notmuch@notmuchmail.org>; Mon, 17 Mar 2014 14:31:46 -0700\r
+ (PDT)\r
+Received: by mail-ee0-f43.google.com with SMTP id e53so4624659eek.2\r
+       for <notmuch@notmuchmail.org>; Mon, 17 Mar 2014 14:31:44 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=1e100.net; s=20130820;\r
+       h=x-gm-message-state:from:to:subject:in-reply-to:references\r
+       :user-agent:date:message-id:mime-version:content-type;\r
+       bh=7xsJrY/MSH2diqi7AKzeg3AOXZ8oL+bwzX0L765wcB8=;\r
+       b=TzMHuVBgTK1JxOD/OM+p6yWHvsgyTeYen4E/g0rjzR5E59E7Rsix5Y2WEcaOCE7nVp\r
+       8h8qVYU+cqcfP7wkfu7Idtfe4J+kcFLFLQl7oIyIWZHeY9Ww8+9T8Q68K2O54OobqN3A\r
+       sQ9+fO5ajYuL9lbvvx3RQFKwRe0TTXrKUGeXaQERFzSHcBz0Dnlf13u+TQz3JvjpbekZ\r
+       uso+lH8HkpzM/GuPHukCopuqqPHk0flz5gC+UyPojakSO5PUhonAEmyEEgEtdOm03Hfs\r
+       U+C7XWRbdoRLCDgTLDxvdduvHPfQa1137yZvjPYFTWVzcX98ZhdgIEdZGOs8bWOrzTy8\r
+       Vv1w==\r
+X-Gm-Message-State:\r
+ ALoCoQnBh5GAlgO1l+pL4qunLaTdz+79D8hSukwrYgHUf1gmePrfKZ6nJ76o+K4tZgxfRO28HGaO\r
+X-Received: by 10.15.44.3 with SMTP id y3mr25913732eev.58.1395091903589;\r
+       Mon, 17 Mar 2014 14:31:43 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
+       [88.195.111.91])\r
+       by mx.google.com with ESMTPSA id o7sm29941417eew.25.2014.03.17.14.31.42\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Mon, 17 Mar 2014 14:31:42 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: David Bremner <david@tethera.net>,\r
+       Jameson Graef Rollins <jrollins@finestructure.net>,\r
+       Notmuch list <notmuch@notmuchmail.org>\r
+Subject: Re: WARNING: database upgrade coming\r
+In-Reply-To: <87eh20v7zc.fsf@zancas.localnet>\r
+References: <874n37a017.fsf@zancas.localnet>\r
+       <87txawkam3.fsf@servo.finestructure.net>\r
+       <87a9cood0l.fsf@nikula.org> <87eh20v7zc.fsf@zancas.localnet>\r
+User-Agent: Notmuch/0.17+142~g30045abd801f (http://notmuchmail.org)\r
+       Emacs/24.3.1 (x86_64-pc-linux-gnu)\r
+Date: Mon, 17 Mar 2014 23:31:40 +0200\r
+Message-ID: <877g7so6kj.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 17 Mar 2014 21:31:54 -0000\r
+\r
+On Mon, 17 Mar 2014, David Bremner <david@tethera.net> wrote:\r
+> Jani Nikula <jani@nikula.org> writes:\r
+>\r
+>>\r
+>> FWIW it should always be safe to interrupt the upgrade; I know we don't\r
+>> inform the user about this.\r
+>>\r
+>\r
+> With that in mind, would it be reasonable/worthwhile to print a 5 second (or so)\r
+> countdown before running the upgrade? But then people who run it\r
+> non-interactively would still automagically get the upgrade, just 5\r
+> seconds later.\r
+\r
+Something like this? Just insert text that makes sense to the user. ;)\r
+\r
+Jani.\r
+\r
+\r
+diff --git a/notmuch-new.c b/notmuch-new.c\r
+index 82acf695353e..f256a3142eb0 100644\r
+--- a/notmuch-new.c\r
++++ b/notmuch-new.c\r
+@@ -989,8 +989,11 @@ notmuch_new_command (notmuch_config_t *config, int argc, char *argv[])\r
+           return EXIT_FAILURE;\r
\r
+       if (notmuch_database_needs_upgrade (notmuch)) {\r
+-          if (add_files_state.verbosity >= VERBOSITY_NORMAL)\r
++          if (add_files_state.verbosity >= VERBOSITY_NORMAL) {\r
+               printf ("Welcome to a new version of notmuch! Your database will now be upgraded.\n");\r
++              sleep (5);\r
++              printf ("Now really.\n");\r
++          }\r
+           gettimeofday (&add_files_state.tv_start, NULL);\r
+           notmuch_database_upgrade (notmuch,\r
+                                     add_files_state.verbosity >= VERBOSITY_NORMAL ? upgrade_print_progress : NULL,\r