aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* ruby: Rename destroy to destroy!Gravatar 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.Gravatar 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.Gravatar 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.
* lib: Add support for nested atomic sections.Gravatar Austin Clements2011-09-23
| | | | | | | 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.
* lib: Add notmuch_database_{begin,end}_atomic.Gravatar Austin Clements2011-09-23
| | | | | | These operations translate into non-flushed Xapian transactions, allowing arbitrary groups of database operations to be performed atomically.
* new: Defer updating directory mtimes until the end.Gravatar Austin Clements2011-09-23
| | | | | | | | 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.
* python: Ensure that we pass utf-8 encoded string to libnotmuchGravatar Martin Owens2011-09-16
| | | | | | | | | | | | 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>
* new: Don't lose messages on SIGINT.Gravatar Austin Clements2011-09-13
| | | | | | | | 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.
* test: use test_expect_equal_file in atomicityGravatar David Bremner2011-09-13
| | | | | The documentation claims this is more robust, and it seems to work fine to switch to the _file variant.
* test: Convert atomicity test to use test_subtest_known_brokenGravatar David Bremner2011-09-13
| | | | This is required because test_expect_equal_failure went away.
* test: Test atomicity of notmuch new.Gravatar Austin Clements2011-09-12
| | | | | | | 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.
* lib: Add missing status check in _notmuch_message_remove_filename.Gravatar Austin Clements2011-09-12
| | | | | | 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.
* test: Report test failures from test_expect_*Gravatar Austin Clements2011-09-12
| | | | | | 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.
* test: Fix message when skipping test_expect_equal* testsGravatar Austin Clements2011-09-12
| | | | | | 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.
* test: reset test_subtest_known_broken_ after each success/failure.Gravatar David Bremner2011-09-12
| | | | | | | | | | | 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.
* Add missing call to g_type_init()Gravatar Aaron Ecay2011-09-10
| | | | | | | | | 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
* test: mark multipart rfc822 part test as brokenGravatar David Bremner2011-09-10
| | | | | | 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.
* test: remove documentation for test_expect_equal_failure.Gravatar David Bremner2011-09-10
| | | | The actual function was deleted in commit 4cc67276
* test: add emacs test for hiding a message following an HTML partGravatar Dmitry Kurochkin2011-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* test: improve known broken tests supportGravatar Dmitry Kurochkin2011-09-10
| | | | | | | | | | | | | | | | | 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.
* test: update documentation for test_emacs in test/READMEGravatar Dmitry Kurochkin2011-09-10
| | | | | | 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.
* Merge branch 'release'Gravatar David Bremner2011-09-10
|\
| * update date in NEWS to better approximate real release date for 0.8Gravatar David Bremner2011-09-10
| |
| * debian: update changelog for 0.8Gravatar David Bremner2011-09-10
| |
| * update versions for release 0.8Gravatar David Bremner2011-09-10
| | | | | | | | See commit 6979b65 for more discussion.
| * NEWS: add blurb for python bindings changesGravatar David Bremner2011-09-10
| |
| * add news item for rubyGravatar David Bremner2011-09-09
| |
| * NEWS: add item for build system fixesGravatar David Bremner2011-09-08
| | | | | | | | Sed was POSIXed and use of nm dumbed down, replaced by awk hackery.
* | Do not attempt to output part raw if part is not GMimePart.Gravatar Jameson Graef Rollins2011-09-07
|/ | | | | | | | | | | 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.
* update versions for release candidateGravatar David Bremner2011-09-06
| | | | | | | | | | 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.
* Add NEWS item output improvements to rfc822 part handling.Gravatar Jameson Graef Rollins2011-09-06
|
* emacs: Improve support for message/rfc822 parts.Gravatar Jameson Graef Rollins2011-09-05
| | | | | | | The insert-part-message/rfc822 function is overhauled to properly processes the new formatting of message/rfc822 parts. The json output for message parts now includes "headers" and "body" fields, which are now parsed and output appropriately.
* Improve handling of message/rfc822 parts by adding a new header_message_part ↵Gravatar Jameson Graef Rollins2011-09-05
| | | | | | | | | function to the formating structure. This new function takes a GMimeMessage as input, and outputs the formatted headers. This allows for message/rfc822 parts to be formatted on output in a similar way to full messages (see previous patch that overhauls the multipart test for more info).
* test: overhaul multipart test to test for improved message/rfc822 handlingGravatar Jameson Graef Rollins2011-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main goal of this overhaul is to define how message/rfc822 parts should be handled. message/rfc822 parts should be output in a similar fashion to the outer message, including some subset of the rfc822 headers. The following decisions about formatting of message/rfc822 parts were made: The format and content of message/rfc822 parts shall be as similar as possible to that of full messages. In particular, for formatted outputs, the "content" of rfc822 part output should include "headers" and "body" fields). The "body" field shall include the body of the message. The "headers" field shall include the following headers, since these are the ones available from the GMimeMessage: "From" "To" "Cc" "Subject" "Date" However, for the case of --format=raw the raw rfc822 should be output, including all headers. A subset of relevant headers shall be output in reply. The test embedded rfc822 message is also modified to be itself multipart, so we can more fully test how all sub parts of the message part are output. Note added by Committer: Currently, expect one test (--format=raw --part=3, rfc822 part) to fail.
* Merge branch 'master' of ssh://notmuchmail.org/git/notmuchGravatar Sebastian Spaeth2011-09-05
|\
* | python: Make Database take unicode pathsGravatar Sebastian Spaeth2011-09-05
| | | | | | | | | | | | | | | | Decode and Encode from/to unicode objects as required to be able to take unicode path names. Previously we would error out when an unicode object were handed it. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
| * test: Fix date in test message in multipart test.Gravatar Jameson Graef Rollins2011-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test message date, "Tue, 05 Jan 2001 15:43:57 -0000", is not actually a real date. 05 Jan 2001 was in fact a Friday, not a Tuesday. Date parsers (such as "date" in coreutils) will return "Fri" as the day for this string, even if "Tue" is specified. Also, the time zone "-0000" is actually always returned as "+0000", so we change that here was well. This will be relevant for later patches when we begin parsing rfc822 part headers, where gmime returns a parsed date string. If we do want to test date parsing, we should do that in a separate test.
| * test: some small fixes to multipart testGravatar Jameson Graef Rollins2011-09-05
| | | | | | | | | | | | | | | | There were two "--format=text --part=0" tests. One of them was supposed to be a test for "--format=text --part=1". There were also two errant "test_expect_equal_file OUTPUT EXPECTED" lines, that are removed here.
| * build system: Check that python bindings have consistent version when releasingGravatar David Bremner2011-09-05
| | | | | | | | | | | | | | Thanks to Sebastian Spaeth breaking out version.py, this can be done without loading notmuch.py, or using sed. version.py is not (yet) autogenerated because it seems more important to minimize the differences between the tagged version and the tarball.
| * lib/gen-version-script.h: add getline and getdelim to notmuch.sym if neededGravatar David Bremner2011-09-05
| | | | | | | | | | | | | | | | If the configure script detects missing getline and/or getdelim symbols, then notmuch will use it's own versions. This patch, based on id:"87k49v12i5.fsf@pc44es141.cs.uni-magdeburg.de" by Matthias Guedemann, adds the symbols to notmuch.sym as well so they are properly exported from the library.
| * lib/gen-version-script.sh: replace --defined argument to nm with awkGravatar David Bremner2011-09-05
| | | | | | | | | | | | | | | | | | | | OpenBSD nm apparently doesn't support --defined. The awk condition is based on the assumption that all defined symbols have some hex number in the first column. Thanks to Matthias Guedemann reporting the problem, and an earlier version of this patch.
| * fix checking whether header is member of message-hidden-headersGravatar Tomi Ollila2011-08-25
|/ | | | | | | | Emacs lisp function 'member' takes element and list as an argument. I.e. the second argument is list, not symbol referencing the list. On emacs 23.x the member call always returned nil (thus buggy), on emacs 22.x the call failed, making it unusable.
* python: Have setup.py read the version number without importingGravatar Sebastian Spaeth2011-08-24
| | | | | | | | | | | | | | Importing the notmuch module in setup.py is a no-no, and we want to auto-generate the version number in the release process. Outsource __VERSION__ to the new version.py which contains nothing else and which can therefor easily be autogenerated. Have setup.py read in the file via execfile and test if importing the version number actually worked. This should make all happy. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* python: Updated development status and wording in setup.pyGravatar Sebastian Spaeth2011-08-24
| | | | | | | We are beyond pre-alpha, and the Requirements wording could take some tweaking. Done. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Revert "python: Simplify setup.py"Gravatar Sebastian Spaeth2011-08-24
| | | | | | | | | | | | This reverts commit 8826fc2d7b4e59afdd8cea06891a0c43245340c5. It seems that importing the module in setup.py is controversial at best, as it will fail for users that don't have all dependencies installed. This was the case in e.g. the Ubuntu autobuilder, so building notmuch failed. The plan is to create an autogenerated setup.py that can be used for version information. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Merge branch 'master' of ssh://notmuchmail.org/git/notmuchGravatar Sebastian Spaeth2011-08-23
|\
* | python: Simplify setup.pyGravatar Sebastian Spaeth2011-08-23
| | | | | | | | | | | | | | | | | | We were using a template setup.py which parsed __init__.py in complex ways just to find out the version number. Simply import notmuch and use __VERSION__ directly. Also adapt some wording and setup.py values while going through. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
| * re-enable notmuch.sym generation using POSIX sedGravatar David Bremner2011-08-21
|/ | | | | | | | | Unfortunately Robin Green's patch 52e4dedf9aa was lost when I created gen-version-script.sh. This merges his changes manually into that script. It turns out tabs seem not needed in version script files, so I simplified a bit and removed the printf. Thanks to Alexander Botero-Lowry for help and testing.
* python: Fix unsafe utf-8 decodingsGravatar pazz2011-08-17
| | | | | | | | This prevents unsafe calls to decode for return value None in get_authors/get_subject which would current throw an Exception. Original patch modified by Sebastian Spaeth. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* decode headers from utf-8 to unicodeGravatar patrick2011-08-15
| | | | | as mail headers are stored as utf-8 in the index, it is safe to return them as unicode strings directly