]> git.notmuchmail.org Git - notmuch/commitdiff
Merge branch 'release'
authorDavid Bremner <david@tethera.net>
Wed, 8 Mar 2017 12:31:51 +0000 (08:31 -0400)
committerDavid Bremner <david@tethera.net>
Wed, 8 Mar 2017 12:31:51 +0000 (08:31 -0400)
new release candidate, with regexp fix

bindings/python/notmuch/version.py
debian/changelog
lib/regexp-fields.cc
lib/regexp-fields.h
version

index 430710288d7f3070b138e0501eaf7f960def9c24..7aa101d3bd96c840a838d1f2f201af07da8b4042 100644 (file)
@@ -1,3 +1,3 @@
 # this file should be kept in sync with ../../../version
-__VERSION__ = '0.24~rc0'
+__VERSION__ = '0.24~rc1'
 SOVERSION = '4'
index 3781acf5cde3a9e8ea7aefa0857e5e478626928c..b8a0bf9d7c0abef1804bb9d31ad493ef2423e82a 100644 (file)
@@ -1,3 +1,11 @@
+notmuch (0.24~rc1-1) experimental; urgency=medium
+
+  * New upstream release candidate
+  * upstream release notes
+  * One library internals fix/optimization for regexp processing.
+
+ -- David Bremner <bremner@debian.org>  Wed, 08 Mar 2017 08:08:34 -0400
+
 notmuch (0.24~rc0-1) experimental; urgency=medium
 
   * New upstream feature release (candidate).
index b41747502e1e6b8bbea31044e583e10b75a155a3..8e740a810064a8e80bae40ad75045b975c7c2286 100644 (file)
@@ -62,11 +62,6 @@ RegexpPostingSource::init (const Xapian::Database &db)
     it_ = db_.valuestream_begin (slot_);
     end_ = db.valuestream_end (slot_);
     started_ = false;
-
-    /* make sure we start on a matching value */
-    while (!at_end() && regexec (&regexp_, (*it_).c_str (), 0, NULL, 0) != 0) {
-       ++it_;
-    }
 }
 
 Xapian::doccount
@@ -113,6 +108,27 @@ RegexpPostingSource::next (unused (double min_wt))
     }
 }
 
+void
+RegexpPostingSource::skip_to (Xapian::docid did, unused (double min_wt))
+{
+    started_ = true;
+    it_.skip_to (did);
+    for (; ! at_end (); ++it_) {
+       std::string value = *it_;
+       if (regexec (&regexp_, value.c_str (), 0, NULL, 0) == 0)
+           break;
+    }
+}
+
+bool
+RegexpPostingSource::check (Xapian::docid did, unused (double min_wt))
+{
+    started_ = true;
+    if (!it_.check (did) || at_end ())
+       return false;
+    return (regexec (&regexp_, (*it_).c_str (), 0, NULL, 0) == 0);
+}
+
 static inline Xapian::valueno _find_slot (std::string prefix)
 {
     if (prefix == "from")
index bac119998c56ca759b46a58c27881ad9dad374a0..a4ba7ad8412cebbf8a2104f4058548abc277a8fc 100644 (file)
@@ -56,6 +56,8 @@ class RegexpPostingSource : public Xapian::PostingSource
     Xapian::docid get_docid () const;
     bool at_end () const;
     void next (unused (double min_wt));
+    void skip_to (Xapian::docid did, unused (double min_wt));
+    bool check (Xapian::docid did, unused (double min_wt));
 };
 
 
diff --git a/version b/version
index ab10aa0f40ab5403d22021b1e571b3a375ad560e..1a46dd0a67ee8319ecd928357ff94e1f6e557903 100644 (file)
--- a/version
+++ b/version
@@ -1 +1 @@
-0.24~rc0
+0.24~rc1