Re: [PATCH] doc: Allow rst2man.py as an alternative to rst2man
[notmuch-archives.git] / 93 / 609e473e5f95dd685ada43ec3acb759ffad2e0
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 18EC9431FBC\r
6         for <notmuch@notmuchmail.org>; Tue,  5 Aug 2014 00:24:00 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\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 hBmI7itpaxKB for <notmuch@notmuchmail.org>;\r
16         Tue,  5 Aug 2014 00:23:52 -0700 (PDT)\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 B2403431FAE\r
19         for <notmuch@notmuchmail.org>; Tue,  5 Aug 2014 00:23:52 -0700 (PDT)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id 4016C100051;\r
22         Tue,  5 Aug 2014 10:23:42 +0300 (EEST)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org\r
25 Subject: Re: [PATCH] new: Report and abort on upgrade failure\r
26 In-Reply-To: <1407202186-3968-1-git-send-email-amdragon@mit.edu>\r
27 References: <1407202186-3968-1-git-send-email-amdragon@mit.edu>\r
28 User-Agent: Notmuch/0.18.1+25~gdaf4b6f (http://notmuchmail.org) Emacs/24.3.1\r
29         (x86_64-unknown-linux-gnu)\r
30 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
31         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
32         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
33 Date: Tue, 05 Aug 2014 10:23:42 +0300\r
34 Message-ID: <m2wqan4cxt.fsf@guru.guru-group.fi>\r
35 MIME-Version: 1.0\r
36 Content-Type: text/plain\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Tue, 05 Aug 2014 07:24:00 -0000\r
50 \r
51 On Tue, Aug 05 2014, Austin Clements <amdragon@MIT.EDU> wrote:\r
52 \r
53 > Previously the return status of notmuch_database_upgrade went\r
54 > completely unchecked.\r
55 > ---\r
56 \r
57 LGTM.\r
58 \r
59 Tomi\r
60 \r
61 \r
62 >  notmuch-new.c | 15 +++++++++++----\r
63 >  1 file changed, 11 insertions(+), 4 deletions(-)\r
64 >\r
65 > diff --git a/notmuch-new.c b/notmuch-new.c\r
66 > index b7590a8..ddf42c1 100644\r
67 > --- a/notmuch-new.c\r
68 > +++ b/notmuch-new.c\r
69 > @@ -923,6 +923,7 @@ notmuch_new_command (notmuch_config_t *config, int argc, char *argv[])\r
70 >      notmuch_bool_t timer_is_active = FALSE;\r
71 >      notmuch_bool_t no_hooks = FALSE;\r
72 >      notmuch_bool_t quiet = FALSE, verbose = FALSE;\r
73 > +    notmuch_status_t status;\r
74 >  \r
75 >      add_files_state.verbosity = VERBOSITY_NORMAL;\r
76 >      add_files_state.debug = FALSE;\r
77 > @@ -1019,9 +1020,16 @@ notmuch_new_command (notmuch_config_t *config, int argc, char *argv[])\r
78 >           }\r
79 >  \r
80 >           gettimeofday (&add_files_state.tv_start, NULL);\r
81 > -         notmuch_database_upgrade (notmuch,\r
82 > -                                   add_files_state.verbosity >= VERBOSITY_NORMAL ? upgrade_print_progress : NULL,\r
83 > -                                   &add_files_state);\r
84 > +         status = notmuch_database_upgrade (\r
85 > +             notmuch,\r
86 > +             add_files_state.verbosity >= VERBOSITY_NORMAL ? upgrade_print_progress : NULL,\r
87 > +             &add_files_state);\r
88 > +         if (status) {\r
89 > +             printf ("Upgrade failed: %s\n",\r
90 > +                     notmuch_status_to_string (status));\r
91 > +             notmuch_database_destroy (notmuch);\r
92 > +             return EXIT_FAILURE;\r
93 > +         }\r
94 >           if (add_files_state.verbosity >= VERBOSITY_NORMAL)\r
95 >               printf ("Your notmuch database has now been upgraded.\n");\r
96 >       }\r
97 > @@ -1090,7 +1098,6 @@ notmuch_new_command (notmuch_config_t *config, int argc, char *argv[])\r
98 >      }\r
99 >  \r
100 >      for (f = add_files_state.directory_mtimes->head; f && !interrupted; f = f->next) {\r
101 > -     notmuch_status_t status;\r
102 >       notmuch_directory_t *directory;\r
103 >       status = notmuch_database_get_directory (notmuch, f->filename, &directory);\r
104 >       if (status == NOTMUCH_STATUS_SUCCESS && directory) {\r
105 > -- \r
106 > 2.0.0\r
107 >\r
108 > _______________________________________________\r
109 > notmuch mailing list\r
110 > notmuch@notmuchmail.org\r
111 > http://notmuchmail.org/mailman/listinfo/notmuch\r