From: Jani Nikula Date: Sun, 28 Sep 2014 14:40:56 +0000 (+0300) Subject: [PATCH v2 0/3] notmuch insert failure paths and post-insert hook X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=89efa63b8dd50dc8fe2c38332aa441e6da58b503;p=notmuch-archives.git [PATCH v2 0/3] notmuch insert failure paths and post-insert hook --- diff --git a/b0/350c2725588423e466833d4b1b6f920b58f09e b/b0/350c2725588423e466833d4b1b6f920b58f09e new file mode 100644 index 000000000..fcb9f4f0b --- /dev/null +++ b/b0/350c2725588423e466833d4b1b6f920b58f09e @@ -0,0 +1,91 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id BCF5C431FC2 + for ; Sun, 28 Sep 2014 07:41:12 -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 2SYfkbMVe9VA for ; + Sun, 28 Sep 2014 07:41:05 -0700 (PDT) +Received: from mail-we0-f171.google.com (mail-we0-f171.google.com + [74.125.82.171]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id C0D82431FAE + for ; Sun, 28 Sep 2014 07:41:04 -0700 (PDT) +Received: by mail-we0-f171.google.com with SMTP id k48so11635014wev.30 + for ; Sun, 28 Sep 2014 07:41:03 -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:cc:subject:date:message-id; + bh=3kQEvliXIuPTYwi1TemmLC/wpS9if53/BvqewbUfAf4=; + b=VxEKK063Efzf1hlBQrocoQY0enRzD9/J9Flj8wvLPna1QX9A8yYo+Ey2pnOJPpqs1h + 3D0l6ZGawbhQB3ja6D1biO8e/CwlOb8eMOc+mZExwAc0lvexAZS6KLnjxYs7VJ0zaK2i + SrKbGFlbAFOyq9+f1FOYcyauabOv27IPyj/08gT8HZL0hpFKk2nz/SRCwtDG7EIgCuvh + WV9LOHELs31fJCHPnc/1du5atlgXX/cY23QDgj5RWsG0vfAFWtFvQ2XuSI4xmHul83kv + OABcwEcIFEVSTS1/1lQNM+MNeRWoCAKD4hyhj/0Q6pJwmhb/3siqgEegc6OQ7d2jM5fy + DPbg== +X-Gm-Message-State: + ALoCoQl1FQCgtUPqm2IdYFJvewnu9vbleC1NZPocviNNMytlOIzu/ZYV1N80ifALK70m3DtOvihM +X-Received: by 10.194.93.7 with SMTP id cq7mr38319913wjb.58.1411915262391; + Sun, 28 Sep 2014 07:41:02 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw2-58c36c-245.dhcp.inet.fi. + [88.195.108.245]) + by mx.google.com with ESMTPSA id pn5sm12715088wjc.4.2014.09.28.07.41.01 + for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sun, 28 Sep 2014 07:41:01 -0700 (PDT) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH v2 0/3] notmuch insert failure paths and post-insert hook +Date: Sun, 28 Sep 2014 17:40:56 +0300 +Message-Id: +X-Mailer: git-send-email 2.1.0 +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: Sun, 28 Sep 2014 14:41:12 -0000 + +This is v2 of the final three patches of [1]. The failure paths have +been improved further still, with some new warning messages on any +cleanup errors as well. Man pages have been updated. + +Tests are still lacking. The post-insert hook should be simple, but I +haven't had a sudden outburst of creativity in figuring out how to test +all the fail scenarios. + +BR, +Jani. + + +[1] id:cover.1411379395.git.jani@nikula.org + +Jani Nikula (3): + cli/insert: add fail path to add_file_to_database + cli/insert: require succesful message indexing for success status + cli/insert: add post-insert hook + + doc/man1/notmuch-insert.rst | 26 ++++++-- + doc/man5/notmuch-hooks.rst | 11 ++++ + notmuch-insert.c | 140 +++++++++++++++++++++++++++++++------------- + test/T070-insert.sh | 2 +- + 4 files changed, 132 insertions(+), 47 deletions(-) + +-- +2.1.0 +