aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* lib: bump SONAMEDavid Bremner2011-10-04
| | | | | | | | | | | Based on discussions with amdragon, tschwinge, and others on IRC, I concluded that 1) symbol versioning was probably overkill for libnotmuch 2) It was also probably GNU ld specific 3) Most importantly, nobody could tell me on short notice how exactly it works. So since the change to the notmuch_database_find_message breaks the previous ABI, we need to bump the SONAME.
* ruby: Fix macros, use quotingAli Polatel2011-10-04
| | | | | | Fix Data_Get_Notmuch_* macro definitions broken by prev. commit Adequate quoting for Data_Get_Notmuch_* macros Remove duplicated RSTRING_PTR() macros, move it to defs.h
* ruby: Really add wrappers for database_find_message*Ali Polatel2011-10-04
| | | | | | Commit 898613116db746aa0f915ae43da8aba28545203d only added wrapper functions but did not register them. Register the functions in module's initialization function.
* ruby: be consistent with notmuch's coding styleAli Polatel2011-10-04
| | | | No functional change, just indentation
* ruby: Add wrappers for database_find_message*Ali Polatel2011-10-04
| | | | | | Two new wrappers: Notmuch::Database.find_message(id) => Notmuch::Message or nil Notmuch::Database.find_message_by_filename(path) => Notmuch::Message or nil
* Merge remote-tracking branch 'alip/find_message-v3'David Bremner2011-10-04
|\
| * lib: make find_message{,by_filename) report errorsAli Polatel2011-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the functions notmuch_database_find_message() and notmuch_database_find_message_by_filename() functions did not properly report error condition to the library user. For more information, read the thread on the notmuch mailing list starting with my mail "id:871uv2unfd.fsf@gmail.com" Make these functions accept a pointer to 'notmuch_message_t' as argument and return notmuch_status_t which may be used to check for any error condition. restore: Modify for the new notmuch_database_find_message() new: Modify for the new notmuch_database_find_message_by_filename()
| * lib: destroy message object after message removalAli Polatel2011-10-04
| | | | | | | | | | notmuch_database_remove_message() must call notmuch_message_destroy() once it is done handling message removal.
* | python: fix Message.get_filenames()Thomas Jost2011-10-01
|/ | | | | | | Previously, the Filenames generator only yielded *one* filename before returning, making Message.get_filenames() behave as Message.get_filename(). This commit fixes this incorrect behavior: now the generator yields all the filenames, as expected.
* python: rework creating of SubclassesSebastian Spaeth2011-09-30
| | | | | | | | | | | Add some smart magic, so that when we invoke a NotmuchError(STATUSVALUE), a nicely derived subclass is created, e.g. a OutOfMemoryError. This way users can easily distinguish between error types, while still catching NotmuchError. I have tested this, and hope it works for others too. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* python: provide more exception classesJustus Winter2011-09-30
| | | | | | | | | | | | | | | | | To make the exception handling more effective in code using the python bindings it is necessary to differentiate between the different kind of failures. Add an exception class for each status code and add a decode classmethod to the NotmuchError class that acts as a factory. Import the new classes in __init__.py so they can be easily imported by anyone. Patch modifed by Sebastian Spaeth. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: fix docstring of Message.get_header()Justus Winter2011-09-30
| | | | | | Update the docstring from notmuch.h. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: Add new functions in API documentationSebastian Spaeth2011-09-29
| | | | | | | Add documentation for the three new functions and add in which version they have been added. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* python: Improve code documentationSebastian Spaeth2011-09-29
| | | | | | | | 1) Fix added .gitignore from commit dc8a1745 to work on the docs folder 2) Improve in-code developer documentation to produce better sphinx-generated documentation. No code changes. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* NEWS: Note implementation bug for python bindingSebastian Spaeth2011-09-29
| | | | | | | | Make note that find_message_by_name currently crashes the python process if the Database is READ-ONLY. This should be fixed in the underlying libnotmuch. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* NEWS: Update with python binding newsSebastian Spaeth2011-09-29
| | | | | | List major changes. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* properly raise exceptions in python bindingsJustus Winter2011-09-29
| | | | | | | There are various locations where exceptions are constructed but not raised. This patch adds the necessary raise statements. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: raise a more specific error in Messages.print_messagesJustus Winter2011-09-29
| | | | | | | | | | | Raising Exception is considered bad since the only way to catch it is to do 'except Exception'. Raising a TypeError is more appropriate. Since the format parameter has already been validated, checking it again is not necessary. Simplify this conditional. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: rename _verify_dir_initialized to _assert_dir_is_initializedJustus Winter2011-09-29
| | | | | | | | | | | Rename the function to clarify its effect and remove all the comments accompanying each call to the function. Modified by Sebastian Spaeth to apply cleanly again and remove some blank lines. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de> Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* python: rename _verify_initialized_db to _assert_db_is_initializedJustus Winter2011-09-29
| | | | | | | | | | | Rename the function to clarify its effect and remove all the comments accompanying each call to the function. Modified slightly by Sebastian Spaeth to catch all new instances and remove some blank lines too. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: fix NotmuchError.__str__ if status == NoneJustus Winter2011-09-29
| | | | | | | Passing None to STATUS.status2str raises an ArgumentError. Add a check for this case and provide a generic message. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: add status and message attributes to NotmuchErrorJustus Winter2011-09-29
| | | | | | | Providing exception objects with meaningful attribute names is much nicer than using e.args[]. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: add a .gitignore file and refine the toplevel oneJustus Winter2011-09-29
| | | | | | | | | | | | The line 'notmuch' in the toplevel .gitignore file is to broad and matches bindings/python/notmuch making it cumbersome to git-add files within that directory. Refine the toplevel file to only match the generated notmuch executable and add a more specialized .gitignore file to the python directory. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: add begin|end_atomic bindingsSebastian Spaeth2011-09-28
| | | | | | | | | * Add UNBALANCED_ATOMIC status code Catch up with the notmuch status codes, and add the UNBALANCED_ATOMIC one. * Add the begin_atomic and end_atomic calls to libnotmuch Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* python: Add database_find_message_by_filename bindingsSebastian Spaeth2011-09-28
| | | | | | Add it :-) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* NEWS: add item for python bindings.David Bremner2011-09-26
| | | | Just the one unicode related change this release.
* NEWS: add item for Ruby bindings.David Bremner2011-09-26
| | | | This is based on a quick scan of git log.
* NEWS: start release notes for 0.9David Bremner2011-09-26
| | | | | Thanks to Austin Clements for providing these notes, and the patches they describe.
* debian: add brief summary of changes since 0.8David Bremner2011-09-25
|
* debian: build-depend on gdbDavid Bremner2011-09-25
| | | | This is needed to enable the atomicity tests at build time.
* test/atomicity: redirect output from "which"David Bremner2011-09-25
| | | | | Without redirection, this produced some slightly confusing output in case gdb was present.
* debian: close bug 642240David Bremner2011-09-24
| | | | | The bug was really closed by the commit that updated the dependency, of course.
* test: make atomicity setup conditional on gdb being present.David Bremner2011-09-24
| | | | | | | The setup is useless if gdb is not present, so it doesn't hurt to skip it. The diff here is huge, but the commit is really just moving most of the script inside the initial if, and adding an else block to print a warning.
* lib: bump library minor version because of new symbols.David Bremner2011-09-24
| | | | | This bump is because of the new symbols introduced by the atomicity patches.
* debian: set versioned dependency on notmuch for notmuch-emacsDavid Bremner2011-09-24
| | | | | | As long as we have no version information in the json output, this seems like the only possible way of ensuring that the emacs client code understands the output from the command line tool notmuch.
* version: bump to 0.9~rc1David Bremner2011-09-24
| | | | | This version number change should not be taken as definitive, rather refer to the signed tag.
* debian: changlog stanza for release candidateDavid Bremner2011-09-24
|
* debian: new symbols for atomicity apiDavid Bremner2011-09-24
| | | | | There are three new symbols in libnotmuch. In addition to notmuch_{begin,end)_atomic, notmuch_database_find_message_by_filename was exposed.
* lib: Improve notmuch_database_{add,remove}_message documentation.Austin Clements2011-09-24
| | | | | | | | State up front that these functions may add a filename to an existing message or remove only a filename (and not the message), respectively. Previously, this key information was buried in return value documentation or in "notes", which made it seem secondary to these functions' semantics.
* new: Wrap adding and removing messages in atomic sections.Austin Clements2011-09-24
| | | | | | This addresses atomicity of tag synchronization, the last atomicity problems in notmuch new. Each message add or remove is wrapped in its own atomic section, so interrupting notmuch new doesn't lose progress.
* new: Synchronize maildir flags eagerly.Austin Clements2011-09-24
| | | | | | | | | | | | Because flag synchronization is stateless, it can be performed at any time as long as it's guaranteed to be performed after any change to a message's filename list. Take advantage of this to synchronize tags immediately after a filename is added or removed. This does not yet make adding or removing a message atomic, but it is a big step toward atomicity because it reduces the window where the database tags are inconsistent from nearly the entire notmuch-new to just around when the message is added or removed.
* new: Cleanup. De-duplicate file name removal code.Austin Clements2011-09-24
| | | | | | | | | Previously, file name removal was implemented identically in two places. Now it's captured in one function. This is important because file name removal is about to get slightly more complicated with eager tag synchronization and correct removal atomicity.
* new: Cleanup. Put removed/renamed message count in add_files_state_t.Austin Clements2011-09-24
| | | | | | Previously, pointers to these variables were passed around individually. This was okay when only one function needed them, but we're about to need them in a few more places.
* lib: Wrap notmuch_database_add_message in an atomic section.Austin Clements2011-09-24
| | | | | | | | Adding a message may involve changes to multiple database documents, and thus needs to be done in a transaction. This makes add_message (and, I think, the whole library) atomicity-safe: library callers only needs to use atomic sections if they needs atomicity across multiple library calls.
* lib: Add an API to find a message by filename.Austin Clements2011-09-24
| | | | | | | | | notmuch_database_find_message_by_filename is mostly stolen from notmuch_database_remove_message, so this patch also vastly simplfies the latter using the former. This API is also useful in its own right and will be used in a later patch for eager maildir flag synchronization.
* ruby: New exception Notmuch::UnbalancedAtomicErrorAli Polatel2011-09-24
| | | | | This exception wraps NOTMUCH_STATUS_UNBALANCED_ATOMIC which was added with the commit e59cc0031fbf84f49e32dedb9927f427d2c49309.
* ruby: Wrap notmuch_database_{begin,end}_atomicAli Polatel2011-09-24
| | | | | | | | | | | Adding ruby wrappers for functions: - notmuch_database_begin_atomic() - notmuch_database_end_atomic() added by 957f1ba3fc1d737887029ff1787fc6bea94de00b New functions: Notmuch::Database.begin_atomic() Notmuch::Database.end_atomic()
* ruby: Rename destroy to destroy!Ali Polatel2011-09-24
| | | | | | | | | | | | | | | | | According to the common Ruby function naming convention, potentially dangerous functions or functions which operate on the object itself are suffixed with an exclamation mark. Both of these are true for object destroying functions. The following modules are affected: - Notmuch::Directory - Notmuch::FileNames - Notmuch::Query - Notmuch::Threads - Notmuch::Thread - Notmuch::Messages - Notmuch::Message - Notmuch::Tags
* lib: Remove message document directly after removing the last file name.Austin Clements2011-09-23
| | | | | | | | | | | | Previously, notmuch_database_remove_message would remove the message file name, sync the change to the message document, re-find the message document, and then delete it if there were no more file names. An interruption after sync'ing would result in a file-name-less, permanently un-removable zombie message that would produce errors and odd results in searches. We could wrap this in an atomic section, but it's much simpler to eliminate the round-about approach and just delete the message document instead of sync'ing it if we removed the last filename.
* lib: Indicate if there are more filenames after removal.Austin Clements2011-09-23
| | | | | | Make _notmuch_message_remove_filename return NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID if the message has more filenames and fix callers to handle this.