From 6b646a0ecee88c8db350ed87dc3979599bd9cdb1 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Sun, 9 Mar 2014 23:40:21 +0200 Subject: [PATCH] [PATCH v4 00/13] boolean folder: and path: searches --- 60/a165feb18b375048c887a500d035eef2f99135 | 197 ++++++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 60/a165feb18b375048c887a500d035eef2f99135 diff --git a/60/a165feb18b375048c887a500d035eef2f99135 b/60/a165feb18b375048c887a500d035eef2f99135 new file mode 100644 index 000000000..8c7338a17 --- /dev/null +++ b/60/a165feb18b375048c887a500d035eef2f99135 @@ -0,0 +1,197 @@ +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 5C057431FC9 + for ; Sun, 9 Mar 2014 14:40:49 -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 59nlJGWY3jPQ for ; + Sun, 9 Mar 2014 14:40:40 -0700 (PDT) +Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com + [209.85.217.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 0F8C4431FBC + for ; Sun, 9 Mar 2014 14:40:39 -0700 (PDT) +Received: by mail-lb0-f175.google.com with SMTP id w7so4080154lbi.6 + for ; Sun, 09 Mar 2014 14:40:38 -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=/stxhZQ9uvCXqjuswF3yDmfL6WLRF9grsBnLgQKtcsA=; + b=ElnwU5MAcMhwTOl6avx0Rmk2pUmCu7KTU5i6uCdqkEIPgYxcWjZYXKGo6WkiZbkFXY + bpvJDXiIiNpIOYYlreX1DxmjEDsMOe2PZYeB0EjjMVDsi+LU9umHveKTAheD7BrfgW2M + un2z5Zm4pFmz0W6PTbNsTRUXORarvjrHP2ru5Qo6Heu5pYCwe9T2HG45HxMhSbNEekWt + jcEvs0rOfpQOmzp9iaW5grhIGPtFZLENKJSPHVL0/7r7vnpZ7G3kelLgS2Lwo42i7P7Z + yahMwQenbUgVjUqnRA0DNtN2a0yLpGb3haHWXVzrwg/l/s2P7jFTxQFA0nJfD0zNl601 + OYfQ== +X-Gm-Message-State: + ALoCoQnJ1qEbNLF7Bmbe6VsnfGiyTzrdVlLxQOvAPVkml8EHFASkUbiButoPQYbH+/mnGX61DfwW +X-Received: by 10.152.225.70 with SMTP id ri6mr21027482lac.26.1394401237327; + Sun, 09 Mar 2014 14:40:37 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. + [88.195.111.91]) + by mx.google.com with ESMTPSA id q6sm26906750lal.3.2014.03.09.14.40.35 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sun, 09 Mar 2014 14:40:36 -0700 (PDT) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH v4 00/13] boolean folder: and path: searches +Date: Sun, 9 Mar 2014 23:40:21 +0200 +Message-Id: +X-Mailer: git-send-email 1.9.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, 09 Mar 2014 21:40:49 -0000 + +This is v4 of id:1394313585-28422-1-git-send-email-david@tethera.net. + +Changes since v3, mostly addressing Austin's review and comments on IRC: + +* Removed the extra corpus for folder tests. Instead, arranged the + existing corpus into more folders. (Patch 01.) + +* Changed the folder/path tests to reflect the above, and incorporated + them into existing folder tests instead of adding a new one. (Patch + 07.) + +* Added a new patch to do notmuch_search_files_sanitize. (Patch 02.) + +* Folded test updates to folder: update to make tests pass at every + commit. (Patch 06.) + +* Fixed indent fails and added comment about XFOLDER: prefix, + spotted/suggested by Austin. (Patch 06.) + +* Used Austin's man page suggestion verbatim, but this may have to be + redone if David's documentation changes get merged first. (Patch 09.) + +* Fixed a stray make dependency. (Patch 13.) + +* Notably *no* functional code changes. + +Finally, take heed of David's warning id:874n37a017.fsf@zancas.localnet. + +BR, +Jani. + + +David Bremner (2): + test: commit folders-v1.tar.xz checksum, ignore actual databases + test: add machinery to download and verify databases + +Jani Nikula (11): + test: rearrange the test corpus into subfolders + test: add notmuch_search_files_sanitize and use it + lib: refactor folder term update after filename removal + lib: add support for path: prefix searches + test: make insert test use the path: prefix + lib: make folder: prefix literal + test: add tests for the new boolean folder: and path: prefixes + test: add database upgrade test from format version 1 to 2 + man: update man pages for folder: and path: search terms + man: try to clarify the folder: and path: vs. --output=files confusion + devel: add script to generate test databases + + Makefile | 3 +- + devel/gen-testdb.sh | 131 ++++++++++++++ + lib/database.cc | 51 +++++- + lib/message.cc | 249 ++++++++++++++++++--------- + lib/notmuch-private.h | 3 + + man/man1/notmuch-search.1 | 10 +- + man/man7/notmuch-search-terms.7 | 41 ++++- + test/README | 8 + + test/T070-insert.sh | 10 +- + test/T090-search-output.sh | 176 +++++++++---------- + test/T100-search-by-folder.sh | 117 ++++++++++++- + test/T370-search-folder-coherence.sh | 2 +- + test/T530-upgrade.sh | 115 +++++++++++++ + test/corpus/{cur => }/01:2, | 0 + test/corpus/{cur => }/02:2, | 0 + test/corpus/{cur => bar}/17:2, | 0 + test/corpus/{cur => bar}/18:2, | 0 + test/corpus/{cur => bar/baz}/05:2, | 0 + test/corpus/{cur => bar/baz}/23:2, | 0 + test/corpus/{cur => bar/baz}/24:2, | 0 + test/corpus/{ => bar/baz}/cur/25:2, | 0 + test/corpus/{ => bar/baz}/cur/26:2, | 0 + test/corpus/{cur => bar/baz/new}/27:2, | 0 + test/corpus/{cur => bar/baz/new}/28:2, | 0 + test/corpus/{ => bar}/cur/19:2, | 0 + test/corpus/{ => bar}/cur/20:2, | 0 + test/corpus/{cur => bar/new}/21:2, | 0 + test/corpus/{cur => bar/new}/22:2, | 0 + test/corpus/{cur => foo}/06:2, | 0 + test/corpus/{cur => foo/baz}/11:2, | 0 + test/corpus/{cur => foo/baz}/12:2, | 0 + test/corpus/{ => foo/baz}/cur/13:2, | 0 + test/corpus/{ => foo/baz}/cur/14:2, | 0 + test/corpus/{cur => foo/baz/new}/15:2, | 0 + test/corpus/{cur => foo/baz/new}/16:2, | 0 + test/corpus/{ => foo}/cur/07:2, | 0 + test/corpus/{ => foo}/cur/08:2, | 0 + test/corpus/{cur => foo/new}/03:2, | 0 + test/corpus/{cur => foo/new}/09:2, | 0 + test/corpus/{cur => foo/new}/10:2, | 0 + test/corpus/{cur => new}/04:2, | 0 + test/test-databases/.gitignore | 1 + + test/test-databases/Makefile | 7 + + test/test-databases/Makefile.local | 14 ++ + test/test-databases/folders-v1.tar.xz.sha256 | 1 + + test/test-lib.sh | 5 + + 46 files changed, 753 insertions(+), 191 deletions(-) + create mode 100755 devel/gen-testdb.sh + create mode 100755 test/T530-upgrade.sh + rename test/corpus/{cur => }/01:2, (100%) + rename test/corpus/{cur => }/02:2, (100%) + rename test/corpus/{cur => bar}/17:2, (100%) + rename test/corpus/{cur => bar}/18:2, (100%) + rename test/corpus/{cur => bar/baz}/05:2, (100%) + rename test/corpus/{cur => bar/baz}/23:2, (100%) + rename test/corpus/{cur => bar/baz}/24:2, (100%) + rename test/corpus/{ => bar/baz}/cur/25:2, (100%) + rename test/corpus/{ => bar/baz}/cur/26:2, (100%) + rename test/corpus/{cur => bar/baz/new}/27:2, (100%) + rename test/corpus/{cur => bar/baz/new}/28:2, (100%) + rename test/corpus/{ => bar}/cur/19:2, (100%) + rename test/corpus/{ => bar}/cur/20:2, (100%) + rename test/corpus/{cur => bar/new}/21:2, (100%) + rename test/corpus/{cur => bar/new}/22:2, (100%) + rename test/corpus/{cur => foo}/06:2, (100%) + rename test/corpus/{cur => foo/baz}/11:2, (100%) + rename test/corpus/{cur => foo/baz}/12:2, (100%) + rename test/corpus/{ => foo/baz}/cur/13:2, (100%) + rename test/corpus/{ => foo/baz}/cur/14:2, (100%) + rename test/corpus/{cur => foo/baz/new}/15:2, (100%) + rename test/corpus/{cur => foo/baz/new}/16:2, (100%) + rename test/corpus/{ => foo}/cur/07:2, (100%) + rename test/corpus/{ => foo}/cur/08:2, (100%) + rename test/corpus/{cur => foo/new}/03:2, (100%) + rename test/corpus/{cur => foo/new}/09:2, (100%) + rename test/corpus/{cur => foo/new}/10:2, (100%) + rename test/corpus/{cur => new}/04:2, (100%) + create mode 100644 test/test-databases/.gitignore + create mode 100644 test/test-databases/Makefile + create mode 100644 test/test-databases/Makefile.local + create mode 100644 test/test-databases/folders-v1.tar.xz.sha256 + +-- +1.9.0 + -- 2.26.2