From: Jani Nikula Date: Sat, 14 Apr 2012 12:15:25 +0000 (+0300) Subject: [PATCH v2 0/6] batch tagging support: "notmuch tag --stdin" X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=bade626e914a2e7709d82e06b7427677d25dfe21;p=notmuch-archives.git [PATCH v2 0/6] batch tagging support: "notmuch tag --stdin" --- diff --git a/15/6a5ad36f87964cd06dc3a5b24511948bcb1fde b/15/6a5ad36f87964cd06dc3a5b24511948bcb1fde new file mode 100644 index 000000000..d6ceb62f9 --- /dev/null +++ b/15/6a5ad36f87964cd06dc3a5b24511948bcb1fde @@ -0,0 +1,111 @@ +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 EA327431FAF + for ; Sat, 14 Apr 2012 05:15:39 -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 YqorxJ8XWVRE for ; + Sat, 14 Apr 2012 05:15:37 -0700 (PDT) +Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com + [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 5E36C431FAE + for ; Sat, 14 Apr 2012 05:15:37 -0700 (PDT) +Received: by lbdb5 with SMTP id b5so40243lbd.26 + for ; Sat, 14 Apr 2012 05:15:35 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; + bh=X9WNAza30JTCUSz9OcvVZmEcXc20o8V41Afm7ARg1VE=; + b=Iny5+c5Ohrv8LZn8YHZt1rDAqLJE+p+kRdcfi6WcFby3SoIQRfk/kab+ZFTlUwYR8J + ATVJEuEhyRh4y286xMr8gD+K+KPlW3gUgU84YzvbEiDDs5s8D8lbsKnR/5kQ+cUf5dyH + 0qNZRU/uQK8vaUEq4lfaZM5hYsHqwZXbhlMYDg/c5oZX8ai2xQ7GS+D+je8XpvP6WOJ8 + fPZdYuKpYFB19FYtc3mKHbozqR+tijnZ6WZDgvH7dziUVo6VWF1OSMzapMfSY1F9idC2 + R6XrVLz9i6uCpSBIK3BOAne/cmlJxqZKZqnnDtXb0RVIHhpqj4Pt+f5iT3+W0bmUWMkF + P5aA== +Received: by 10.152.102.228 with SMTP id fr4mr4478989lab.23.1334405735578; + Sat, 14 Apr 2012 05:15:35 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw4-fe50dc00-68.dhcp.inet.fi. + [80.220.80.68]) + by mx.google.com with ESMTPS id te8sm12652318lab.3.2012.04.14.05.15.33 + (version=SSLv3 cipher=OTHER); Sat, 14 Apr 2012 05:15:34 -0700 (PDT) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH v2 0/6] batch tagging support: "notmuch tag --stdin" +Date: Sat, 14 Apr 2012 15:15:25 +0300 +Message-Id: +X-Mailer: git-send-email 1.7.5.4 +X-Gm-Message-State: + ALoCoQmdHvzFKrLcan7+8KQQQFl8F754uXiTWdmXl2j5R0t3oNe5Pa3JiYi6wM2ZbIkzOMm9pOKb +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: Sat, 14 Apr 2012 12:15:40 -0000 + +v2 of id:"cover.1333231401.git.jani@nikula.org" + +This series adds support for batch tagging through stdin to "notmuch +tag". This should be useful and efficient for e.g. initial tagging +scripts. Also, this adds locking around a batch of tag changes, which is +also useful for initial tagging scripts. See the test patch for an +example using a "here document". + +The idea is that the same format (and parser) would be later used for +notmuch dump/restore, building on David's earlier work at +id:"1324214111-32079-1-git-send-email-david@tethera.net". + +The v2 only has non-functional changes per David's comments, and +squashes the first three patches of v1 into one. + +BR, +Jani. + + +David Bremner (3): + hex-escape: (en|de)code strings to/from restricted character set + test/hex-xcode: new test binary + test/hex-escaping: new test for hex escaping routines + +Jani Nikula (3): + cli: add support for batch tagging operations to "notmuch tag" + test: add test for notmuch tag --stdin option + man: document notmuch tag --stdin option + + man/man1/notmuch-tag.1 | 44 +++++++++- + notmuch-tag.c | 244 ++++++++++++++++++++++++++++++++++++++++++------ + test/.gitignore | 1 + + test/Makefile.local | 6 +- + test/basic | 2 +- + test/hex-escaping | 26 +++++ + test/hex-xcode.c | 103 ++++++++++++++++++++ + test/notmuch-test | 1 + + test/tagging | 13 +++ + util/Makefile.local | 2 +- + util/hex-escape.c | 168 +++++++++++++++++++++++++++++++++ + util/hex-escape.h | 41 ++++++++ + 12 files changed, 616 insertions(+), 35 deletions(-) + create mode 100755 test/hex-escaping + create mode 100644 test/hex-xcode.c + create mode 100644 util/hex-escape.c + create mode 100644 util/hex-escape.h + +-- +1.7.5.4 +