aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-06-29new: Don't update DB mtime if FS mtime equals wall-clock time.Austin Clements
This fixes a race where multiple message deliveries in the same second with an intervening notmuch new could result in messages being ignored by notmuch (at least, until a later delivery forced a rescan). Because mtimes only have second granularity, later deliveries in the same second won't change the directory mtime, and hence won't trigger notmuch new to rescan the directory. This situation can only occur when notmuch new is being run at the same second as the directory's modification time, so simply don't update the saved mtime in this case. This very race happens all over the test suite, and is currently compensated for with increment_mtime (and, occasionally, luck). With this change, increment_mtime becomes unnecessary.
2011-06-29test: revert non-intentional changes introduced in eb4cf465Pieter Praet
eb4cf465 introduces changes which weren't part of the submitted patch (id:"87liwlip2j.fsf@gmail.com"), presumably made during resolving merge conflicts. The first one causes the title of a test to be printed a second time, in place of the correct title: PASS Message with .. in Message-Id: PASS Message with .. in Message-Id: instead of: PASS Message with .. in Message-Id: PASS Sending a message via (fake) SMTP The second one is simply the insertion of a line break, so no harm there. This commit reverts both changes, as they were clearly accidental. Signed-off-by: Pieter Praet <pieter@praet.org>
2011-06-29Fix folder: coherence issueMark Anderson
Add removal of all ZXFOLDER terms to removal of all XFOLDER terms for each message filename removal. The existing filename-list reindexing will put all the needed terms back in. Test search-folder-coherence now passes. Signed-off-by:Mark Anderson <ma.skies@gmail.com>
2011-06-29test: Use increment_mtime rather than sleepCarl Worth
The sleep was to force the directory's mtime to advance between the previous notmuch new and the subsequent rm;notmuch new. The current convention is to use the existing increment_mtime function for this purpose, (which avoids the test suite being slowed down by calls to sleep). Thanks to Austin Clements for noticing this undesired sleep.
2011-06-29test:Folder tags shouldn't match after removal of file in given folderMark Anderson
Test for bug. Current stemming support for notmuch adds extra terms to the DB which aren't removed when the file renames are detected. When folder tags are added to a message, Xapian terms for both XFOLDER and ZXFOLDER are generated. When one of the filenames are renamed/removed, only the XFOLDER tags are removed, leaving it possible for a match on a folder: tag that was previously but is no longer a match in the maildir.
2011-06-29debian/changelog: Add note that notmuch-vim description is in (bug #631974)Carl Worth
This note will automatically cause the bug entry to be closed as fixed when the next package (including this change) is uploaded.
2011-06-29TODO: Add note to fix race condition with directory mtime.Carl Worth
I recently discussed fixing this with Austin, but want to record it here just in case we don't remember to fix it right away.
2011-06-28test: fix tests after notmuch show output changes related to filenamesDmitry Kurochkin
Adding the filename propery alongside ID and Content-type. This makes the test suite pass again after the recent change.
2011-06-28Add part filename and content-id in notmuch show output if available.Dmitry Kurochkin
Before the change, notmuch show output had filename only for parts with "Content-Disposition: attachment". But parts with inline disposition may have filename as well. The patch makes notmuch show always output filename if available, independent of Content-Disposition. Both JSON and text output formats are changed. Also, the patch adds Content-id to text output format of notmuch show. The main goal of these changes is to have filenames on Emacs buttons for inline attachments. In particular, this is very helpful for inline patches. Note: text format changes may require updates in clients that use it. The changes are: * text part header format changed from: ^Lpart{ ID: 2, Content-type: text/x-diff to: ^Lpart{ ID: 2, Filename: cool-feature.patch, Content-type: text/x-diff * attachment format changed from: ^Lattachment{ ID: 4, Content-type: application/octet-stream Attachment: data.tar.bz2 (application/octet-stream) Non-text part: application/octet-stream ^Lattachment} to: ^Lattachment{ ID: 4, Filename: data.tar.bz2, Content-type: application/octet-stream Non-text part: application/octet-stream ^Lattachment}
2011-06-28test: use emacsclient(1) for Emacs testsDmitry Kurochkin
Before the change, every Emacs test ran in a separate Emacs instance. Starting Emacs many times wastes considerable time and it gets worse as the test suite grows. The patch solves this by using a single Emacs server and emacsclient(1) to run multiple tests. Emacs server is started on the first test_emacs call and stopped when test_done is called. We take care not to leave orphan Emacs processes behind when test is terminated by whatever reason: Emacs server runs a watchdog that periodically checks that the test is still running. Some tests need to provide user input. Before the change, this was done using echo(1) to Emacs stdin. This no longer works and instead `standard-input' variable is set accordingly to make `read' return the appropriate string.
2011-06-28test: Increment mtime when delivering a message with emacs_deliver_messageCarl Worth
Without this, mail messages delivered by emacs_deliver_message might not be seen by the next invocation of "notmuch new", (which can lead to test-suite failures if emacs_deliver_message is fast enough).
2011-06-28test:Improve test behaviors when --root is usedMark Anderson
Change add_email_corpus, emacs_deliver_message and tests to use $TEST_DIRECTORY instead of '..'. This improves the behavior of the usage of --root=<dir>, as the assumption of what '..' means will usually be incorrect. Document -root option in README and update valgrind to work with -root.
2011-06-28test: generate run_emacs script once on test startupDmitry Kurochkin
Instead of generating auxiliary run_emacs script every time test_emacs is run, do it once in the beginning of the test. Also, use absolute paths in the script to make it more robust.
2011-06-28test: set variables using `let' instead of `setq' in Emacs testsDmitry Kurochkin
Using `setq' for setting variables in Emacs tests affect other tests that may run in the same Emacs environment. Currently it works because each test is run in a separate Emacs instance. But in the future multiple tests will run in a single Emacs instance. The patch changes all variables to use `let', so the scope of the change is limited to a single test.
2011-06-28test: use emacs_deliver_message in Emacs SMTP send testDmitry Kurochkin
Minor changes to expected results of other Emacs tests were needed because the message Date header changed.
2011-06-28test: remove some sed(1) calls in Emacs testsDmitry Kurochkin
Few Emacs tests used sed(1) to remove unexpected output in the beginning to avoid getting confused by messages such as "Parsing /home/cworth/.mailrc... done". This is no longer needed since tests are run in a temporary home directory instead of the user's one. So remove these sed(1) calls.
2011-06-28test: save buffer content to file instead of printing it in Emacs testsDmitry Kurochkin
Before the change, the common Emacs test scheme was to print buffer content to stdout and redirect it to a file or capture it in a shell variable. This does not work if we switch to using emacsclient(1) for running the tests, because you can not print to the stdout in this case. (Actually, you can print to stdout from Emacs server, but you can not capture the output on emacsclient(1)). The patch introduces new Emacs test auxiliary functions: `test-output' and `test-visible-output'. These functions are used to save buffer content to a file directly from Emacs. For most tests the changes are trivial, because Emacs stdout output was redirected to a file anyway. But some tests captured the output in a shell variable and compare it with the expected output using test_expect_equal. These tests are changed to use files and test_expect_equal_file instead. Note: even if we do not switch Emacs tests to emacsclient(1), the patch makes tests cleaner and is an improvement.
2011-06-28test: wrap and indent test_emacs callsDmitry Kurochkin
Most test_emacs calls have long arguments that consist of many expressions. Putting them on a single line makes it hard to read and produces poor diff when they are changed. The patch puts every expression in test_emacs calls on a separate line.
2011-06-28test: cleanup test_emacsDmitry Kurochkin
Move auxiliary function definition and configuration from command line to test-lib.el.
2011-06-28test: do not set `message-signature' in test_emacsDmitry Kurochkin
It is no longer needed since tests are run in a temporary home directory instead of the user's one.
2011-06-28test: fix argument order of test_expect_equal_file in few testsDmitry Kurochkin
Few Emacs tests had test_expect_equal_file arguments in the wrong order: the first argument should be the test output and the second one should be the expected.
2011-06-28TODO: Clarify note about changing the way the emacs '*' command works.Carl Worth
Additional detail is available in this mail message: id:8739itagad.fsf@yoom.home.cworth.org
2011-06-28libnotmuch: build symbols list without relying on gcc -aux-info.David Bremner
Carl reports "gcc -aux-info notmuch.aux lib/notmuch.h" does not generate notmuch.aux for him with Debian gcc 4.6.0-8. A small modification of the original sed regular expression allows us to work directly from lib/notmuch.h, rather than preprocessing with gcc. As with most such simple regex based "parsing", this is quite sensitive to the input format, and needs that each symbol to be exported from libnotmuch should - start with "notmuch_" - be the first non-whitespace token on the line - be followed by an open parenthesis. (Cherry-picked from 51b7ab69687, with conflicts resolved by db)
2011-06-28.gitignore: Ignore the notmuch.sym file.Carl Worth
This is a generated file, so will not be under git control.
2011-06-28search --output=files: Output all filenames for each matching messageMark Anderson
Messages in the database can have multiple files associated with a single message-id, but until now only one filename for each message has been reported by "notmuch search --output=files" Signed-off-by: Mark Anderson <ma.skies@gmail.com>
2011-06-28test:Expect multiple filenames for message with multiple filesMark Anderson
Update the test mail corpus to have two files with the same content to expose the bug where a single message with multiple filenames only reports a single filename. Update expected results for search --output=files to match new behavior for multiple files corresponding to a single message Signed-off-by: Mark Anderson <ma.skies@gmail.com>
2011-06-28Makefile: Make emacs compilation depend on global dependencies.Carl Worth
We call these "global_deps" for a reason, after all! Without this, emacs compilation would proceed even if the configure script failed, (such as for a missing dependency). That's undesirable as it can cause the helpful error messages from the configure failure to scroll away.
2011-06-28libnotmuch: build symbols list without relying on gcc -aux-info.David Bremner
Carl reports "gcc -aux-info notmuch.aux lib/notmuch.h" does not generate notmuch.aux for him with Debian gcc 4.6.0-8. A small modification of the original sed regular expression allows us to work directly from lib/notmuch.h, rather than preprocessing with gcc. As with most such simple regex based "parsing", this is quite sensitive to the input format, and needs that each symbol to be exported from libnotmuch should - start with "notmuch_" - be the first non-whitespace token on the line - be followed by an open parenthesis.
2011-06-28libnotmuch: fix typos in CLEAN setting, add fileDavid Bremner
- c0961e6 introduced a missing slash between $(dir)$(LIBNAME) and missing $(dir) in front of libnotmuch.a - cdf1c70a created a file $(dir)/notmuch.h.gch and neglected to add it to CLEAN
2011-06-24python: Do not implicitely call maildir_flags_to_tags etcSebastian Spaeth
In order to remain consistent with the underlying C API, we do not automatically synchronize notmuch tags and maildir flags anymore. The underlying functions Message.maildir_flags_to_tags and Message.tags_to_maildir_flags still exist and are available to the user. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-06-23test: remove useless test_emacs call from an emacs FCC testDmitry Kurochkin
This was inadvertently left over when debugging an early version of this commit. -Carl Worth <cworth@cworth.org> (cherry picked from commit 8bf0c1c3deb49d54e86c04826a05f0217a81cf47)
2011-06-23Fix wrong-type-argument lisp error in `notmuch-fcc-header-setup'Dmitry Kurochkin
This error occurs when `notmuch-fcc-dirs' is set to a list. The error was in the `notmuch-fcc-dirs' format check which was changed in an incompatible way from 0.4 to 0.5. The fix was extracted from a bigger patch series by David Edmondson id:"1290682750-30283-2-git-send-email-dme@dme.org". Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net> (cherry picked from commit ce08571428dc784e279b28527f8073a1a05d7c37)
2011-06-23test: Test emacs message composing with various values for notmuch-fcc-dirsCarl Worth
We exercise each of the documented values (nil, a string, and a list). For the list, we test matching a specific entry, matching a catch-all regular expression, and no match at all (in which case there is no FCC set). (cherry picked from commit 76b54f1898e97f6d07d0eaaf04a1772e60a7c48d)
2011-06-23Merge remote-tracking branch 'origin/master'David Bremner
2011-06-23test: remove useless test_emacs call from an emacs FCC testDmitry Kurochkin
This was inadvertently left over when debugging an early version of this commit. -Carl Worth <cworth@cworth.org>
2011-06-23debian: fix installation of notmuch-vim READMEDavid Bremner
There was a leftover override, installing it into the wrong package.
2011-06-23Add dir-locals style variables for C++, Elisp, and shell code.Austin Clements
Also, slightly reformat dir-locals.el so that the settings align and to make it friendlier for future additions.
2011-06-23fix sum moar typos [test-case data]Pieter Praet
Various typo fixes in some test-case data. Signed-off-by: Pieter Praet <pieter@praet.org> Edited-by: Carl Worth <cworth@cworth.org> Restricted to just test-case data.
2011-06-23fix sum moar typos [error messages]Pieter Praet
Various typo fixes in error messages within the source code. Signed-off-by: Pieter Praet <pieter@praet.org> Edited-by: Carl Worth <cworth@cworth.org> Restricted to just error messages.
2011-06-23fix sum moar typos [user-visible documentation in code]Pieter Praet
Various typo fixes in documentation within the code that can be made available to the user, (emacs function help strings, "notmuch help" output, notmuch man page, etc.). Signed-off-by: Pieter Praet <pieter@praet.org> Edited-by: Carl Worth <cworth@cworth.org> Restricted to just documentation and fixed fix of "comman" to "common" rather than "command".
2011-06-23fix sum moar typos [comments in source code]Pieter Praet
Various typo fixes in comments within the source code. Signed-off-by: Pieter Praet <pieter@praet.org> Edited-by: Carl Worth <cworth@cworth.org> Restricted to just source-code comments, (and fixed fix of "descriptios" to "descriptors" rather than "descriptions").
2011-06-23fix sum moar typos [build scripts, Makefiles]Pieter Praet
Various typo fixes in comments within the Makefile and other build scripts. Signed-off-by: Pieter Praet <pieter@praet.org> Edited-by: Carl Worth <cworth@cworth.org> Restricted to just build files.
2011-06-23start new changelog stanzaDavid Bremner
2011-06-23fix sum moar typos [text files]Pieter Praet
Various typo fixes in auxiliary text files included with the source, (README, TODO, etc.). Signed-off-by: Pieter Praet <pieter@praet.org> Edited-by: Carl Worth <cworth@cworth.org> Restricted to just text files.
2011-06-23Revert "debian: Override RPATH_LDFLAGS"David Bremner
This reverts commit fc126d89b2baa479d98c864fbef4174b6da707c0. This override of the make variable RPATH_LDFLAGS should no longer be required since the auto-configuration was fixed
2011-06-23Fix wrong-type-argument lisp error in `notmuch-fcc-header-setup'Dmitry Kurochkin
This error occurs when `notmuch-fcc-dirs' is set to a list. The error was in the `notmuch-fcc-dirs' format check which was changed in an incompatible way from 0.4 to 0.5. The fix was extracted from a bigger patch series by David Edmondson id:"1290682750-30283-2-git-send-email-dme@dme.org". Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
2011-06-23test: Test emacs message composing with various values for notmuch-fcc-dirsCarl Worth
We exercise each of the documented values (nil, a string, and a list). For the list, we test matching a specific entry, matching a catch-all regular expression, and no match at all (in which case there is no FCC set).
2011-06-23debian: Set conflicts from package split to point to an existing version.David Bremner
The previous version was harmless, since there were no versions uploaded between ~237 and ~254, but this is less confusing.
2011-06-23debian: fix typo in short description of notmuch-vimDavid Bremner
Thanks to Dirk Eddelbuettel for noticing.
2011-06-23debian: update changelog for upload 0.6~254, bump standards version to 3.9.2debian/0.6_254David Bremner