unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/9] Fix directory lookup on read-only databases
@ 2012-05-18  4:13 Austin Clements
  2012-05-18  4:13 ` [PATCH 1/9] lib: Make directory document creation optional for _notmuch_directory_create Austin Clements
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Austin Clements @ 2012-05-18  4:13 UTC (permalink / raw)
  To: notmuch

This fixes notmuch_database_get_directory and
notmuch_database_find_message_by_filename so that they don't attempt
to create missing directory documents.  This makes them work on
read-only databases (and prevents n_d_f_m_b_f from crashing
unceremoniously on read-only databases).

Unfortunately, there are several functions involved in directory
document lookup, so the first three patches simply add a creation flag
at each necessary layer.  The remaining patches then fix up the two
API functions and their uses.

If we do a 0.13.1 bug fix release, these patches could go in to
complement the API changes made in 0.13 to support these fixes.  David
can make that call.

There are several patches, but they're all short and incremental.

 bindings/python/notmuch/database.py |   11 -----------
 lib/database.cc                     |   40 +++++++++++++++++++++++++---------------
 lib/directory.cc                    |   41 +++++++++++++++++++++++++++++++++++------
 lib/message.cc                      |   11 +++++------
 lib/notmuch-private.h               |   13 +++++++++++++
 lib/notmuch.h                       |   10 ++--------
 notmuch-new.c                       |   36 +++++++-----------------------------
 test/python                         |    8 ++++++++
 8 files changed, 95 insertions(+), 75 deletions(-)

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-05-24  1:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-18  4:13 [PATCH 0/9] Fix directory lookup on read-only databases Austin Clements
2012-05-18  4:13 ` [PATCH 1/9] lib: Make directory document creation optional for _notmuch_directory_create Austin Clements
2012-05-24  1:53   ` David Bremner
2012-05-18  4:13 ` [PATCH 2/9] lib: Perform the same transformation to _notmuch_database_find_directory_id Austin Clements
2012-05-18  4:13 ` [PATCH 3/9] lib: Perform the same transformation to _notmuch_database_filename_to_direntry Austin Clements
2012-05-18  4:13 ` [PATCH 4/9] lib: Make notmuch_database_get_directory return NULL if the directory is not found Austin Clements
2012-05-18  4:13 ` [PATCH 5/9] new: Remove workaround for detecting newly created directory objects Austin Clements
2012-05-18  4:13 ` [PATCH 6/9] python: Update Database.get_directory documentation Austin Clements
2012-05-18  4:13 ` [PATCH 7/9] lib: Make notmuch_database_find_message_by_filename not crash on read-only databases Austin Clements
2012-05-18  4:13 ` [PATCH 8/9] python: Remove find_message_by_filename workaround Austin Clements
2012-05-18  4:13 ` [PATCH 9/9] lib: Don't needlessly create directory docs in _notmuch_message_remove_filename Austin Clements
2012-05-22 20:48 ` [PATCH 0/9] Fix directory lookup on read-only databases Tomi Ollila
2012-05-23 10:28 ` Justus Winter

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).