Tomi Ollila [Mon, 5 Dec 2011 11:39:32 +0000 (13:39 +0200)]
make release: remove LATEST-$(PACKAGE)-*
The tar file of particular package (notmuch in this case) is named
as $(PACKAGE)-$(VERSION).tar.gz. Therefore the best way to remove
previous link to LATEST is to remove all files beginning with
LATEST-$(PACKAGE)- and not relying how $(VERSION) string is constructed.
Tomi Ollila [Thu, 24 Nov 2011 20:41:01 +0000 (22:41 +0200)]
have LATEST-notmuch-<version>.tar.gz on releases web page
The notmuchmail/releases page used to have LATEST-notmuch-<version>
to link to the latest notmuch source tarball. This is confusing on
web page and on disk when the file has been downloaded. This change
looks a bit inconsistent with the 'rm' command just executed before.
$(TAR_FILE) is defined (currently) as $(PACKAGE)-$(VERSION).tar.gz;
as long as the prefix stays $(PACKAGE)-$(VERSION) and version begins
with a digit then this line is good in execution point of view.
Thomas Jost [Tue, 6 Dec 2011 10:03:22 +0000 (11:03 +0100)]
python: use wrapped notmuch_*_t types instead of raw pointers
Now that types are checked correctly, we also need to make sure that all the
arguments actually are instances of these types. Otherwise the function calls
will fail and raise an exception similar to this one:
ctypes.ArgumentError: argument 3: <type 'exceptions.TypeError'>: expected
LP_LP_NotmuchMessageS instance instead of pointer to c_void_p
Dmitry Kurochkin [Mon, 28 Nov 2011 22:41:07 +0000 (02:41 +0400)]
test: fix error messages for missing binary dependencies
The fake missing binary functions check if the binary has already be
added to the diagnostic message to avoid duplicates. Unfortunately,
this check was buggy because the message string does not have the
trailing space.
Dmitry Kurochkin [Mon, 28 Nov 2011 22:41:04 +0000 (02:41 +0400)]
test: fix test_require_external_prereq()
test_missing_external_prereq_${binary}_ variable indicates that the
binary is missing. It must be set in test_declare_external_prereq()
outside of the fake $binary() function.
Chris Gray [Tue, 29 Nov 2011 17:58:31 +0000 (10:58 -0700)]
emacs: Use notmuch-command variable in process-lines.
The process-lines function calls the notmuch binary. The location of
the binary may have been customized by the user, so it is better to
use the customized location rather than allowing the process-lines
function to search the user's PATH for the binary.
Thomas Schwinge [Sun, 27 Nov 2011 18:40:53 +0000 (13:40 -0500)]
dump: Don't sort the output by message id.
Asking xapian to sort the messages for us causes suboptimal IO patterns. This
would be useful, if we only wanted the first few results, but since we want
everything anyway, this is pessimization.
On 2011-10-29, a measurement on a 372981 messages instance showed that wall
time can be reduced from 28 minutes (sorted by Message-ID) to 15 minutes
(unsorted).
Austin Clements [Wed, 9 Nov 2011 13:44:35 +0000 (08:44 -0500)]
tag: Automatically limit to messages whose tags will actually change.
This optimizes the user's tagging query to exclude messages that won't
be affected by the tagging operation, saving computation and IO for
redundant tagging operations.
For example,
notmuch tag +notmuch to:notmuch@notmuchmail.org
will now use the query
( to:notmuch@notmuchmail.org ) and (not tag:"notmuch")
In the past, we've often suggested that people do this exact
transformation by hand for slow tagging operations. This makes that
unnecessary.
Dmitry Kurochkin [Sun, 27 Nov 2011 18:36:19 +0000 (22:36 +0400)]
test: fix "Stashing in notmuch-search" test when emacs is not available
If emacs is not available, test_expect_equal would be called with only
one argument. The patch fixes this by quoting the (possibly empty)
$(cat OUTPUT) argument.
Dmitry Kurochkin [Sun, 27 Nov 2011 18:36:15 +0000 (22:36 +0400)]
test: skip all subtests if external dependencies are missing during init
Some tests (e.g. crypto) do a common initialization required for all
subtests. The patch adds a check for missing external dependencies
during this initialization. If any prerequisites are missing, all
subtests are skipped.
The check is run on the first call of test_reset_state_ function, so
no changes for the tests are needed.
Dmitry Kurochkin [Sun, 27 Nov 2011 18:36:13 +0000 (22:36 +0400)]
test: add support for external executable dependencies
There is existing support for general prerequisites in the test suite.
But it is not very convenient to use: every test case has to keep
track for it's dependencies and they have to be explicitly listed.
The patch aims to add better support for a particular type of external
dependencies: external executables. The main idea is to replace
missing external binaries with shell functions that have the same
name. These functions always fail and keep track of missing
dependencies for a subtest. The result reporting functions later can
check that an external binaries are missing and correctly report SKIP
result instead of FAIL. The primary benefit is that the test cases do
not need to declare their dependencies or be changed in any way.
Build symbol-test with make instead of hardcoding in symbol-hiding.
If symbol-test is built in symbol-hiding with hardcoded g++ invokation,
it's not so easy to pass $(srcdir) which is required to find notmuch.h
when srcdir and builddir are separate directories.
Dmitry Kurochkin [Sat, 26 Nov 2011 06:12:26 +0000 (10:12 +0400)]
test: cleanup basic tests
Basic test 'Ensure that all available tests will be run by
notmuch-test' compares all tests that are run with listing of test/
directory. There is a growing list of exceptions for files and
directories which located in the test/ directory but are not tests.
Moreover some (probably buggy) tests do create files in the the test/
directory which may be left behind in case of failure. This makes the
basic test fail.
The patch changes the test to look only for regular executable files.
This makes the exception list much smaller. And since no tests should
create executables in the test/ directory (if there are, they should
be fixed), the basic test should not be affected by failed or
interrupted tests.
Dmitry Kurochkin [Fri, 18 Nov 2011 15:21:00 +0000 (19:21 +0400)]
test: fix sed error in basic tests
The error is easy to miss, because the test passes and stderr is not
printed. But if you run basic tests in verbose mode (./basic
--verbose), you get:
sed: can't read notmuch-test: No such file or directory
The issue is that sed command is given two files: notmuch-test and
$TEST_DIRECTORY/notmuch-test. And there is no notmuch-test file in
the current directory (test/tmp.basic/). The patch just removes the
non-existing file from the sed command.
Gregor Zattler [Thu, 24 Nov 2011 22:03:24 +0000 (23:03 +0100)]
emacs: test notmuch show with fourfold message indentation
Previous behaviour was to indent messages in a thread according
to depth by one space per level. This commit tests if setting
notmuch-indent-messages-width to `4' provides a message thread
with four spaces of indentation thread depth.
Gregor Zattler [Thu, 24 Nov 2011 22:03:23 +0000 (23:03 +0100)]
emacs: test: notmuch show without indentation
Previous behaviour was to indent messages in a thread according
to depth by one space per level. In
id:1311028119-50637-1-git-send-email-fgeller@gmail.com Felix
Geller proposed a patch in order to turn indentation off. This
commit tests if instead setting notmuch-indent-messages-width to
`0' does turn off indentation.
Gregor Zattler [Thu, 24 Nov 2011 22:03:22 +0000 (23:03 +0100)]
emacs: test notmuch-indent-messages-width default
Previous behaviour was to indent messages in a thread according
to depth by one space per level. This is still the case with
notmuch-indent-messages-width default value `1'. This test
succeeds if output with default value is same as in "Basic
notmuch-show view in emacs".
Gregor Zattler [Thu, 24 Nov 2011 22:03:21 +0000 (23:03 +0100)]
emacs: make message indentation width customisable
Till now Emacs UI indents messages according to their respecive
depth of neting in the thread. The actual width of indentation
per level is hardcoded to `1' space.
This patch makes message indentation customisable by introducing
a variable `notmuch-indent-messages-width' which defaults to `1',
which is the same as before. Felix could set this variable to
`0' in order to disable indentation, I tested it with a value of
`4' for a clearer separation of messages in a thread.
David Bremner [Thu, 24 Nov 2011 20:02:41 +0000 (16:02 -0400)]
CLI: update call to notmuch_help_command for new calling conventions.
When I changed the calling convention to pass in all but the zero-th
argument to subcommands, I missed this one call, resulting in a
segmentation fault.
As a bonus, the syntax "notmuch --help foo" is now equivalent to
"notmuch help foo".
Tomi Ollila [Mon, 21 Nov 2011 16:34:24 +0000 (18:34 +0200)]
make release: use sed to check debian version
Use common sed tool instead of dpkg-parsechangelog (which is usually
available on debian systems only) to verify that debian version
information is consistent with version file.
Tomi Ollila [Mon, 21 Nov 2011 15:55:20 +0000 (17:55 +0200)]
make release: verify-version-*: change comparison logic
verfy-version-debian, verify-version-python and verify-version-components
checked noneqality of the comparison strings and if got "positive"
answer then made that goal fail. But in case of the test ([ ])
execution failed it never got to the 'then' part of the line (and
the 'if [ ... ] then ... fi ' construct doesn't make the script line
fail in case of problems inside [ ].
This commit inverses the "logic", so that only if the comparison for
equality succeeds the script line will exit with 0 and execution
can continue past the failure case to the next line (executed by another
shell) with '@echo done'
Austin Clements [Mon, 21 Nov 2011 01:00:55 +0000 (20:00 -0500)]
emacs: Don't record undo information for search or show buffers.
There's no reason to record undo information for read-only,
programmatically-constructed buffers. The undo list just chews up
memory keeping track of our calls to insert.
Tomi Ollila [Mon, 21 Nov 2011 15:18:00 +0000 (17:18 +0200)]
debian/control: require dtach version >= 0.8 in Build-Depends
Since version 0.8 of dtach -n does no longer require controlling
tty to be present when executed. Currently controlling tty is not
always (if ever) present when tests are executed.
Jani Nikula [Fri, 23 Sep 2011 18:57:37 +0000 (21:57 +0300)]
emacs: Add new customization option to sort saved searches
Add new customization option notmuch-saved-search-sort-function to sort
saved searches in user-defined order. Provide a sort function to sort the
saved searches in alphabetical order. Setting the search function to nil
causes the saved searches not to be sorted, as before. This also remains
the default. The function only affects display of the saved searches, not
the order in which they are stored by custom.
emacs: breakout notmuch-show-advance functionality from notmuch-show-advance-and-archive
This patch breaks out much of the functionality of
notmuch-show-advance-and-archive into a new function:
notmuch-show-advance. This new function does all the advancing
through a show buffer that notmuch-show-advance-and-archive did,
without all the invasive thread archiving. The return value of
notmuch-show-advance is nil if the bottom of the thread is not
reached, and t if it is.
notmuch-show-advance-and-archive is modified to just call
notmuch-show-advance, and then call notmuch-show-archive-thread if the
return value is true. In this way the previous functionality of
notmuch-show-advance-and-archive is preserved.
This provides a way for people to rebind the space bar to a more sane
function if they don't like the default behavior.
Tom Prince [Sun, 13 Nov 2011 16:34:42 +0000 (11:34 -0500)]
Don't link libnotmuch if libutil isn't linked in properly.
For some reason, on my machine, the link is picking up
/usr/lib/libutil.so instead of util/libutil.a. This causes there to be
undefined symbols in libnotmuch, making it unuseable. This patch causes
the link to fail instead.
David Bremner [Fri, 18 Nov 2011 02:26:26 +0000 (22:26 -0400)]
RELEASING: document the semi-automated version propagation.
The instructions are purposely a bit coy about what files are updated,
so we don't have to update immediately when something else is plugged
into the make recipe.
David Bremner [Fri, 18 Nov 2011 02:26:25 +0000 (22:26 -0400)]
build system: add target update-versions to propagate version
The version from file "version" is propagated to the man page and the
python bindings via sed. Note that the git version is ignored because
of the check for MAKECMDGOALS.
Tomi Ollila [Tue, 8 Nov 2011 16:02:25 +0000 (18:02 +0200)]
test: make all tests terminable with Ctrl-c
Some tests don't break when HUP signal is sent tho those (by
pressing ctrl-c on the terminal). Therefore, the top-level
test script catches the HUP and sends TERM signal to the
started test script.
Tomi Ollila [Wed, 16 Nov 2011 21:25:19 +0000 (23:25 +0200)]
test: attempt to send QUIT to smtp-dummy in case mail send failed
If mail sending from emacs fails before it has chance to connect
to the smtp-dummy mail server, the opportunistic QUIT message
sending makes smtp-dummy to exit.
Tomi Ollila [Wed, 16 Nov 2011 20:50:06 +0000 (22:50 +0200)]
test: create dtach's session socket in $TEST_TMPDIR
Due to 108-character limit in unix domain socket path this change
is required; it is more probable that length of ${TMPDIR:-/tmp} is
shorter than length of path to the current directory of notmuch test
source directory. One can expect to create reasonable-length unix
domain sockets wherever $TMPDIR points to.
Tomi Ollila [Wed, 16 Nov 2011 19:09:00 +0000 (21:09 +0200)]
test: create TEST_TMPDIR for holding temporary files
The TEST_TMPDIR if first needed to hold dtach's socket (due
to 108-character limit in socket file names). Later it can be
used to hold other temporary files; directory deleted at exit.
David Bremner [Wed, 16 Nov 2011 11:44:00 +0000 (07:44 -0400)]
notmuch.1: bump version number
More of a leap than a bump. This is a bit silly keeping 3 files
syncronized. At least for this file, I would prefer a solution that
generates notmuch.1 from some template at build time.
David Bremner [Wed, 16 Nov 2011 11:41:44 +0000 (07:41 -0400)]
RELEASING: update description of "make release".
The additional "safety feature" documented here is motivated by the
fact that I use gpg-agent and I don't always get the GPG prompt that
Carl was relying on as an abort point. The new version also allows
more to be done in "dry run" mode.