[PATCH 5/5] lib: Add "lastmod:" queries for filtering by last modification

2015-08-14 Thread David Bremner
From: Austin Clements The implementation is essentially the same as the date range search prior to Jani's fancy date parser. --- doc/man7/notmuch-search-terms.rst | 8 lib/database-private.h| 1 + lib/database.cc | 4

[PATCH 4/5] cli: add global option "--uuid"

2015-08-14 Thread David Bremner
The function notmuch_exit_if_unmatched_db_uuid is split from notmuch_process_shared_options because it needs an open notmuch database. There are two exceptional cases in uuid handling. 1) notmuch config and notmuch setup don't currently open the database, so it doesn't make sense to check the

[PATCH 3/5] cli/count: add --lastmod

2015-08-14 Thread David Bremner
In the short term we need a way to get lastmod information e.g. for the test suite. In the long term we probably want to add lastmod information to at least the structured output for several other clients (e.g. show, search). --- doc/man1/notmuch-count.rst | 5 + notmuch-count.c

[PATCH 2/5] lib: API to retrieve database revision and UUID

2015-08-14 Thread David Bremner
From: Austin Clements This exposes the committed database revision to library users along with a UUID that can be used to detect when revision numbers are no longer comparable (e.g., because the database has been replaced). --- lib/database-private.h | 1 +

[PATCH 1/5] lib: Add per-message last modification tracking

2015-08-14 Thread David Bremner
From: Austin Clements This adds a new document value that stores the revision of the last modification to message metadata, where the revision number increases monotonically with each database commit. An alternative would be to store the wall-clock time of the last

revision tracking patches round 4

2015-08-14 Thread David Bremner
This obsoletes id:1439112285-6681-1-git-send-email-david at tethera.net The main differences since that series are in the command line syntax for notmuch-count. We also now consider passing --uuid to notmuch-compact an error, since the user might reasonably expect that to do something

revision tracking patches round 4

2015-08-14 Thread David Bremner
This obsoletes id:1439112285-6681-1-git-send-email-da...@tethera.net The main differences since that series are in the command line syntax for notmuch-count. We also now consider passing --uuid to notmuch-compact an error, since the user might reasonably expect that to do something

[PATCH 4/5] cli: add global option --uuid

2015-08-14 Thread David Bremner
The function notmuch_exit_if_unmatched_db_uuid is split from notmuch_process_shared_options because it needs an open notmuch database. There are two exceptional cases in uuid handling. 1) notmuch config and notmuch setup don't currently open the database, so it doesn't make sense to check the

[PATCH 2/5] lib: API to retrieve database revision and UUID

2015-08-14 Thread David Bremner
From: Austin Clements acleme...@csail.mit.edu This exposes the committed database revision to library users along with a UUID that can be used to detect when revision numbers are no longer comparable (e.g., because the database has been replaced). --- lib/database-private.h | 1 +

[PATCH 5/5] lib: Add lastmod: queries for filtering by last modification

2015-08-14 Thread David Bremner
From: Austin Clements amdra...@mit.edu The implementation is essentially the same as the date range search prior to Jani's fancy date parser. --- doc/man7/notmuch-search-terms.rst | 8 lib/database-private.h| 1 + lib/database.cc | 4

[PATCH 1/5] lib: Add per-message last modification tracking

2015-08-14 Thread David Bremner
From: Austin Clements amdra...@mit.edu This adds a new document value that stores the revision of the last modification to message metadata, where the revision number increases monotonically with each database commit. An alternative would be to store the wall-clock time of the last modification