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