[PATCH 01/16] hex-escape: (en|de)code strings to/from restricted character set

2012-11-18 Thread da...@tethera.net
From: David Bremner The character set is chosen to be suitable for pathnames, and the same as that used by contrib/nmbug [With additions by Jani Nikula] --- util/Makefile.local |2 +- util/hex-escape.c | 168 +++ util/hex-escape.h | 41

Add new dump/restore format and batch tagging.

2012-11-18 Thread da...@tethera.net
This is a patch series with some history, if you will forgive the semi-inadvertant pun. I list that at that end, for the curious. If this series goes in, in the future we might consider whether restore --accumulate provides important functionality over batch tagging; at the moment I suggest leavin

[PATCH 2/2] test: initial performance testing infrastructure.

2012-11-17 Thread da...@tethera.net
From: David Bremner This is not near as fancy as as the unit tests, on the theory that the code should typically be crashing when performance tuning. Nonetheless, there is plenty of room for improvement. Several more of the pieces of the test infrastructure (e.g. the option parsing) could be fac

[PATCH 1/2] test: factor out part of test-lib.sh into test-lib-common.sh

2012-11-17 Thread da...@tethera.net
From: David Bremner The idea is to use some of the simpler parts of the test suite infrastructure to help run performance tests. --- test/test-lib-common.sh | 147 +++ test/test-lib.sh| 129 + 2 files c

initial attempt at performance testing suite for notmuch.

2012-11-17 Thread da...@tethera.net
For a long time we have needed some commone set of tests to measure changes to e.g. tagging and dump/restore. A non-trivial corpus of mail messages is a bit unwieldy to be shipped with the source, so there is a seperate tarball. Currently the tarball for this needs to manually uploaded to the notm

[PATCH 2/2] test: add nontrivial test for restore --accumulate.

2012-11-17 Thread da...@tethera.net
From: David Bremner It seems we have never tested the case that restore --accumulate actually adds tags. I noticed this when I started optimizing and no tests failed. The bracketing with "restore --input=dump.expected" are to make sure we start in a known state, and we leave the database in a kn

[PATCH 1/2] test: add more informative titles to restore --accumulate tests

2012-11-17 Thread da...@tethera.net
From: David Bremner Thanks to Ethan for the suggestion. --- test/dump-restore |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/dump-restore b/test/dump-restore index f25f7cf..7acf7fe 100755 --- a/test/dump-restore +++ b/test/dump-restore @@ -39,12 +39,12 @@ test_ex

[PATCH] test: add nontrivial test for restore --accumulate.

2012-11-16 Thread da...@tethera.net
From: David Bremner It seems we have never tested the case that restore --accumulate actually adds tags. I noticed this when I started optimizing and no tests failed. I also had to modify the next test. Perhaps a seperate patch could make these tests more independent of the previous ones. --- t

[PATCH 2/2] notmuch-restore: fix error message for extra positional parameter.

2012-11-14 Thread da...@tethera.net
From: David Bremner Note that a single positional parameter will take this code path also, so the old message really makes no sense anymore. --- notmuch-restore.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notmuch-restore.c b/notmuch-restore.c index 09dd691..7d8f4

[PATCH 1/2] notmuch-restore: remove extra increment of optind

2012-11-14 Thread da...@tethera.net
From: David Bremner This is left over from when the file name was a positional parameter. --- notmuch-restore.c |1 - 1 file changed, 1 deletion(-) diff --git a/notmuch-restore.c b/notmuch-restore.c index 08d5adc..09dd691 100644 --- a/notmuch-restore.c +++ b/notmuch-restore.c @@ -141,7 +141

simple fixes for notmuch-restore

2012-11-14 Thread da...@tethera.net
Here are a couple of small fixes I noticed while working on notmuch-restore. I think the optind increment is harmless (although confusing) and the other is just correcting an error message.

[PATCH 3/3] notmuch-dump: tidy formatting

