Commit graph

1196 commits

Author SHA1 Message Date
David Edmondson
f920ff59b9 emacs/notmuch-show.el: Avoid passing unintended format strings to `message'
If the text being stashed included %, `message' was unhappy and
complained.
2010-04-19 10:15:09 -07:00
Carl Worth
f7c957f4de debian: Make git ignore several intermediate files.
The "make release" target doesn't cause these to be left around, but
manually doing something like ./debian/rules/build can.
2010-04-19 10:13:29 -07:00
Carl Worth
e6d20b7b8f make release: Add Debian package building and upload
Finally, a single button to push to do all the uploading.
2010-04-16 13:20:22 -07:00
Carl Worth
3461aa8dc2 Increment version to 0.2.
Only minor features added this time--nothing that merits a 1.0.
2010-04-16 13:02:34 -07:00
Carl Worth
80240877f8 make release: Add a check that version and debian/changelog are consistent
Eventually I'd like to automate this so that one or the other of these
files is canonical and the other is generated from it. Until then, add
this check to the release process to avoid a skewed release being
shipped.
2010-04-16 13:00:35 -07:00
Carl Worth
9b065ff3b2 Makefile: Avoid complaining about .first-build-message not existing
This cleans up a few spurious warnings from the build.
2010-04-16 12:10:23 -07:00
Carl Worth
b068f1cc84 Fix final link of notmuch binary to use C compiler if possible.
On Linux, a C program that depends on a C library which in turn
depends on a C++ can be linked with the C compiler, (avoiding a direct
link from the program to the C++ runtime libraries).

Other platforms with less fancy linkers need to use the C++ compiler
for this linking.
2010-04-16 11:51:56 -07:00
Carl Worth
533b02945d debian: Remove watch file.
We're switching to a native package, where we build the upstream and
debian releases simultaneously, so there's no need for a watch file.
2010-04-16 11:35:33 -07:00
Carl Worth
c75ab298d0 debian: Switch to "3.0 (native)" source format.
To keep lintian happy.
2010-04-16 11:34:48 -07:00
Carl Worth
b8f0646931 Makefile: Fix conditionals to avoid calling git when no .git is present
Otherwise, building from a tar-file snapshot or release caused a bunch
of error messages from unnecessary git invocations.
2010-04-16 11:34:48 -07:00
Carl Worth
c41a6bb786 Makefile: Add a top-level "make snapshot" target.
Useful for verifying that our tar-file creation works. The tar-file
name can't easily be used as a target directly since it depends on the
current git revision.
2010-04-16 11:34:48 -07:00
Carl Worth
5999ff8d3c Makefile: Rework the version checks slightly.
Theese were previously pointing to "make VERSION=X.Y release", but
we've recently changed to an alternate scheme involving the updated
version in a file named "version".
2010-04-16 11:34:48 -07:00
Carl Worth
0786587f3c RELEASING: Add a step to upgrade the version in the "version" file.
It is annoying to have an extra step here, but it does at least mean
that we are back to just "make release" rather than "make VERSION=X.Y
release".
2010-04-16 11:34:48 -07:00
Carl Worth
b7dc24298d Makefile: Add an explicit version file to the repository.
We do this so that "git archive" produces a usable tar file without us
having to post-modify it, (since tools like git-buildpackage might not
give us an easy way to hook into the tar-file-creation step).

To support this we also have to change our preference to prefer the
git-described-based version (if available) and only if not available
do we fallback to using what's in the "version" file. Finally, we also
ovverride this preference when releasing, (where what's in the
"version" file wins).

Note that using our Makefile's rule to create a tar file still will
insert the git-based version into the tar file. This is useful for
creating snapshots which will correctly report the git version from
which they were created.
2010-04-16 11:34:48 -07:00
Carl Worth
4b52b918d3 debian/changelog: Create an entry for the 0.2 release.
A (very slightly filtered) version of what already appears in NEWS.
2010-04-16 11:34:38 -07:00
Carl Worth
ac3dcac7e6 RELEASING: Add a (manual!) step to create a debian/changelog entry
I'd like to have this be fully automated in the future, but for now,
it's an extra step.
2010-04-16 10:23:50 -07:00
Carl Worth
7029c52ca7 debian: Don't auto-generate debian/changelog.
David Bremner informs me that shoving everything from the notmuch "git
log" into the debian/changelog is a bit excessive. Instead, we'll
start manually updating this file, (which feels a bit redundant with
NEWS, but perhaps makes us a better Debian-comunity member).
2010-04-16 10:00:11 -07:00
Carl Worth
2608bfe95f debian: Add a gbp.conf to start using git-buildpackage
On Bdale Garbee's recommendation I'm switching from gitpkg, (which
constructed a source tree but still required me to go run debuild), to
git-buildpackage. I hadn't originally used git-buildpackage because it
didn't seem to work without a configuration file, (where gitpkg was
fine).

