summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-09-25debian: add brief summary of changes since 0.8debian/0.9_rc1-10.9_rc1David Bremner
2011-09-25debian: build-depend on gdbDavid Bremner
This is needed to enable the atomicity tests at build time.
2011-09-25test/atomicity: redirect output from "which"David Bremner
Without redirection, this produced some slightly confusing output in case gdb was present.
2011-09-24debian: close bug 642240David Bremner
The bug was really closed by the commit that updated the dependency, of course.
2011-09-24test: make atomicity setup conditional on gdb being present.David Bremner
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.
2011-09-24lib: bump library minor version because of new symbols.David Bremner
This bump is because of the new symbols introduced by the atomicity patches.
2011-09-24debian: set versioned dependency on notmuch for notmuch-emacsDavid Bremner
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.
2011-09-24version: bump to 0.9~rc1David Bremner
This version number change should not be taken as definitive, rather refer to the signed tag.
2011-09-24debian: changlog stanza for release candidateDavid Bremner
2011-09-24debian: new symbols for atomicity apiDavid Bremner
There are three new symbols in libnotmuch. In addition to notmuch_{begin,end)_atomic, notmuch_database_find_message_by_filename was exposed.
2011-09-24lib: Improve notmuch_database_{add,remove}_message documentation.Austin Clements
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.
2011-09-24new: Wrap adding and removing messages in atomic sections.Austin Clements
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.
2011-09-24new: Synchronize maildir flags eagerly.Austin Clements
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.
2011-09-24new: Cleanup. De-duplicate file name removal code.Austin Clements
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.
2011-09-24new: Cleanup. Put removed/renamed message count in add_files_state_t.Austin Clements
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.
2011-09-24lib: Wrap notmuch_database_add_message in an atomic section.Austin Clements
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.
2011-09-24lib: Add an API to find a message by filename.Austin Clements
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.
2011-09-24ruby: New exception Notmuch::UnbalancedAtomicErrorAli Polatel
This exception wraps NOTMUCH_STATUS_UNBALANCED_ATOMIC which was added with the commit e59cc0031fbf84f49e32dedb9927f427d2c49309.
2011-09-24ruby: Wrap notmuch_database_{begin,end}_atomicAli Polatel
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()
2011-09-24ruby: Rename destroy to destroy!Ali Polatel
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
2011-09-23lib: Remove message document directly after removing the last file name.Austin Clements
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.
2011-09-23lib: Indicate if there are more filenames after removal.Austin Clements
Make _notmuch_message_remove_filename return NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID if the message has more filenames and fix callers to handle this.
2011-09-23lib: Add support for nested atomic sections.Austin Clements
notmuch_database_t now keeps a nesting count and we only start a transaction or commit for the outermost atomic section. Introduces a new error, NOTMUCH_STATUS_UNBALANCED_ATOMIC.
2011-09-23lib: Add notmuch_database_{begin,end}_atomic.Austin Clements
These operations translate into non-flushed Xapian transactions, allowing arbitrary groups of database operations to be performed atomically.
2011-09-23new: Defer updating directory mtimes until the end.Austin Clements
Previously, if notmuch new were interrupted between updating the directory mtime and handling removals from that directory, a subsequent notmuch new would not handle those removals until something else changed in that directory. This defers recording the updated mtime until after removals are handled to eliminate this problem.
2011-09-16python: Ensure that we pass utf-8 encoded string to libnotmuchMartin Owens
If we use unicode objects, libnotmuch would not cope with null bytes in the byte array, so we need to make sure they are nicely formatted as utf-8. Introduce a helper function _str which does this throughout the code. Patch slightly modified by Sebastian Spaeth. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-09-13new: Don't lose messages on SIGINT.Austin Clements
Previously, message removals were always performed, even after a SIGINT. As a result, when a message was moved from one folder to another, a SIGINT between processing the directory the message was removed from and processing the directory it was added to would result in notmuch removing that message from the database.
2011-09-13test: use test_expect_equal_file in atomicityDavid Bremner
The documentation claims this is more robust, and it seems to work fine to switch to the _file variant.
2011-09-13test: Convert atomicity test to use test_subtest_known_brokenDavid Bremner
This is required because test_expect_equal_failure went away.
2011-09-12test: Test atomicity of notmuch new.Austin Clements
This tests notmuch new's ability to recover from arbitrary stopping failures. It interrupts notmuch new after every database commit and, on every resulting database snapshot, re-runs notmuch new to completion and checks that the final database state is invariant.
2011-09-12lib: Add missing status check in _notmuch_message_remove_filename.Austin Clements
Previously, this function would synchronize the folder list even if removing the file name failed. Now it returns immediately if removing the file name fails.
2011-09-12test: Report test failures from test_expect_*Austin Clements
This makes test_expect_* return non-zero if the test fails, so the caller can make decisions based on this, such as setting test prerequisites.
2011-09-12test: Fix message when skipping test_expect_equal* testsAustin Clements
For these types of tests, the test name is previously recorded in a variable, not passed to the test function, so pass this variable to test_skip.
2011-09-12test: reset test_subtest_known_broken_ after each success/failure.David Bremner
This means that test_subtest_known_broken needs to be called before every known broken subtest, which is no different than what is documented for the test_begin_subtest case. The assumption is that every test ends up calling either skipping, calling test_ok_ or test_failure_ and and the latter in turn delegate to the known_broken versions in the case where test_subtest_known_broken_ is set.
2011-09-10Add missing call to g_type_init()Aaron Ecay
The Glib docs state "Prior to any use of the type system, g_type_init() has to be called".[1] To not do so can lead to segfaults. The g_type system is currently used by various "filters" that operate on uuencoded text, message headers, etc. [1] http://developer.gnome.org/gobject/2.28/gobject-Type-Information.html#g-type-init
2011-09-10test: mark multipart rfc822 part test as brokenDavid Bremner
Using the new test_subtest_known_broken support thanks to Dmitry Kurochkin. This makes the output less scary until we can fix the underlying problems.
2011-09-10test: remove documentation for test_expect_equal_failure.David Bremner
The actual function was deleted in commit 4cc67276
2011-09-10test: add emacs test for hiding a message following an HTML partDmitry Kurochkin
Human-friendly scenario: * open a thread where a message which ends with an HTML part is followed by another message * make the first message visible * goto the beginning of the second message (first line, first colon) * hit "RET" Result: nothing happens except for "No URL at point" message Expected result: the second message is shown/hidden The root cause is that the HTML part has `keymap' text property set. In particular, "RET" is bound to visit a URL at point. The problem is that `keymap' property affects the next character following the region it is set to (see elisp manual [1]). Hence, the first character of the next message has a keymap inherited from the HTML part. [1] http://www.gnu.org/software/emacs/elisp/html_node/Special-Properties.html
2011-09-10test: improve known broken tests supportDmitry Kurochkin
There is existing support for broken tests. But it is not convenient to use. The primary issue is that we have to maintain a set of test_expect_*_failure functions which are equivalent to the normal test_expect_* counterparts except for what functions are called for result reporting. The patch adds test_subtest_known_broken function which marks a subset as broken, making the normal test_expect_* functions behave as test_expect_*_failure. All test_expect_*_failure functions are removed. Test_known_broken_failure_ is changed to format details the same way as test_failure_ does. Another benefit of this change is that the diff when a broken test is fixed would be small and nice. Documentation is updated accordingly.
2011-09-10test: update documentation for test_emacs in test/READMEDmitry Kurochkin
Update test_emacs documentation in test/README according to the latest changes in emacs tests. Move the note regarding setting variables from test/emacs to test/README.
2011-09-10Merge branch 'release'David Bremner
2011-09-10update date in NEWS to better approximate real release date for 0.80.8David Bremner
2011-09-10debian: update changelog for 0.8David Bremner
2011-09-10update versions for release 0.8David Bremner
See commit 6979b65 for more discussion.
2011-09-10NEWS: add blurb for python bindings changesDavid Bremner
2011-09-09add news item for rubyDavid Bremner
2011-09-08NEWS: add item for build system fixesDavid Bremner
Sed was POSIXed and use of nm dumbed down, replaced by awk hackery.
2011-09-07Do not attempt to output part raw if part is not GMimePart.Jameson Graef Rollins
This was a minor oversite in checking of part type when outputing content raw. This was causing gmime was to throw an exception to stderr. Unfortunately the gmime exception was not being caught by notmuch, or the test suite. I'm not sure if notmuch should have done anything in this case, but certainly the test suite should be capable of detecting that something unexpected was output to stderr.
2011-09-06update versions for release candidate0.8_rc1David Bremner
we now have three files to keep in sync. That seems wrong, but I guess we will live with it for now. The main problem is that the python code is distributed separately, so it can't get the version from 'version'. The choice ~rcX is for convenience with debian versioning.
2011-09-06Add NEWS item output improvements to rfc822 part handling.Jameson Graef Rollins