[PATCH v4 00/13] boolean folder: and path: searches
authorJani Nikula <jani@nikula.org>
Sun, 9 Mar 2014 21:40:21 +0000 (23:40 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:00:31 +0000 (10:00 -0800)
60/a165feb18b375048c887a500d035eef2f99135 [new file with mode: 0644]

diff --git a/60/a165feb18b375048c887a500d035eef2f99135 b/60/a165feb18b375048c887a500d035eef2f99135
new file mode 100644 (file)
index 0000000..8c7338a
--- /dev/null
@@ -0,0 +1,197 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 5C057431FC9\r
+       for <notmuch@notmuchmail.org>; Sun,  9 Mar 2014 14:40:49 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 59nlJGWY3jPQ for <notmuch@notmuchmail.org>;\r
+       Sun,  9 Mar 2014 14:40:40 -0700 (PDT)\r
+Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com\r
+       [209.85.217.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 0F8C4431FBC\r
+       for <notmuch@notmuchmail.org>; Sun,  9 Mar 2014 14:40:39 -0700 (PDT)\r
+Received: by mail-lb0-f175.google.com with SMTP id w7so4080154lbi.6\r
+       for <notmuch@notmuchmail.org>; Sun, 09 Mar 2014 14:40:38 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=1e100.net; s=20130820;\r
+       h=x-gm-message-state:from:to:cc:subject:date:message-id;\r
+       bh=/stxhZQ9uvCXqjuswF3yDmfL6WLRF9grsBnLgQKtcsA=;\r
+       b=ElnwU5MAcMhwTOl6avx0Rmk2pUmCu7KTU5i6uCdqkEIPgYxcWjZYXKGo6WkiZbkFXY\r
+       bpvJDXiIiNpIOYYlreX1DxmjEDsMOe2PZYeB0EjjMVDsi+LU9umHveKTAheD7BrfgW2M\r
+       un2z5Zm4pFmz0W6PTbNsTRUXORarvjrHP2ru5Qo6Heu5pYCwe9T2HG45HxMhSbNEekWt\r
+       jcEvs0rOfpQOmzp9iaW5grhIGPtFZLENKJSPHVL0/7r7vnpZ7G3kelLgS2Lwo42i7P7Z\r
+       yahMwQenbUgVjUqnRA0DNtN2a0yLpGb3haHWXVzrwg/l/s2P7jFTxQFA0nJfD0zNl601\r
+       OYfQ==\r
+X-Gm-Message-State:\r
+ ALoCoQnJ1qEbNLF7Bmbe6VsnfGiyTzrdVlLxQOvAPVkml8EHFASkUbiButoPQYbH+/mnGX61DfwW\r
+X-Received: by 10.152.225.70 with SMTP id ri6mr21027482lac.26.1394401237327;\r
+       Sun, 09 Mar 2014 14:40:37 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
+       [88.195.111.91])\r
+       by mx.google.com with ESMTPSA id q6sm26906750lal.3.2014.03.09.14.40.35\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Sun, 09 Mar 2014 14:40:36 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v4 00/13] boolean folder: and path: searches\r
+Date: Sun,  9 Mar 2014 23:40:21 +0200\r
+Message-Id: <cover.1394400503.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.9.0\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 09 Mar 2014 21:40:49 -0000\r
+\r
+This is v4 of id:1394313585-28422-1-git-send-email-david@tethera.net.\r
+\r
+Changes since v3, mostly addressing Austin's review and comments on IRC:\r
+\r
+* Removed the extra corpus for folder tests. Instead, arranged the\r
+  existing corpus into more folders. (Patch 01.)\r
+\r
+* Changed the folder/path tests to reflect the above, and incorporated\r
+  them into existing folder tests instead of adding a new one. (Patch\r
+  07.)\r
+\r
+* Added a new patch to do notmuch_search_files_sanitize. (Patch 02.)\r
+\r
+* Folded test updates to folder: update to make tests pass at every\r
+  commit. (Patch 06.)\r
+\r
+* Fixed indent fails and added comment about XFOLDER: prefix,\r
+  spotted/suggested by Austin. (Patch 06.)\r
+\r
+* Used Austin's man page suggestion verbatim, but this may have to be\r
+  redone if David's documentation changes get merged first. (Patch 09.)\r
+\r
+* Fixed a stray make dependency. (Patch 13.)\r
+\r
+* Notably *no* functional code changes.\r
+\r
+Finally, take heed of David's warning id:874n37a017.fsf@zancas.localnet.\r
+\r
+BR,\r
+Jani.\r
+\r
+\r
+David Bremner (2):\r
+  test: commit folders-v1.tar.xz checksum, ignore actual databases\r
+  test: add machinery to download and verify databases\r
+\r
+Jani Nikula (11):\r
+  test: rearrange the test corpus into subfolders\r
+  test: add notmuch_search_files_sanitize and use it\r
+  lib: refactor folder term update after filename removal\r
+  lib: add support for path: prefix searches\r
+  test: make insert test use the path: prefix\r
+  lib: make folder: prefix literal\r
+  test: add tests for the new boolean folder: and path: prefixes\r
+  test: add database upgrade test from format version 1 to 2\r
+  man: update man pages for folder: and path: search terms\r
+  man: try to clarify the folder: and path: vs. --output=files confusion\r
+  devel: add script to generate test databases\r
+\r
+ Makefile                                     |   3 +-\r
+ devel/gen-testdb.sh                          | 131 ++++++++++++++\r
+ lib/database.cc                              |  51 +++++-\r
+ lib/message.cc                               | 249 ++++++++++++++++++---------\r
+ lib/notmuch-private.h                        |   3 +\r
+ man/man1/notmuch-search.1                    |  10 +-\r
+ man/man7/notmuch-search-terms.7              |  41 ++++-\r
+ test/README                                  |   8 +\r
+ test/T070-insert.sh                          |  10 +-\r
+ test/T090-search-output.sh                   | 176 +++++++++----------\r
+ test/T100-search-by-folder.sh                | 117 ++++++++++++-\r
+ test/T370-search-folder-coherence.sh         |   2 +-\r
+ test/T530-upgrade.sh                         | 115 +++++++++++++\r
+ test/corpus/{cur => }/01:2,                  |   0\r
+ test/corpus/{cur => }/02:2,                  |   0\r
+ test/corpus/{cur => bar}/17:2,               |   0\r
+ test/corpus/{cur => bar}/18:2,               |   0\r
+ test/corpus/{cur => bar/baz}/05:2,           |   0\r
+ test/corpus/{cur => bar/baz}/23:2,           |   0\r
+ test/corpus/{cur => bar/baz}/24:2,           |   0\r
+ test/corpus/{ => bar/baz}/cur/25:2,          |   0\r
+ test/corpus/{ => bar/baz}/cur/26:2,          |   0\r
+ test/corpus/{cur => bar/baz/new}/27:2,       |   0\r
+ test/corpus/{cur => bar/baz/new}/28:2,       |   0\r
+ test/corpus/{ => bar}/cur/19:2,              |   0\r
+ test/corpus/{ => bar}/cur/20:2,              |   0\r
+ test/corpus/{cur => bar/new}/21:2,           |   0\r
+ test/corpus/{cur => bar/new}/22:2,           |   0\r
+ test/corpus/{cur => foo}/06:2,               |   0\r
+ test/corpus/{cur => foo/baz}/11:2,           |   0\r
+ test/corpus/{cur => foo/baz}/12:2,           |   0\r
+ test/corpus/{ => foo/baz}/cur/13:2,          |   0\r
+ test/corpus/{ => foo/baz}/cur/14:2,          |   0\r
+ test/corpus/{cur => foo/baz/new}/15:2,       |   0\r
+ test/corpus/{cur => foo/baz/new}/16:2,       |   0\r
+ test/corpus/{ => foo}/cur/07:2,              |   0\r
+ test/corpus/{ => foo}/cur/08:2,              |   0\r
+ test/corpus/{cur => foo/new}/03:2,           |   0\r
+ test/corpus/{cur => foo/new}/09:2,           |   0\r
+ test/corpus/{cur => foo/new}/10:2,           |   0\r
+ test/corpus/{cur => new}/04:2,               |   0\r
+ test/test-databases/.gitignore               |   1 +\r
+ test/test-databases/Makefile                 |   7 +\r
+ test/test-databases/Makefile.local           |  14 ++\r
+ test/test-databases/folders-v1.tar.xz.sha256 |   1 +\r
+ test/test-lib.sh                             |   5 +\r
+ 46 files changed, 753 insertions(+), 191 deletions(-)\r
+ create mode 100755 devel/gen-testdb.sh\r
+ create mode 100755 test/T530-upgrade.sh\r
+ rename test/corpus/{cur => }/01:2, (100%)\r
+ rename test/corpus/{cur => }/02:2, (100%)\r
+ rename test/corpus/{cur => bar}/17:2, (100%)\r
+ rename test/corpus/{cur => bar}/18:2, (100%)\r
+ rename test/corpus/{cur => bar/baz}/05:2, (100%)\r
+ rename test/corpus/{cur => bar/baz}/23:2, (100%)\r
+ rename test/corpus/{cur => bar/baz}/24:2, (100%)\r
+ rename test/corpus/{ => bar/baz}/cur/25:2, (100%)\r
+ rename test/corpus/{ => bar/baz}/cur/26:2, (100%)\r
+ rename test/corpus/{cur => bar/baz/new}/27:2, (100%)\r
+ rename test/corpus/{cur => bar/baz/new}/28:2, (100%)\r
+ rename test/corpus/{ => bar}/cur/19:2, (100%)\r
+ rename test/corpus/{ => bar}/cur/20:2, (100%)\r
+ rename test/corpus/{cur => bar/new}/21:2, (100%)\r
+ rename test/corpus/{cur => bar/new}/22:2, (100%)\r
+ rename test/corpus/{cur => foo}/06:2, (100%)\r
+ rename test/corpus/{cur => foo/baz}/11:2, (100%)\r
+ rename test/corpus/{cur => foo/baz}/12:2, (100%)\r
+ rename test/corpus/{ => foo/baz}/cur/13:2, (100%)\r
+ rename test/corpus/{ => foo/baz}/cur/14:2, (100%)\r
+ rename test/corpus/{cur => foo/baz/new}/15:2, (100%)\r
+ rename test/corpus/{cur => foo/baz/new}/16:2, (100%)\r
+ rename test/corpus/{ => foo}/cur/07:2, (100%)\r
+ rename test/corpus/{ => foo}/cur/08:2, (100%)\r
+ rename test/corpus/{cur => foo/new}/03:2, (100%)\r
+ rename test/corpus/{cur => foo/new}/09:2, (100%)\r
+ rename test/corpus/{cur => foo/new}/10:2, (100%)\r
+ rename test/corpus/{cur => new}/04:2, (100%)\r
+ create mode 100644 test/test-databases/.gitignore\r
+ create mode 100644 test/test-databases/Makefile\r
+ create mode 100644 test/test-databases/Makefile.local\r
+ create mode 100644 test/test-databases/folders-v1.tar.xz.sha256\r
+\r
+-- \r
+1.9.0\r
+\r