2012-11-14 Thread da...@tethera.net
From: David Bremner More uncrustify at work. --- notmuch-dump.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/notmuch-dump.c b/notmuch-dump.c index d8186fb..88f598a 100644 --- a/notmuch-dump.c +++ b/notmuch-dump.c @@ -30,7 +30,7 @@ notmuch_dump_command (unused

[PATCH 2/3] notmuch-restore: tidy formatting

2012-11-14 Thread da...@tethera.net
From: David Bremner This is again the work of uncrustify. I remember there is some controversy about "! foo" versus "!foo", but in context I think "! foo" looks OK. Also, for functions "! foo (blah)" seems better than "!foo (blah)". --- notmuch-restore.c | 15 +++ 1 file changed,

[PATCH 1/3] notmuch-tag: tidy formatting

2012-11-14 Thread da...@tethera.net
From: David Bremner This is just the result of running uncrustify. --- notmuch-tag.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/notmuch-tag.c b/notmuch-tag.c index d15f1ed..88d559b 100644 --- a/notmuch-tag.c +++ b/notmuch-tag.c @@ -31,7 +31,7 @@ handle

Uncrustify on notmuch-restore.c, notmuch-dump.c and notmuch-tag.c

2012-11-14 Thread da...@tethera.net
Here is the result of running uncrustify on 3 files affected by an upcoming patch series. It makes easier to make sure my new code is reasonable styled if the whole file is uncrustify clean.

[PATCH v2] test: expand regex in test/basic

2012-11-14 Thread da...@tethera.net
From: David Bremner Over time, maintaining this very long regex has become irritating, especially when resolving conflicts. This patch replaces the call to sed with multiple extra arguments to find. Since each test binary is now on it's own line, this should make resolving conflicts easier. ---

[PATCH] test: expand regex in test/basic

2012-11-10 Thread da...@tethera.net
From: David Bremner Over time, maintaining this very long regex has become irritating, especially when resolving conflicts. This patch replaces the call to sed with multiple extra arguments to find. Since each test binary is now on it's own line, this should make resolving conflicts easier. Th

[PATCH] test: use (format "%S") to print nil in emacs test.

2012-08-30 Thread da...@tethera.net
From: David Bremner The behaviour of "emacsclient --eval nil" changed from emacs23 to emacs24, and in emacs24 it prints 'nil' rather than an empty string. (format "%S" foo) produces a sexpr form of foo, and is consistent between the two versions. --- This fixes another test failure on emacs24.

[PATCH] test: canonicalize content-type in "Sending a message via (fake) SMTP"

2012-08-30 Thread da...@tethera.net
From: David Bremner The version of message.el in emacs24 omits the charset=us-ascii, causing the current version of this test to fail. With this patch, we accept either option. According to RFC 2046, they are semantically equivalent. --- as discussed on IRC, the $ is not quite as nice as \b, bu

[PATCH] test: canonicalize content-type in "Sending a message via (fake) SMTP"

2012-08-29 Thread da...@tethera.net
From: David Bremner The version of message.el in emacs24 omits the charset=us-ascii, causing the current version of this test to fail. Here we just ask that the content-type start with "text/plain" --- Alternatively, somebody might want to dig into message.el and understand why it behaves differ

[Patch v3 6/6] test: add broken roundtrip test

2012-08-19 Thread da...@tethera.net
From: David Bremner We demonstrate the current notmuch restore parser being confused by message-id's and tags containing non alpha numeric characters (particularly space and parentheses are problematic because they are not escaped by notmuch dump). We save the files as hex escaped on disk so tha

[Patch v3 5/6] test: add generator for random "stub" messages

2012-08-19 Thread da...@tethera.net
From: David Bremner Initial use case is testing dump and restore, so we only have message-ids and tags. The message ID's are nothing like RFC compliant, but it doesn't seem any harder to roundtrip random UTF-8 strings than RFC-compliant ones. Tags are UTF-8, even though notmuch is in principle

[Patch v3 4/6] test: add database routines for testing.

2012-08-19 Thread da...@tethera.net
From: David Bremner Initially, provide a way to create "stub" messages in the notmuch database without corresponding files. This is essentially cut and paste from lib/database.cc. This is a seperate file since we don't want to export these symbols from libnotmuch or bloat the library with non-ex

[Patch v3 3/6] test/hex-escaping: new test for hex escaping routines

2012-08-19 Thread da...@tethera.net
From: David Bremner These are more like unit tests, to (try to) make sure the library functionality is working before building more complicated things on top of it. --- test/hex-escaping | 26 ++ test/notmuch-test |1 + 2 files changed, 27 insertions(+) create mode

[Patch v3 2/6] test/hex-xcode: new test binary

2012-08-19 Thread da...@tethera.net
From: David Bremner This program is used both as a test-bed/unit-tester for ../util/hex-escape.c, and also as a utility in future tests of dump and restore. --- test/.gitignore |1 + test/Makefile.local | 11 +- test/basic |2 +- test/hex-xcode.c| 103

[Patch v3 1/6] hex-escape: (en|de)code strings to/from restricted character set

2012-08-19 Thread da...@tethera.net
From: David Bremner The character set is chosen to be suitable for pathnames, and the same as that used by contrib/nmbug [With additions by Jani Nikula] --- util/Makefile.local |2 +- util/hex-escape.c | 168 +++ util/hex-escape.h | 41

random corpus generator, v3

2012-08-19 Thread da...@tethera.net
This obsoletes the series at: id:"134431-4301-1-git-send-email-bremner at debian.org" Changes since v2: - clean up new test-binaries and objects - remove the "set -o pipefail" leftover from debugging. Possibly this makes sense as a global setting, but in a seperate patch. - add hex

[PATCH 3/3] test: add broken roundtrip test

2012-08-05 Thread da...@tethera.net
From: David Bremner The output of test_cmp is redirected because it is pretty horrible, and tends to mess up terminals. When the test is no longer marked as broken, this redirection should be removed. --- test/dump-restore |9 + 1 file changed, 9 insertions(+) diff --git a/test/dump

[PATCH 2/3] test: add generator for random "stub" messages

2012-08-05 Thread da...@tethera.net
From: David Bremner Initial use case is testing dump and restore, so we only have message-ids and tags. The message ID's are nothing like RFC compliant, but it doesn't seem any harder to roundtrip random UTF-8 strings than RFC-compliant ones. Tags are UTF-8, even though notmuch is in principle

[PATCH 1/3] test: add database routines for testing.

2012-08-05 Thread da...@tethera.net
From: David Bremner Initially, provide a way to create "stub" messages in the notmuch database without corresponding files. This is essentially cut and paste from lib/database.cc. This is a seperate file since we don't want to export these symbols from libnotmuch or bloat the library with non-ex

test infrastructure for new dump/restore

2012-08-05 Thread da...@tethera.net
This implements an old suggestion of Mark's to get wacky message-ids into the database directly without relying on underdefined behaviour of the gmime parser; the previous effort relied on gmime passing literally through message-ids not delimitted according RFC. Also compared to the previous versi

[PATCH] NEWS: discuss changes for dump and restore syntax.

2012-08-05 Thread da...@tethera.net
From: David Bremner The duplication in NEWS.Debian is so that Debian users will be warned during upgrade. --- NEWS | 10 ++ debian/NEWS.Debian | 14 ++ 2 files changed, 24 insertions(+) diff --git a/NEWS b/NEWS index 7b1f36c..761b2c1 100644 --- a/NEWS +++ b

[PATCH 2/2] notmuch-restore: replace positional argument for input with option

2012-08-03 Thread da...@tethera.net
From: David Bremner Since notmuch dump doesn't use positional arguments anymore, it seems better to be consistent. --- man/man1/notmuch-restore.1 |2 +- notmuch-restore.c |2 +- test/dump-restore |8 3 files changed, 6 insertions(+), 6 deletions(-) diff --

[PATCH 1/2] notmuch-dump: remove deprecated positional argument for output file

2012-08-03 Thread da...@tethera.net
From: David Bremner The syntax --output=filename is a smaller change than deleting the output argument completely, and conceivably useful e.g. when running notmuch under a debugger. --- man/man1/notmuch-dump.1 |5 ++--- notmuch-dump.c |3 +-- test/dump-restore | 20 +

Remove positional arguments to dump and restore

2012-08-03 Thread da...@tethera.net
The positional argument to dump was deprecated quite a while ago. For restore, we never formally deprecated it. It seems a bit more consistent this way, but I don't mind leaving restore alone if people feel strongly about it.

[PATCH] debian: alternately depend on emacs24 for notmuch-emacs, build

2012-08-02 Thread da...@tethera.net
From: David Bremner This should allow users to install notmuch-emacs with only emacs24 installed on their system. For good measure, allow building with emacs24 as a 4th choice. --- debian/changelog |3 ++- debian/control |6 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff

[PATCH 3/3] debian: update changelog for cleaning changes

2012-08-02 Thread da...@tethera.net
From: David Bremner --- debian/changelog |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 2518988..dfdcf35 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,11 @@ notmuch (0.14-1) unstable; urgency=low [ Stefan

[PATCH 2/3] build system: remove configure output in Make distclean.

2012-08-02 Thread da...@tethera.net
From: David Bremner Create a variable DISTCLEAN which contains a list of things to clean in the distclean target (in addition to running the clean target). The deleted comment seems to be false these days, since we do create files during configuration. Use "rm -rf" here as well in case we want

[PATCH 1/3] build system: remove directories created by tests in "make clean"

2012-08-02 Thread da...@tethera.net
From: David Bremner These extra directories cause problems for building on Debian twice in a row. In order to remove directories, we need to us "rm -rf" instead of "rm -r". So now we should be extra careful what we add to the variable CLEAN. --- Makefile.local |2 +- test/Makefile.loca

Cleaning up cleaning

2012-08-02 Thread da...@tethera.net
I ran debuild twice in a row with these patches and it seems OK. I did notice there are still some leftover byte-compiled python (.pyc) files left over after "make distclean"

[PATCH v3] contrib/nmbug: add nmbug-status script

2012-07-09 Thread da...@tethera.net
From: David Bremner This is (almost) the same script as has been used for http://nmbug.tethera.net/status for a while now. The only change is that the configuration is not hardcoded anymore. By default the config is fetched from a special branch in the nmbug repo that contains only config info. T

[PATCH v2] contrib/nmbug: add nmbug-status script

2012-07-08 Thread da...@tethera.net
From: David Bremner This is (almost) the same script as has been used for http://nmbug.tethera.net/status for a while now. The only change is that the configuration is not hardcoded anymore. By default the config is fetched from a special branch in the nmbug repo that contains only config info. T

[PATCH 2/2] contrib/nmbug: add nmbug-status script

2012-07-07 Thread da...@tethera.net
From: David Bremner This is (almost) the same script as has been used for http://nmbug.tethera.net/status for a while now. The only change is that the configuration is not hardcoded anymore. --- contrib/nmbug/nmbug-status | 132 ++ contrib/nmbug/status-

[PATCH 1/2] contrib/nmbug: make nmbug a subdirectory

2012-07-07 Thread da...@tethera.net
From: David Bremner I want to ship the status tool here as well, along with a sample config file. --- contrib/{ => nmbug}/nmbug |0 1 file changed, 0 insertions(+), 0 deletions(-) rename contrib/{ => nmbug}/nmbug (100%) diff --git a/contrib/nmbug b/contrib/nmbug/nmbug similarity index 100%

[PATCH] contrib/nmbug: use "resolve" merge strategy

2012-03-31 Thread da...@tethera.net
From: David Bremner The recursive merge strategy does rename detection, which yields false positives (and hence spurious merge conflicts) when merging trees of empty files. --- An unresolved issue (ho ho) is the fact that failed merge operations are still not detected. This needs more thought,

[PATCH] cli: change argument parsing convention for subcommands

2011-10-21 Thread da...@tethera.net
From: David Bremner previously we deleted the subcommand name from argv before passing to the subcommand. In this version, the deletion is done in the actual subcommands. Although this causes some duplication of code, it allows us to be more flexible about how we parse command line arguments in t

[PATCH 2/2] build system: target to make a Debian snapshot package.

2011-10-12 Thread da...@tethera.net
From: David Bremner Currently this builds a native package, but since the source package is throw away, it should not matter too much, except for the extra warnings from lintian. The extra +1 is so that if $(VERSION) is the same as the last released version (for example outside a git repo) then

[PATCH 1/2] build system: remove dashes from git-describe generated version.

2011-10-12 Thread da...@tethera.net
From: David Bremner This makes it less confusing with released Debian versions, now that we have non-native Debian versions. --- Makefile.local |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile.local b/Makefile.local index 38f6c17..2c07bd7 100644 --- a/Makefile.l

make debian-snapshot

2011-10-12 Thread da...@tethera.net
Here is a simple way to make debian packages for testing without fussing about with pristine-tar and so on. The first patch changes the git snapshot versioning scheme from 0.9-2-g1234 to 0.9+2~g1234 to reduce confusion with released versions like 0.9-2 In principle this should work outside a gi

[PATCH 6/6] notmuch-dump: deprecate use of output file argument.

2011-10-10 Thread da...@tethera.net
From: David Bremner We print an intentionally non-specific message on stderr, since it isn't clear if there will be some global output file argument to replace. We update the test suite atomically, since it relies on having the same text in two files. --- notmuch-dump.c|1 + test/dump-r

[PATCH 5/6] test: all dump-restore tests should be working now

2011-10-10 Thread da...@tethera.net
From: David Bremner 3 x test_subtest_known_broken removed to tidy up the output. --- test/dump-restore |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/test/dump-restore b/test/dump-restore index 699337c..d8db259 100755 --- a/test/dump-restore +++ b/test/dump-restore @@

[PATCH 4/6] notmuch-dump: treat any remaining arguments after the filename as search terms

2011-10-10 Thread da...@tethera.net
From: David Bremner The main motivation here is allow the fast dumping of tag data for messages having certain tags. In practice it seems too slow to pipe dump to grep. --- notmuch-dump.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/notmuch-dump.c b/notmuc

[PATCH 3/6] notmuch-dump: update handling of file name argument

2011-10-10 Thread da...@tethera.net
From: David Bremner We permit -- as an "option processing terminator". Currently this does not do anything useful, but we plan to add search terms after the --. --- notmuch-dump.c | 27 --- 1 files changed, 16 insertions(+), 11 deletions(-) diff --git a/notmuch-dump.c

[PATCH 2/6] test: add tests for command line arguments to notmuch-dump

2011-10-10 Thread da...@tethera.net
From: David Bremner The plan is to add the possibility of search terms after the file name, and the use of -- to stop looking for an output file name. --- test/dump-restore | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/test/dump-restore b/te

[PATCH 1/6] test: update dump-restore to use redirection instead of filename args

2011-10-10 Thread da...@tethera.net
From: David Bremner The idea here is that we want to deprecate the use of arguments to dump and restore to specify paths, since in particular we want to use the non-option arguments to dump to form a query. --- test/dump-restore | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-)

No subject

2011-10-10 Thread da...@tethera.net
OK, here is my proposal to add search terms to notmuch dump. Most of the work is in argument processing. It would be nice if we could factor some of that out. 02be821 notmuch-dump: deprecate use of output file argument. 2b7781d test: all dump-restore tests should be working now 7a203d6

[PATCH] test: reset test_subtest_known_broken_ after each success/failure.

2011-09-12 Thread da...@tethera.net
From: 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_

[PATCH] test: reset known_broken status in test_expect_equal and test_expect_equal_file

2011-09-11 Thread da...@tethera.net
From: David Bremner Commit 4cc6727 introduced the library function test_subtest_known_broken which sets a variable test_subtest_known_broken_ . Unfortunately this variable is not reset if test_begin_subtest is not called before the next test_expect_success or test_expect_failure. This commit rem

[PATCH] libnotmuch: export Xapian typeinfo symbols

2011-07-16 Thread da...@tethera.net
From: David Bremner The lack of such exporting seems to cause problems catching exceptions, as suggested by http://gcc.gnu.org/wiki/Visibility This manifested in the symbol-hiding test failing when notmuch was compile with gcc 4.4.5. On i386, this further manifested as notmuch new failing t

[PATCH 2/2] debian: add (demangled) Xapian exception typeinfo symbols to libnotmuch1.symbols

2011-07-16 Thread da...@tethera.net
From: David Bremner These are exported (again) by the library to prevent problems with catching exceptions. --- debian/libnotmuch1.symbols | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/debian/libnotmuch1.symbols b/debian/libnotmuch1.symbols index 8df6fec..05d

[PATCH 1/2] libnotmuch: export Xapian typeinfo symbols

2011-07-16 Thread da...@tethera.net
From: David Bremner The lack of such exporting seems to cause problems catching exceptions, as suggested by http://gcc.gnu.org/wiki/Visibility This manifested in the symbol-hiding test failing when notmuch was compile with gcc 4.4.5. On i386, this further manifested as notmuch new failing t

No subject

2011-07-16 Thread da...@tethera.net
So, my conclusion is that we need to export these typeinfo symbols, and it seems to be sufficient to do so to fix the failing tests and crashes discussed above. I think I managed to add them to the debian symbols file in a better way, so every toolchain change and different architecture doesn't mak

[PATCH 6/6] build-system: guard parts irrevokable parts of release target with REALLY_UPLOAD

2011-07-04 Thread da...@tethera.net
From: David Bremner This supports both testing and use by non-upload privileged users. Along with previous commits in the series, this lets one do a dry run of the release process and created a tarball, signature file, and release announcement to inspect before uploading. --- Makefile.local |

[PATCH 5/6] build-system: Use existing signed tag for release, if present.

2011-07-04 Thread da...@tethera.net
From: David Bremner This is to support testing the release machinery without jumping through hoops to delete and restore a tag, or bumping the version number in both version and debian/changelog. --- Makefile.local |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefil

[PATCH 4/6] build-system: use signed tag to make tar file, if available.

2011-07-04 Thread da...@tethera.net
From: David Bremner This as the advantage that "make VERSION=n.m dist" will work correctly even if the wrong branch happens to be checked out. --- Makefile.local |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/Makefile.local b/Makefile.local index b6445e5..d1c0737

[PATCH 3/6] build-system: tag earlier in the release process.

2011-07-04 Thread da...@tethera.net
From: David Bremner If tagging fails, we really don't want to upload tarballs. --- Makefile.local |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile.local b/Makefile.local index dea813c..b6445e5 100644 --- a/Makefile.local +++ b/Makefile.local @@ -89,12 +89,12 @@

[PATCH 2/6] build-system: remove calls to git-buildpackage and dput in release target.

2011-07-04 Thread da...@tethera.net
From: David Bremner The removed code had the following issues: - It depends on the users git-buildpackage configuration to put the results in the correct place, so is fragile. - The tar file is overwritten in the next step, so copying it is not useful. - We should build the final version of

[PATCH 1/6] build-system: replace use of ssh with wget for checking the website

2011-07-04 Thread da...@tethera.net
From: David Bremner The idea is to see if the version we are already releasing exists on the notmuch website. Using wget allows more people to run this target, and also allows people with ssh access to run it without access to their keys. --- Makefile.local | 15 ++- 1 files change

Proposed changes to release target

2011-07-04 Thread da...@tethera.net
When pushing 0.6 out the door, I found the release target in Makefile daunting. This was partly lack of confidence/understanding on my part: I didn't really like the idea of starting a chain of events that I didn't fully understand that ended up copying files to the web site. Also, it didn't quite

[PATCH 2/2] test/libnotmuch-abi: compare exported symbols, available symbols, and linker script.

2011-06-29 Thread da...@tethera.net
From: David Bremner This uses objdump and awk to grab the available "notmuch_" symbols from the object files and all exported symbols from libnotmuch.so. The symbols from the linker script are grabbed using sed. All three of these sets of symbols should be equal. --- test/libnotmuch-abi | 10

[PATCH 1/2] test/symbol-hiding: rename to test/libnotmuch-abi, prepare to add more subtests

2011-06-29 Thread da...@tethera.net
From: David Bremner Test descriptions changed to accomodate more subtests. The generic 'run_test' is renamed 'run_exception_test', symbol-test(.cc) is renamed exception-test(.cc). --- I'm not sure if it would be better to start a new test script rather than this fuss about renaming, but "symbol-

[PATCH] lib/Makefile.local: remove leftover debugging output.

2011-06-29 Thread da...@tethera.net
From: David Bremner The removed "echo $(libnotmuch_modules)" was strictly for debugging. Thanks to Austin Clements for the hint. --- lib/Makefile.local |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/lib/Makefile.local b/lib/Makefile.local index 6dd095c..fe42920 100644

[PATCH] libnotmuch: build symbols list without relying on gcc -aux-info.

2011-06-26 Thread da...@tethera.net
From: 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. Based on a suggestion by Austin Clements, this version uses objdump to get the symbols from the object files. Any symbol that - is in some object file i

[PATCH] libnotmuch: build symbols list without relying on gcc -aux-info.

2011-06-26 Thread da...@tethera.net
From: 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 su

[PATCH] libnotmuch: fix typos in CLEAN setting, add file

2011-06-25 Thread da...@tethera.net
From: David 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 --- Here is an updated version. I'm not sure the best way to do a test of the cleaning

[PATCH] libnotmuch: fix typo in CLEAN setting, add file

2011-06-24 Thread da...@tethera.net
From: David Bremner - c0961e6 introduced a missing slash and - cdf1c70a created a file and neglected to add it to clean The former seems to have been harmless, so maybe someone (Carl?) can check if $(dir)/$(LIBNAME) really needs to be removed? --- lib/Makefile.local |4 +++- 1 files changed

[PATCH] tests: add a test for symbol hiding side effects

2011-06-22 Thread da...@tethera.net
From: David Bremner The worry here is that a binary linking with libnotmuch might lose access to Xapian::Error symbols because libnotmuch hides them. --- test/basic |2 +- test/notmuch-test |1 + test/symbol-hiding | 21 + test/symbol-test.cc | 17

[PATCH 2/2] remove Xapian exceptions symbols from libnotmuch1.symbols

2011-06-21 Thread da...@tethera.net
From: David Bremner These were never intended to be public, since the library exports only a C API. --- debian/libnotmuch1.symbols | 14 -- 1 files changed, 0 insertions(+), 14 deletions(-) diff --git a/debian/libnotmuch1.symbols b/debian/libnotmuch1.symbols index f50d168..8df6fec

[PATCH 1/2] libnotmuch: add linker script to declare only notmuch_* symbols as global.

2011-06-21 Thread da...@tethera.net
From: David Bremner This is closely tied to gcc and particularly gnu ld, but I guess the shared library linking code would need to be adjusted to work on a non-gnu linker anyay. I had to make a few not-obviously related changes to the lib/Makefile.local to make this work: libnotmuch_modules is d

No subject

2011-06-21 Thread da...@tethera.net
Here is my proposal, based on Clint's suggestion on IRC, and on the sed hack from librhash, to hide all symbols that are not explicitly part of the notmuch API. In particular it hides the various symbols related to Xapian exceptions.

[PATCH 2/2] Do not import notmuch in setup.py.

2011-06-19 Thread da...@tethera.net
From: David Bremner Importing notmuch loads the notmuch shared library. When building without a system install of notmuch, this requires e.g. setting LD_LIBRARY_PATH for building and fails completely for cleaning. --- bindings/python/setup.py | 17 - 1 files changed, 16 inserti

[PATCH 1/2] Build debian package for python-bindings.

2011-06-19 Thread da...@tethera.net
From: David Bremner This uses dh_python2 (included with sufficiently recent versions of the python/python-all packages). python-all brings in all of the supported versions of python. The double calls to dh_auto_install are to avoid looping over python versions ourselves. --- debian/control

No subject

2011-06-19 Thread da...@tethera.net
Bah, my previous attempt didn't build cleanly in a chroot, so I had to patch setup.py.

[PATCH] Build debian package for python-bindings.

2011-06-19 Thread da...@tethera.net
From: David Bremner This uses dh_python2 (included with sufficiently recent versions of the python/python-all packages). python-all brings in all of the supported versions of python. The double calls to dh_auto_install are to avoid looping over python versions ourselves. --- debian/control | 1

[PATCH 4/4] notmuch.c: use help strings generated from notmuch.pod.

2010-11-03 Thread da...@tethera.net
From: David Bremner It is quite possible this could be more automagically generated; there is a certain amount of boilerplate in typing HELP_command_args, HELP_command_desc, HELP_command_text. But, this way is less error prone. --- notmuch.c | 388 +--

[PATCH 3/4] Add rules to build notmuch.1 and notmuch-help.h from the pod file.

2010-11-03 Thread da...@tethera.net
From: David Bremner Add generated files to CLEAN. Remove notmuch.1 from git because we auto generate it now. --- Makefile.local | 22 ++- notmuch.1 | 609 2 files changed, 21 insertions(+), 610 deletions(-) delete mode 100644 notm

[PATCH 2/4] Perl script to generate online help.

2010-11-03 Thread da...@tethera.net
From: David Bremner This is a bit more complicated than expected, mainly because it needs to split a chunk of the docs into 3 pieces corresponding to the strings currently filled into a struct command_t. To disable the ANSI escape codes, replace Pod::Text:Color with Pod::Text. It would not be th

[PATCH 1/4] notmuch.pod: pod version of documentation, converted by rman, massaged by hand.

2010-11-03 Thread da...@tethera.net
From: David Bremner Some places I deleted a bit of the continuity text introducing a command because I didn't see how to make it work with the slightly more structured layout. I also moved show in front of search, because it explains the output formats. Probably it would make sense to add a sep

generate help from pod.

2010-11-03 Thread da...@tethera.net
Hi Carl; Here is the generation. I hope you don't hate perl too much. I also hope the syntax in notmuch.pod is self-explanatory. For me, with perl 5.10.1, this only uses modules included with Perl.

[PATCH 4/4] Enable logging in notmuch-tag.c

2010-10-24 Thread da...@tethera.net
From: David Bremner Currently a separate function must be called to enable logging; this API is subject to change. --- notmuch-tag.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/notmuch-tag.c b/notmuch-tag.c index fd54bc7..bd7bfbc 100644 --- a/notmuch-tag.c +++ b

[PATCH 3/4] Add logging to low level message handling routines.

2010-10-24 Thread da...@tethera.net
From: David Bremner This might not be ideal from the point of view of "atomic" transactions, but it is transparent to the caller of the library. --- lib/message.cc | 30 ++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/lib/message.cc b/lib/message.

[PATCH 2/4] Add log component to database struct.

2010-10-24 Thread da...@tethera.net
From: David Bremner - add accessor required because the notmuch database struct is opaque - add a function notmuch_database_open_log to open a log file and associate it with an open database. The reasoning is that this is preferable to breaking the notmuch_database_open API at this point. ---

[PATCH 1/4] Initial implementation of low level logging routines.

2010-10-24 Thread da...@tethera.net
From: David Bremner notmuch_log_open: open a log file; return an opaque "log descriptor" notmuch_log_words: log words, escaping spaces and newlines, and appending a newline. Log format is space delimited, and line oriented. Escaping log text is currently based on a slightly simplified version

Second draft of logging patches

2010-10-24 Thread da...@tethera.net
Here is my second try at logging, taking into account the feedback I got from Rob and Michal. There is definitely some tidying to do; in particular I know the protoypes in public headers need documentation. Also, I should add a configuration option to enable configuration by command or something l

[PATCH 3/3] notmuch-tag.c: Add tag logging.

2010-10-11 Thread da...@tethera.net
From: David Bremner logging of tags is enabled by adding a stanza like [log] tags = /some/path/you/can/write/to to your notmuch config. Note that we intentionally do the logging after the database transaction is finished. --- notmuch-tag.c | 31 +++ 1 files chang

[PATCH 2/3] notmuch-log.c: Add a function to log a pair of strings with a timestamp.

2010-10-11 Thread da...@tethera.net
From: David Bremner Since the function is supposed to work for any pair of strings, this means some form of quoting seems necessary. I decided to re-use the json quoting routines for convenience. --- notmuch-client.h |4 notmuch-log.c| 18 ++ 2 files changed, 22 in

[PATCH 1/3] Initial implementation of low level logging routines.

2010-10-11 Thread da...@tethera.net
From: David Bremner notmuch_log_open: open a log file; just a wrapper around open(2) notmuch_log_append: atomically append a buffer (character array) to a log file Based on per-write file locking, performance will have to be tested. --- Makefile.local |1 + notmuch-client.h | 10 +

First draft of logging functionality.

2010-10-11 Thread da...@tethera.net
The patches following this message are my first attempt at implementing atomic logging for notmuch. The idea is that such logs could be useful in synchronizing notmuch instances. Feedback of any kind is welcome. I'm particularly interested in comments about the log format and performance. In my

[PATCH] notmuch.pod: pod version of documentation, converted by rman, massaged by hand.

2010-06-13 Thread da...@tethera.net
From: David Bremner Some places I deleted a bit of the continuity text introducing a command because I didn't see how to make it work with the slightly more structured layout. I also moved show in front of search, because it explains the output formats. Probably it would make sense to add a sep

[PATCH 3/3] notmuch-show.c: control which headers are show for json output.

2010-04-24 Thread da...@tethera.net
From: David Bremner This commit adds argument handling from and callbacks to notmuch-output.c to determine what headers to show in json output. This requires passing a pointer to a struct containing the output parameters into several functions, and in particular changes the type of the function p

<    1   2   3   4   5   >