Bdale was kind enough to point me to his fw/altos source at
git.gag.com where I found an example gpb.conf file as well as a target
in debian/rules to automatically update debian/changelog with the new
version number.
2010-04-16 09:32:46 -07:00
Carl Worth
4906f6b9ae make release: Don't print the release message on stdout.
It's just too long for copy/paste, so just let the user know the name
of the file containing the message instead.
2010-04-16 08:33:31 -07:00
Carl Worth
ff13111cf3 Makefile: Fix "make release" to print the current release announcement.
This was accidentally hard-coded to always print the 0.1 NEWS blurb.
2010-04-16 08:31:46 -07:00
Carl Worth
48cd091249 NEWS: Add release notes for the 0.2 release. 2010-04-16 08:28:05 -07:00
Carl Worth
9792d3553e Revert "notmuch.el: 'F' in search mode takes us to a list of folders."
This reverts commit fbec989fe3.

I only pushed this accidentally. See message
id:871ver6u9r.fsf@yoom.home.cworth.org for the various reasons I
didn't like this patch, (mostly I think the association of 'F' is
wrong).
2010-04-16 07:53:10 -07:00
Sebastian Spaeth
43cbbfc278 notmuch.c: Shorten version string
We previously output "notmuch version 0.1" as response to notmuch --version.
Shorten this to "notmuch 0.1" as we know that we will receive a version
number when we explicitely ask for it.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-04-16 07:35:17 -07:00
Carl Worth
b4459b8a4d emacs: Fix search filtering of a global search ("*")
With the recent addition of "*" being a special case for a search
matching all messages, we have to take care when doing a filter
operation. In this case it's not legal to simply append and get:

	* and <some-new-search-terms>

Instead we carefully construct a new search string of only:

	<some-new-search-terms>

This could all be avoided if we had a parser that could understand
"*" with the meaning we want.
2010-04-15 21:25:45 -07:00
Carl Worth
75cfd0d906 TODO: Add two tasks that both have to do with auditing the library API
It was noted today in IRC that libnotmuch is not yet careful about
wrapping all Xapian calls with try/catch blocks to print nicer error
messages. It seems it would be natural to audit that at the same time
as doing the symbol-hiding work.
2010-04-15 20:52:27 -07:00
Carl Worth
a29f49b943 RELEASING: Change wording of libnotmuch version instruction
We actually want this version to be incremented by the commits that
extend the interface. So the release process really is not to just
verify two things (NEWS and libnotmuch version), then run "make
VERSION=x.y release", and send the mail. Quite nice.
2010-04-15 20:50:46 -07:00
Carl Worth
00263dd1a9 make release: Enforce a clean source tree before release.
Where by clean, we check that no files are known to git to be
modified.
2010-04-15 20:14:54 -07:00
Carl Worth
8700de6fb7 RELEASING: Remove a meaningless step from the release process.
The entire "make sure the code you want is in place" thing is part of
a larger release process that we don't document here at all. Instead,
we just focus here on the mechanics of pushing things out once the
larger process has determined the code is ready.

And the fewer steps there are, the better, (for making the
release-process as painless as possible and for avoiding any
mistakes).
2010-04-15 19:55:11 -07:00
Gregor Hoffleit
18433e4aff configure: Fix syntax error (spaces in assignment).
Before and after the assignment operator, no spaces are allowed.
I don't know if there are any /bin/sh which allow spaces, but at least
in bash, csh and zsh, the former code was no valid assigment.
2010-04-15 19:45:11 -07:00
Ben Gamari
2805a243b5 Fix typo in message 2010-04-15 19:43:56 -07:00
Carl Worth
2475afcf0d make release: Provide a kinder message when VERSION is forgotten.
I'm unlikely to always remember to pass VERSION=X.Y so it's nice for
make release to remind me.
2010-04-15 18:40:08 -07:00
Carl Worth
2bf06e177d Makefile: Re-order the commands in "make release" slightly.
We put verify-version as a dependency, not a recursive action to keep
its output clean, (I know that I will always type "make release"
instead of "make VERSION=X.Y release" so I want a nice, neat
reminder).

Also, put the various ssh-based commands together, and after the
build, (so that it doesn't ask for a password/passphrase both before
and after building).
2010-04-15 16:30:50 -07:00
Carl Worth
9eb53a6052 Makefile: Simplify the release targets.
Previously, we had a separate release-upload target that a user might
mistake as something useful to call directly, (which would have the
undesired effect or uploading a new package, but without first making
all the checks that we want).

