]> git.notmuchmail.org Git - notmuch/commitdiff
Merge branch 'release'
authorDavid Bremner <david@tethera.net>
Sat, 25 Mar 2017 14:51:03 +0000 (11:51 -0300)
committerDavid Bremner <david@tethera.net>
Sat, 25 Mar 2017 14:51:03 +0000 (11:51 -0300)
wildcard search fixes, plus release busywork

bindings/python/notmuch/version.py
debian/changelog
lib/regexp-fields.cc
test/T650-regexp-query.sh
version

index 903dbb04ffdb7d17255772b4c84b3c64dc3337ca..bfdcf7ed32cca758e67bb4ea8c6418851422a47b 100644 (file)
@@ -1,3 +1,3 @@
 # this file should be kept in sync with ../../../version
-__VERSION__ = '0.24'
+__VERSION__ = '0.24.1'
 SOVERSION = '5'
index 520a1e7a59e85e1de395fa783221b4ce8c065a04..9dc3b608e360fdcb8e69d1803dd411d95b81dbc3 100644 (file)
@@ -1,3 +1,9 @@
+notmuch (0.24.1-1) UNRELEASED; urgency=medium
+
+  * Restore Xapian wildcard queries to from: and subject:
+
+ -- David Bremner <bremner@debian.org>  Sat, 25 Mar 2017 11:21:34 -0300
+
 notmuch (0.24-1) experimental; urgency=medium
 
   * New upstream release
index 8e740a810064a8e80bae40ad75045b975c7c2286..9dcf973263743ea01721bf139569cafa17577943 100644 (file)
@@ -158,8 +158,14 @@ RegexpFieldProcessor::operator() (const std::string & str)
     } else {
        /* TODO replace this with a nicer API level triggering of
         * phrase parsing, when possible */
-       std::string quoted='"' + str + '"';
-       return parser.parse_query (quoted, NOTMUCH_QUERY_PARSER_FLAGS, term_prefix);
+       std::string query_str;
+
+       if (str.find (' ') != std::string::npos)
+           query_str = '"' + str + '"';
+       else
+           query_str = str;
+
+       return parser.parse_query (query_str, NOTMUCH_QUERY_PARSER_FLAGS, term_prefix);
     }
 }
 #endif
index df48ab82511cb7a2af0243fa1c6591557c8cf5c3..61739e873eb214364f0f3b60748fa30279580787 100755 (executable)
@@ -11,6 +11,13 @@ fi
 
 notmuch search --output=messages from:cworth > cworth.msg-ids
 
+test_begin_subtest "xapian wildcard search for from:"
+notmuch search --output=messages 'from:cwo*' > OUTPUT
+test_expect_equal_file cworth.msg-ids OUTPUT
+
+test_begin_subtest "xapian wildcard search for subject:"
+test_expect_equal $(notmuch count 'subject:count*') 1
+
 test_begin_subtest "regexp from search, case sensitive"
 notmuch search --output=messages from:/carl/ > OUTPUT
 test_expect_equal_file /dev/null OUTPUT
diff --git a/version b/version
index fd137eb17ebf8ef31a21dc69395943c3c43f3e54..48b91fd89c0759b898d563d1141cc93ef25e16fe 100644 (file)
--- a/version
+++ b/version
@@ -1 +1 @@
-0.24
+0.24.1