From: David Bremner Date: Sun, 27 Mar 2016 20:25:11 +0000 (+2100) Subject: [PATCH] nmbug: ignore # comments X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0b68b99bace6086d2b865e51af765cfdc44d615d;p=notmuch-archives.git [PATCH] nmbug: ignore # comments --- diff --git a/06/3e74929f7317a19f36ca85337e9c3c4a2558e7 b/06/3e74929f7317a19f36ca85337e9c3c4a2558e7 new file mode 100644 index 000000000..73496e90c --- /dev/null +++ b/06/3e74929f7317a19f36ca85337e9c3c4a2558e7 @@ -0,0 +1,76 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 3678F6DE0222 + for ; Sun, 27 Mar 2016 13:25:42 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.015 +X-Spam-Level: +X-Spam-Status: No, score=-0.015 tagged_above=-999 required=5 + tests=[AWL=-0.016, HEADER_FROM_DIFFERENT_DOMAINS=0.001] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id q-UEzZ1VvkcW for ; + Sun, 27 Mar 2016 13:25:34 -0700 (PDT) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id E99A46DE01F9 + for ; Sun, 27 Mar 2016 13:25:33 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1akHGA-0003Ba-BG; Sun, 27 Mar 2016 16:26:06 -0400 +Received: (nullmailer pid 23879 invoked by uid 1000); + Sun, 27 Mar 2016 20:25:16 -0000 +From: David Bremner +To: David Bremner , notmuch@notmuchmail.org +Subject: [PATCH] nmbug: ignore # comments +Date: Sun, 27 Mar 2016 17:25:11 -0300 +Message-Id: <1459110311-23774-1-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.6.4 +In-Reply-To: <1459015043-8460-9-git-send-email-david@tethera.net> +References: <1459015043-8460-9-git-send-email-david@tethera.net> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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, 27 Mar 2016 20:25:42 -0000 + +Lines starting with # have always (for a long time, anyway) been ignored +by notmuch-restore, but have not been generated by notmuch-dump +previously. In order to make nmbug robust against such output, ignore +comment lines. +--- + + Even if we decide to change the default output of notmuch dump to not + contain any comments, this fix will be reasonable in terms of + increasing robustness against future breakage. + + devel/nmbug/nmbug | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/devel/nmbug/nmbug b/devel/nmbug/nmbug +index 81f582c..0787b2b 100755 +--- a/devel/nmbug/nmbug ++++ b/devel/nmbug/nmbug +@@ -608,6 +608,8 @@ def _index_tags(): + stdin=_subprocess.PIPE, + additional_env={'GIT_INDEX_FILE': path}) as git: + for line in notmuch.stdout: ++ if line.strip().startswith('#'): ++ continue + (tags_string, id) = [_.strip() for _ in line.split(' -- id:')] + tags = [ + _unquote(tag[len(prefix):]) +-- +2.6.4 +