So we eliminate that target, (folding its actions into "make
release"), and we also rename the several release-verify-foo targets
to simply verify-foo. This leaves as the only targets with "release"
in the name as "release" and "release-message". Both of these are
intended for the user to call directly.
2010-04-15 16:23:57 -07:00
Carl Worth
dd94313b30 Makefile.local: Fix typo in comment.
Just an extra word that clearly didn't belong.
2010-04-15 16:17:32 -07:00
Carl Worth
cb08eade58 RELEASING: Remove obsolete step about updating micro version number.
We've now changed to using "git describe" to automatically report a
version number that changes with every git commit. So we no longer
need to manually update anything in the Makefile during the release
process.
2010-04-15 16:09:43 -07:00
Carl Worth
f3428823e5 Makefile: Make "make release" run the test suite.
This drops one manual step from our release process, (helping
to ensure we don't forget anything during the release).
2010-04-15 16:08:37 -07:00
Carl Worth
cddeaa59ab make test: Actually count and report on failures.
Hurrah---no more manual verification of that PASS column.

This means that "make test" can actually be a useful part of the
release process now, (since it will exit with non-zero status if there
are any failures).
2010-04-15 15:18:30 -07:00
Carl Worth
004ed3362f test: Unify all tests to use the pass_if_equal function.
Previously some tests (dump/restore) were doing ad-hoc verification of
values and their own printing of PASS/FAIL, etc. This made it
impossible to count test pass/fail rates in a single place.

The only reason these tests were written that way was because the old
execute_expecting function only worked if one could directly test the
stdout output of a notmuch command. The recent switch to pass_if_equal
means that all tests can use it.
2010-04-15 15:09:21 -07:00
Carl Worth
6d16e5c7a3 test: Align the PASS/FAIL column.
Just to make things a little more pleasant to look at.
2010-04-15 15:06:00 -07:00
Carl Worth
e96f7ca585 Makefile: Add a "make test" target.
I just wasted far too much time looking for a bug that wasn't actually
there only because I hadn't recompiled before running the test
suite. Now we can take advantage of actual dependency information to
force a rebuild for "make test".
2010-04-15 14:56:21 -07:00
Carl Worth
c48dcc302c lib: search_threads: Fix nested search to handle original search of "*"
When constructing a thread, we usually run a nested query to find all
messages in the thread that match the original search string. However,
we need to have special-case handling of an original search string of
"*" now that that is a supported means of specifying all messages.

The special-case ends up bein quite simple---we do less work, (just
skipping the nested search since we know that all messages must
match). I had been wanting to write this identical code to more
efficiently handle "notmuch search thread:<foo>" which was previously
running two identical searches. So that case is now more efficient as
well.
2010-04-15 14:54:40 -07:00
Carl Worth
f0050f6dd2 test: Add a test for "notmuch search '*'"
This feature was added recently and should have gotten a new test at
the time.

As this test demonstrates, the code is broken, ("notmuch search '*'
returns bogus dates of the Unix epoch for any threads where the
term "and" does not appear in any messages).
2010-04-15 14:48:56 -07:00
Carl Worth
d49eef0a3f test: Use an older date for the generated messages.
Using a date in the current year makes the test suite fragile since
the search output will include a date of "January 05" for now, but
will start doing "2010-01-05" in the future.
2010-04-15 14:13:12 -07:00
Carl Worth
9c0ae2e73e test: Remove test-message filenames from generated messages
The filenames aren't predictable (including the current directory) nor
stable from one run to the next (including the PID). This makes it
hard to predict the output from a search command that returns such a
message (such as "*").

The original goal was simply to ensure that each generated message was
distinguishable somehow. So just use the message counter instead.
2010-04-15 14:13:12 -07:00
Carl Worth
3846c1d12c test: Disentangle execution of notmuch from the examination of the results.
The old execute_expecting function was doing far too much for its own
good.  One of the worst aspects of this was that it introduced
shell-quoting challengers where the caller could not easily control
the precise invocation of the command to be executed.

I personally couldn't find a way to test "notmuch search '*'" without
the shell expanding * against files in the current directory, or
having bogus quotation marks appearing in the search string,
(defeating the recognition of "*" as a special search term).

Hopefully this aspect of the test suite will be much easier to maintain now.
2010-04-15 14:13:12 -07:00
Carl Worth
6847960a58 TODO: Add some ideas for improving the emacs interface.
One of these is a bad bug I noticed this morning, (archiving messages I had
never read when going through a search of "tag:inbox and tag:to-me" and
hitting space bar).

The other ideas came from recent conversations with Dirk and Eric.
2010-04-15 14:13:11 -07:00
Carl Worth
485678413c TODO: Add some ideas about better search syntax
Recent coding around the "*" feature suggests some improvements that
we could make, (some of which might push us into writing a custom
query parser rather than using the one that exists in Xapian).
2010-04-15 14:13:11 -07:00
Carl Worth
7d06e14e79 Merge bugfix for test-suite correctness.
The test suite was recently broken, and subsequently fixed (at the
commit that introduced the breakage). This merges that fixup commit:

	f1776f8b51
2010-04-14 17:19:46 -07:00
Carl Worth
f1776f8b51 test: Fix reply tests to track insignificant change in output.
The recent fix to properly decode encoded headers made the expected
output of "notmuch reply" differ by a single space, (previously, there
were two spaces before the References: value and now there is just
one).

Fix the test suite so that these are all noted as correct results
again.
2010-04-14 17:17:50 -07:00
Carl Worth
3d7af74ce5 Makefile: Fix final linking of notmuch binary for OS X.
Apparently the OS X linker can't resolve symbols when linking a
program (notmuch) against a library (libnotmuch) when the library
depends on another library (libgmime) that the program doesn't depend
on directly.

For this case, we need to link the program directly against both
libraries, but we don't want to do this on Linux, where the linker can
do this on its own and the explicit, unneeded link would cause
problems.
2010-04-14 16:29:50 -07:00