From: David Bremner Date: Fri, 28 Oct 2011 14:56:30 +0000 (-0300) Subject: lib/database.cc: use flush Xapian method instead of commit X-Git-Tag: 0.10_rc1~58 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/notmuch.git/commitdiff_plain/606e4461f803829077af4e3b2579583f7e39bc3e?hp=556c5fa8900d14c61544f3ac016d3cca1db5a91a lib/database.cc: use flush Xapian method instead of commit Apparently the method was renamed in Xapian 1.1.0 but the old method name will stay around for a while. It seems better to stick with the old name to make notmuch compile with older versions of Xapian, at least for now. --- diff --git a/lib/database.cc b/lib/database.cc index 88be9391..fa632f85 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -1015,7 +1015,7 @@ notmuch_database_end_atomic (notmuch_database_t *notmuch) * However, we rely on flushing to test atomicity. */ const char *thresh = getenv ("XAPIAN_FLUSH_THRESHOLD"); if (thresh && atoi (thresh) == 1) - db->commit (); + db->flush (); } catch (const Xapian::Error &error) { fprintf (stderr, "A Xapian exception occurred committing transaction: %s.\n", error.get_msg().c_str());