From: Peter Wang Date: Sun, 20 Jan 2013 00:49:44 +0000 (+1100) Subject: [PATCH v3 00/20] insert command X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=eb28399ee2b42042f80272f7d5c7f3c36193b1af;p=notmuch-archives.git [PATCH v3 00/20] insert command --- diff --git a/7e/a6fa0cddf17f5eea9c9afd87e6debeeb39c91b b/7e/a6fa0cddf17f5eea9c9afd87e6debeeb39c91b new file mode 100644 index 000000000..8f08dcf57 --- /dev/null +++ b/7e/a6fa0cddf17f5eea9c9afd87e6debeeb39c91b @@ -0,0 +1,116 @@ +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 62FB9431FBF + for ; Sat, 19 Jan 2013 16:50:39 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, 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 FrA+chqZ5aFj for ; + Sat, 19 Jan 2013 16:50:35 -0800 (PST) +Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com + [209.85.220.49]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id E6918431FB6 + for ; Sat, 19 Jan 2013 16:50:34 -0800 (PST) +Received: by mail-pa0-f49.google.com with SMTP id bi1so2746847pad.8 + for ; Sat, 19 Jan 2013 16:50:32 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=x-received:from:to:cc:subject:date:message-id:x-mailer; + bh=LBphp1zPAwlrEwxaHA7ziDW2wphUdWd+1fVdD/ZPVLc=; + b=Fn1LISghxxbOYEoH3JMJX0omSdcRGFcH6/XvM82iVtkIChejU8vAvvi4YvcY/X+bNo + Id6MGJP9KBV94XfrA+laMY5TY8dtn6tIISx2JIdfsE6WG++xixww59haeUrMb+mxNq6k + Cyz2LT5oxt5ZFhtTcUOPH0A/CP3PoL8gTnnPj1YGxH+6da8eR1yCkvDDBMOhDttGTC4K + hbM8RBOatOg3DfcrbL+wA1EfpVXsRhtxDUt7Zfpq9mFmCziu+EDlekU75/pi7uNmE1rF + /7bKsUYXid0+fKvEmIzqmVenXlK4DWIikv3+/u4/aHSyaIzMx3CJ/bOe4CFIvo7+IXZY + O1Bw== +X-Received: by 10.68.132.34 with SMTP id or2mr18592990pbb.133.1358643032878; + Sat, 19 Jan 2013 16:50:32 -0800 (PST) +Received: from localhost (215.42.233.220.static.exetel.com.au. + [220.233.42.215]) + by mx.google.com with ESMTPS id ni8sm5791616pbc.70.2013.01.19.16.50.29 + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sat, 19 Jan 2013 16:50:31 -0800 (PST) +From: Peter Wang +To: notmuch@notmuchmail.org +Subject: [PATCH v3 00/20] insert command +Date: Sun, 20 Jan 2013 11:49:44 +1100 +Message-Id: <1358643004-14522-1-git-send-email-novalazy@gmail.com> +X-Mailer: git-send-email 1.7.12.1 +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, 20 Jan 2013 00:50:39 -0000 + +This mainly addresses review comments from v2 +and rebases on top of tag-util.c. + +Peter Wang (20): + cli: add stub for insert command + insert: open Maildir tmp file + insert: copy stdin to Maildir tmp file + insert: move file from Maildir tmp to new + insert: add new message to database + insert: apply default tags to new message + tag-util: do not reset list in parse_tag_command_line + tag-util: move out 'tag' command-line checks + insert: parse and apply command-line tag operations + insert: support --folder option + insert: prevent writes outside Maildir hierarchy + insert: add --create-folder option + insert: fsync after writing tmp file + insert: fsync new directory after rename + insert: fsync parent directory after mkdir + insert: trap SIGINT and clean up + insert: add copyright line from notmuch-deliver + man: document 'insert' command + man: reference notmuch-insert.1 + test: add tests for insert + + Makefile.local | 1 + + man/Makefile.local | 1 + + man/man1/notmuch-config.1 | 4 +- + man/man1/notmuch-count.1 | 4 +- + man/man1/notmuch-dump.1 | 4 +- + man/man1/notmuch-insert.1 | 59 +++++ + man/man1/notmuch-new.1 | 4 +- + man/man1/notmuch-reply.1 | 3 +- + man/man1/notmuch-restore.1 | 3 +- + man/man1/notmuch-search.1 | 3 +- + man/man1/notmuch-show.1 | 3 +- + man/man1/notmuch-tag.1 | 3 +- + man/man1/notmuch.1 | 3 +- + man/man5/notmuch-hooks.5 | 4 +- + man/man7/notmuch-search-terms.7 | 3 +- + notmuch-client.h | 3 + + notmuch-insert.c | 482 ++++++++++++++++++++++++++++++++++++++++ + notmuch-tag.c | 10 + + notmuch.c | 3 + + tag-util.c | 12 - + tag-util.h | 2 + + test/insert | 106 +++++++++ + test/notmuch-test | 1 + + 23 files changed, 692 insertions(+), 29 deletions(-) + create mode 100644 man/man1/notmuch-insert.1 + create mode 100644 notmuch-insert.c + create mode 100755 test/insert + +-- +1.7.12.1 +