[PATCH] notmuch dump: default to batch-tag format.

2014-01-21 Thread da...@tethera.net
From: David Bremner <da...@tethera.net> Although we didn't formally deprecate the old format, the new one has been available for a year. --- NEWS | 10 ++ notmuch-dump.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 28788d8..b

[PATCH v2] util: detect byte order

2013-11-26 Thread da...@tethera.net
From: David Bremner <da...@tethera.net> Unfortunately old versions of GCC and clang do not provide byte order macros, so we re-invent them. If UTIL_BYTE_ORDER is not defined or defined to 0, we fall back to macros supported by recent versions of GCC and clang --- I think I got all of

[PATCH] util: detect byte order

2013-11-26 Thread da...@tethera.net
From: David Bremner <da...@tethera.net> Unfortunately old versions of GCC and clang do not provide byte order macros, so we re-invent them. If UTIL_BYTE_ORDER is not defined, we fall back to macros supported by recent versions of GCC and clang --- I pushed the series id:1385328583-24602

[PATCH 2/2] NEWS: News for big endian sha1 bug fix.

2013-11-24 Thread da...@tethera.net
From: David Bremner <da...@tethera.net> We could give more details about how to migrate tags, but I'm not sure that it's a practical problem, or just a theoretical one. --- NEWS | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 3383ecf..3

[PATCH 1/2] lib: fix byte order test in libsha1.c

2013-11-24 Thread da...@tethera.net
From: David Bremner <da...@tethera.net> Previously PLATFORM_BYTE_ORDER and IS_LITTLE_ENDIAN were not defined, so the little endian code was always compiled in. This will have the effect that the "SHA1s" on big endian architectures will change (i.e. become actual sha1s). So som

[PATCH v2] test: replace $PWD with YYY in emacs & emacs-show tests

2013-11-23 Thread da...@tethera.net
From: David Bremner <da...@tethera.net> When executed command line is written to *Notmuch errors* buffer, shell-quote-argument will backslash-escape any char that is not in "POSIX filename characters" (i.e. matching "[^-0-9a-zA-Z_./\n]"). Currently in two emacs tes

[PATCH] test: replace $PWD with YYY in emacs & emacs-show tests

2013-11-22 Thread da...@tethera.net
From: David Bremner <da...@tethera.net> When executed command line is written to *Notmuch errors* buffer, shell-quote-argument will backslash-escape any char that is not in "POSIX filename characters" (i.e. matching "[^-0-9a-zA-Z_./\n]"). Currently in two emacs tes

[PATCH] lib: update documentation of callback functions for database_compact and database_upgrade.

2013-11-01 Thread da...@tethera.net
From: David Bremner Compact was missing callback documentation entirely, and upgrade did not discuss the closure parameter. --- This patch depends on id:2a58adbdc1257f16579692544b4bcbadca3d3045.1383315568.git.jani at nikula.org BTW, I didn't completely understand

[PATCH] test: update insert tests for new maildir synchronization rules

2013-09-02 Thread da...@tethera.net
From: David Bremner As of id:1355952747-27350-4-git-send-email-sojkam1 at fel.cvut.cz we are more conservative about moving messages from ./new to ./cur. This updates the insert tests to match --- Hopefully this makes sense, and is not just papering over a real problem that

[PATCH] emacs: replace setq + let with let*

2013-06-02 Thread da...@tethera.net
From: David Bremner I found several places where a setq is immediately followed by a let or a let*. This seems to be the pessimal combination, with the implicit scope of the setq combined with the extra indentation of the let. I combined these cases into a single let* which I

[PATCH] emacs: add `notmuch-archive-tags' cross references in docstrings

2013-06-02 Thread da...@tethera.net
From: David Bremner Several function docstrings refer to behaviour in docstrings that is really controlled by notmuch-archive-tags. Add cross references, and replace hardcoding. --- emacs/notmuch-show.el | 4 ++-- emacs/notmuch.el | 27 --- 2

[PATCH] emacs: remove hardcoded defaults values from docstrings

2013-06-02 Thread da...@tethera.net
From: David Bremner These functions refer to default values of variables, but it seems less confusing and less likely to get out of date to just allow the user to follow the help cross-reference links. --- emacs/notmuch-show.el | 14 ++ 1 file changed, 6

[PATCH 4/4] debian: update .gitignore

2013-06-02 Thread da...@tethera.net
From: David Bremner Several packages have been added or renamed, but their build detritus not yet ignored. --- debian/.gitignore | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/.gitignore b/debian/.gitignore index 9f09f22..31aa2bb 100644

[PATCH 3/4] bindings/go: ignore downloaded source from github.com

2013-06-02 Thread da...@tethera.net
From: David Bremner Start a .gitignore for go bindings. --- bindings/go/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 bindings/go/.gitignore diff --git a/bindings/go/.gitignore b/bindings/go/.gitignore new file mode 100644 index 000..a2670c1 ---

[PATCH 2/4] emacs: update .gitignore

2013-06-02 Thread da...@tethera.net
From: David Bremner Start a seperate .gitignore for emacs stuff, move .elc rule there. --- .gitignore | 1 - emacs/.gitignore | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 emacs/.gitignore diff --git a/.gitignore b/.gitignore index

[PATCH 1/4] bindings/python: ignore build subdirectory.

2013-06-02 Thread da...@tethera.net
From: David Bremner Update .gitignore to make git status less noisy --- bindings/python/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/bindings/python/.gitignore b/bindings/python/.gitignore index 1fbea8a..da0732e 100644 --- a/bindings/python/.gitignore +++

[PATCH] emacs: replace (funcall 'foo ...) with (foo ...)

2013-06-02 Thread da...@tethera.net
From: David Bremner I can't see any benefit to the funcall, and it looks like the result of cut-and-paste from some code that actually used a variable for the function to call. --- Mark and I were discussing some style issues in the context of pick, and it seems to me that

[PATCH 3/3] build: pass CPPFLAGS to C and C++ compilers

2013-05-25 Thread da...@tethera.net
From: David Bremner This is used in particular by hardening flags. --- Makefile.local |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile.local b/Makefile.local index c274f07..644623f 100644 --- a/Makefile.local +++ b/Makefile.local @@

[PATCH 2/3] configure: grab CPPFLAGS from the environment.

2013-05-25 Thread da...@tethera.net
From: David Bremner This is needed in particular for hardening flags. --- configure |5 + 1 file changed, 5 insertions(+) diff --git a/configure b/configure index 460fcfc..3ba1ec3 100755 --- a/configure +++ b/configure @@ -43,6 +43,7 @@ fi CC=${CC:-gcc}

[PATCH 1/3] debian: compile with V=1

2013-05-25 Thread da...@tethera.net
From: David Bremner The idea is to allow hardening verification tools (in particular blhc) to scan the logs. Actually fixing the problem will require modifying the notmuch configure script to propagate CPPFLAGS. --- debian/rules |2 +- 1 file changed, 1 insertion(+), 1

handle CPPFLAGS in configure and make

2013-05-25 Thread da...@tethera.net
I wanted to enable hardening flags in the debian build (I guess other distros will want to do the same); I realized this is made more difficult by the fact that we don't handle CPPFLAGS in our build system. Well, if it makes us feel any better, CMake had (has?) the same bug.

[PATCH] devel: add dkg's printmimestructure script to notmuch devel scripts

2013-05-20 Thread da...@tethera.net
From: David Bremner I find this script pretty useful when figuring out who to blame for MIME rendering problems. It currently isn't very widely known, so it seems worth distributing with notmuch. --- I did a small amount whitespace cleanup compared to version in dkg's git

[PATCH 4/4] perf-test: add notmuch-memory-test

2013-05-15 Thread da...@tethera.net
From: David Bremner Somehow this file was not added to the patch set which split the tests into time and memory tests. Take advantage of the the "new" way of running tests to avoid listing the explicitly. --- performance-test/notmuch-memory-test | 21 + 1

[PATCH 3/4] perf-test: run all appropriately named time tests

2013-05-15 Thread da...@tethera.net
From: David Bremner This avoids hassle with manually adding every test to the master list. --- performance-test/notmuch-time-test | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/performance-test/notmuch-time-test

[PATCH 2/4] perf-test: rename time tests to have .sh suffix

2013-05-15 Thread da...@tethera.net
From: David Bremner This will simplify notmuch time tests --- performance-test/T00-new | 15 --- performance-test/T00-new.sh | 15 +++ performance-test/T01-dump-restore| 13 - performance-test/T01-dump-restore.sh |

[PATCH 1/4] perf-test: rename memory tests

2013-05-15 Thread da...@tethera.net
From: David Bremner The common suffix will help running them all automatically. --- performance-test/M00-new | 15 --- performance-test/M00-new.sh | 15 +++ performance-test/M01-dump-restore| 15 ---

simplify and fix performance tests

2013-05-15 Thread da...@tethera.net
Jani noticed the alleged file notmuch-memory-test was missing. Austin grumbled about explicitly adding tests to a list. This series should give them both something else to grumble about.

[RFC Patch v2 3/3] debian: install info files

2013-04-24 Thread da...@tethera.net
From: David Bremner It seems dh_installinfo doesn't understand wildcards or look in debian/tmp --- debian/notmuch-emacs.info | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 debian/notmuch-emacs.info diff --git a/debian/notmuch-emacs.info

[RFC Patch v2 2/3] man: partial conversion to pod.

2013-04-24 Thread da...@tethera.net
From: David Bremner This allows generation of man page and info document from the same source. It is also a bit more friendly to edit for most people. The conversion was done as follows: % groff -e -mandoc -Tascii -rHY=0 $* | rman -f POD | sed -e '/./,/^$/!d' -e 's/

Second draft of info manual

2013-04-24 Thread da...@tethera.net
In order to get docs both as man pages and as info docs for reading in emacs, I decided to try converting a couple man pages to pod. There turned out to a painful amount of infrastructure needed to get this working, so I didn't get much done on the notmuch-emacs docs. I think all the

[PATCH] man: document NOTMUCH_DEBUG_QUERY

2013-04-15 Thread da...@tethera.net
From: David Bremner This is is really functionality of the library, but CLI users might not look at library docs even if they existed beyond notmuch.h --- man/man1/notmuch.1 |5 + 1 file changed, 5 insertions(+) diff --git a/man/man1/notmuch.1 b/man/man1/notmuch.1 index

[RFC patch] emacs: skeleton of texinfo manual for emacs interface.

2013-03-09 Thread da...@tethera.net
From: David Bremner Currently this only attempts to document the notmuch-hello interface. --- I have thought for a long time that we should have some unified documentation for the emacs interface. This is some sketch of a beginning. Building such a document turns out to be

[PATCH] emacs: introduce notmuch-command-to-string, replace use of shell-command-to-string

2013-03-08 Thread da...@tethera.net
From: David Bremner This has two benefits: unified error handling, and avoiding tramp's hooking into shell-command-string. This seems to be a fix for id:874nguxbvq.fsf at tu-dortmund.de --- Simon: can you check if this fixes your bug? emacs/notmuch-lib.el | 22

[Patch v2 4/4] nmbug: allow empty prefix

2013-02-20 Thread da...@tethera.net
From: David Bremner Current code does not distinguish between an empty string in the NMBPREFIX environment variable and the variable being undefined. This makes it impossible to define an empty prefix, if, e.g. somebody wants to dump all of their tags with nmbug. ---

[Patch v2 3/4] nmbug: replace hard-coded magic hash with git-hash-object

2013-02-20 Thread da...@tethera.net
From: David Bremner This is at least easier to understand than the magic hash. It may also be a bit more robust, although it is hard to imagine these numbers changing without many other changes in git. --- devel/nmbug/nmbug |6 +++--- 1 file changed, 3 insertions(+), 3

[Patch v2 2/4] nmbug: use 'notmuch tag --batch'

2013-02-20 Thread da...@tethera.net
From: David Bremner This should be more robust with respect to tags with whitespace and and other special characters. It also (hopefully) fixes a remaining bug handling message-ids with whitespace. It should also be noticeably faster for large sets of changes since it does

[Patch v2 1/4] nmbug: use dump --format=batch-tag

2013-02-20 Thread da...@tethera.net
From: David Bremner This should make nmbug tolerate tags with whitespace and other special characters it. At the moment this relies on _not_ passing calls to notmuch tag through the shell, which is a documented feature of perl's system function. --- devel/nmbug/nmbug | 27

Update for nmbug, round 2

2013-02-20 Thread da...@tethera.net
This obsoletes id:1360374019-20988-1-git-send-email-david at tethera.net This less broken than the last version ;). I've used these patches for a few days without ill effects. The first two patches use batch-tagging, which should have some speedup. The includes fixes for the issue about

[PATCH] contrib/nmbug: convert to use batch tagging.

2013-02-08 Thread da...@tethera.net
From: David Bremner In the case of large changes to the database from git, one of main current bottlenecks is the large number of execs of notmuch tag. This avoids that by using use the batch tagging facilities as of notmuch 0.15. We use "spawn" directly rather than

[PATCH 2/2] NEWS: News for 0.15.2

2013-01-29 Thread da...@tethera.net
From: David Bremner Another couple of build fixes. --- NEWS | 14 ++ 1 file changed, 14 insertions(+) diff --git a/NEWS b/NEWS index 97f2305..3ba5a50 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,17 @@ +Notmuch 0.15.2 (2013-01-29) +=== +

[PATCH 1/2] test: delay watchdog checks in emacs.

2013-01-29 Thread da...@tethera.net
From: David Bremner Instead of checking immediately for the watched process, delay a minute, or in the case that process-attributes returns nil, for two minutes. This is intended to cope with the case that process-attributes is unimplimented, and returns always returns nil.

another bug fix release: 0.15.2, in progress.

2013-01-29 Thread da...@tethera.net
I plan to do another quick bug fix release, with aidecoe's parallel build fix and a patch originally from Tomi to make the Emacs tests not commit suicide right away on certain OSes. I didn't include the parallel building patch here since it's already in master.

[PATCH 2/2] CLI: add simple error handling for talloc logging

2013-01-29 Thread da...@tethera.net
From: David Bremner This really should have been there before. I think it's better to do the actual operation and then possibly fail writing the memory log, but it would not be too hard to change it to abort earlier. --- notmuch.c | 12 +++- 1 file changed, 7

[PATCH 1/2] man: document NOTMUCH_TALLOC_REPORT environment variable

2013-01-29 Thread da...@tethera.net
From: David Bremner --- man/man1/notmuch.1 |8 1 file changed, 8 insertions(+) diff --git a/man/man1/notmuch.1 b/man/man1/notmuch.1 index 0805be8..55e2d16 100644 --- a/man/man1/notmuch.1 +++ b/man/man1/notmuch.1 @@ -147,6 +147,14 @@ behavior of notmuch. .B

minor fixes for talloc leak logging

2013-01-29 Thread da...@tethera.net
These are the remaining unapplied patches from id:1358619958-21209-1-git-send-email-david at tethera.net They are rebased to omit the actual command line argument, as suggested by id:87d2wzwmd9.fsf at servo.finestructure.net

[PATCH 7/7] CLI: add simple error handling for talloc logging

2013-01-19 Thread da...@tethera.net
From: David Bremner This really should have been there before. I think it's better to do the actual operation and then possibly fail writing the memory log, but it would not be too hard to change it to abort earlier. --- notmuch.c |7 ++- 1 file changed, 6

[PATCH 6/7] man: document NOTMUCH_TALLOC_REPORT environment variable

2013-01-19 Thread da...@tethera.net
From: David Bremner --- man/man1/notmuch.1 |7 +++ 1 file changed, 7 insertions(+) diff --git a/man/man1/notmuch.1 b/man/man1/notmuch.1 index 5c58c41..391eb88 100644 --- a/man/man1/notmuch.1 +++ b/man/man1/notmuch.1 @@ -155,6 +155,13 @@ behavior of notmuch. .B

[PATCH 5/7] CLI: add --leak-report top level option

2013-01-19 Thread da...@tethera.net
From: David Bremner This roughly mimics the samba4 argument. The presence of the command line argument overrides any value of NOTMUCH_TALLOC_REPORT in the environment. --- man/man1/notmuch.1 |8 notmuch.c | 18 +++--- 2 files changed, 15

[PATCH 4/7] man: document existing top level options

2013-01-19 Thread da...@tethera.net
From: David Bremner The options --help and --version were not documented before. One could quibble about how useful that documentation is, but we will soon add more options. --- man/man1/notmuch.1 | 22 +- 1 file changed, 21 insertions(+), 1

[PATCH 3/7] CLI: convert top level argument parsing to use command-line-arguments

2013-01-19 Thread da...@tethera.net
From: David Bremner This isn't really a win for conciseness yet, but will make it easier to add options. --- notmuch.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/notmuch.c b/notmuch.c index f13fd27..a674481 100644 ---

[PATCH 2/7] CLI: remove alias machinery, and "part", "search-tags" commands

2013-01-19 Thread da...@tethera.net
From: David Bremner The commands are long deprecated, so removal is probably overdue. The real motivation is to simplify argument handling for notmuch so that we can migrate to the common argument parsing framework. --- NEWS |8 devel/TODO |7 ---

[PATCH 1/7] emacs: don't use deprecated "notmuch search-tags" command

2013-01-19 Thread da...@tethera.net
From: David Bremner A followup patch will finally remove this command, so we need to stop using it. --- emacs/notmuch-hello.el |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 6db62a0..00b78e1 100644

update top level argument handling

2013-01-19 Thread da...@tethera.net
The only new feature here is an option --leak-report to notmuch new, as requested in id:m2hangivfu.fsf at guru.guru-group.fi There is also a bunch of cleanup of the argument handling. One casualty of this is that the use of aliases (in particular "notmuch part" and "notmuch search-tags" is no

[PATCH] notmuch-tag: initialize with enum instead of 0.

2013-01-19 Thread da...@tethera.net
From: David Bremner This is just a cosmetic fix to make the "type" of ret more clear. --- notmuch-tag.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notmuch-tag.c b/notmuch-tag.c index b54c55d..d9daf8f 100644 --- a/notmuch-tag.c +++ b/notmuch-tag.c

[PATCH] NEWS: describe 'batch-tag' dump/restore/tag

2013-01-17 Thread da...@tethera.net
From: David Bremner Hopefully it is clear that more details are available in the man pages. --- NEWS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/NEWS b/NEWS index 1d29770..42bf276 100644 --- a/NEWS +++ b/NEWS @@ -41,6 +41,16 @@ Fixed `notmuch new` to

[PATCH 5/5] debian: note that ical bug is fixed

2013-01-16 Thread da...@tethera.net
From: David Bremner This was fixed a while ago in git, but not released yet. --- debian/changelog |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 40b7695..6c6915f 100644 --- a/debian/changelog +++

[PATCH 4/5] debian: add python 3 bindings

2013-01-16 Thread da...@tethera.net
From: David Bremner This patch is due to Jakub Wilk . It does add a build depend on python3 for people using the "make debian-snapshot" target. --- debian/changelog |4 +++- debian/control| 14 ++ debian/python-notmuch.install

[PATCH 3/5] debian/compat: upgrade to compat level 9

2013-01-16 Thread da...@tethera.net
From: David Bremner - enable hardening - fix dh syntax. Now that we have compat level 9, the old, wrong syntax is no longer accepted. - update debian/libnotmuch{3,-dev}.install for multiarch. - update versioned dependency on debhelper. --- debian/compat

[PATCH 1/5] debian: change priority to optional.

2013-01-16 Thread da...@tethera.net
From: David Bremner The distinction between extra and optional is generally not very important, except that being extra forces anything that depends on you to be extra. --- debian/changelog |1 + debian/control |2 +- 2 files changed, 2 insertions(+), 1 deletion(-)

No subject

2013-01-16 Thread da...@tethera.net
Hi Gang; Here are some proposed changes to the debian packaging for 0.15. Most will probably be boring to people not familiar with debian packaging, with the excepotion of 4/5, which has a shell pipeline with two xargs in it, and almost can certainly be improved by several readers of this list.

[Patch v2 9/9] test/tagging: add test for naked punctuation in tags; compare with quoting spaces.

2013-01-06 Thread da...@tethera.net
From: David Bremner This test also serves as documentation of the quoting requirements. The comment lines are so that it exactly matches the man page. Nothing more embarrassing than having an example in the man page fail. --- test/tagging | 25 + 1

[Patch v2 8/9] man: document notmuch tag --batch, --input options

2013-01-06 Thread da...@tethera.net
From: Jani Nikula --- man/man1/notmuch-tag.1 | 92 1 file changed, 92 insertions(+) diff --git a/man/man1/notmuch-tag.1 b/man/man1/notmuch-tag.1 index 9444aa4..3aa2fa5 100644 --- a/man/man1/notmuch-tag.1 +++

[Patch v2 7/9] test/tagging: add test for exotic message-ids and batch tagging

2013-01-06 Thread da...@tethera.net
From: David Bremner The (now fixed) bug that this test revealed is that unquoted message-ids with whitespace or other control characters in them are split into several tokens by the Xapian query parser. --- test/tagging | 18 ++ 1 file changed, 18

[Patch v2 6/9] test/tagging: add tests for exotic tags

2013-01-06 Thread da...@tethera.net
From: David Bremner We test quotes seperately because they matter to the query escaper. --- test/tagging | 66 ++ 1 file changed, 66 insertions(+) diff --git a/test/tagging b/test/tagging index 405ad7c..417112b

[Patch v2 5/9] test/tagging: add basic tests for batch tagging functionality

2013-01-06 Thread da...@tethera.net
From: David Bremner This tests argument parsing, blank lines and comments, and basic hex decoding functionality. --- test/tagging | 51 +++ 1 file changed, 51 insertions(+) diff --git a/test/tagging b/test/tagging index

[Patch v2 4/9] test/tagging: add test for error messages of tag --batch

2013-01-06 Thread da...@tethera.net
From: David Bremner This is based on the similar test for notmuch restore, but the parser in batch tagging mode is less tolerant of a few cases, in particular those tested by illegal_tag. --- test/tagging | 35 +++ 1 file changed, 35

[Patch v2 3/9] cli: add support for batch tagging operations to "notmuch tag"

2013-01-06 Thread da...@tethera.net
From: Jani Nikula Add support for batch tagging operations through stdin to "notmuch tag". This can be enabled with the new --batch command line option to "notmuch tag". The input must consist of lines of the format: +|- [...] [--] [...] Each line is interpreted similarly to

[Patch v2 2/9] notmuch-tag.c: convert to use tag-utils

2013-01-06 Thread da...@tethera.net
From: David Bremner Command line parsing is factored out into a function parse_tag_command_line in tag-utils.c. There is some duplicated code eliminated in tag_query, and a bunch of translation from using the bare tag_op structs to using that tag-utils API. ---

[Patch v2 1/9] tag-util: factor out rules for illegal tags, use in parse_tag_line

2013-01-06 Thread da...@tethera.net
From: David Bremner This will allow us to be consistent between batch tagging and command line tagging as far as what is an illegal tag. --- tag-util.c | 36 +++- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/tag-util.c

Xapian-quoting based batch tagging.

2013-01-06 Thread da...@tethera.net
This is essentially just a rebase of id:1356464567-21779-1-git-send-email-david at tethera.net with some commit-message fixups for [Patch v2 3/9] cli: add support for batch tagging operations to as suggested by Jani

[Patch v2] notmuch-restore: handle empty input file, leading blank lines and comments.

2013-01-06 Thread da...@tethera.net
From: David Bremner This patch corrects several undesirable behaviours: 1) Empty files were not detected, leading to buffer read overrun. 2) An initial blank line cause restore to silently abort 3) Initial comment line caused format detection to fail --- notmuch-restore.c

[Patch v2 4/4] perf-test: initial support for talloc leak report in memory tests

2012-12-26 Thread da...@tethera.net
From: David Bremner As with the valgrind logs, we print a (very) brief summary and leave the log for inspection. --- performance-test/perf-test-lib.sh |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/performance-test/perf-test-lib.sh

[Patch v2 3/4] notmuch-restore: use debug version of talloc_strndup

2012-12-26 Thread da...@tethera.net
From: David Bremner This gives line numbers for better debugging. --- notmuch-restore.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/notmuch-restore.c b/notmuch-restore.c index c93f1ac..6111977 100644 --- a/notmuch-restore.c +++

[Patch v2 2/4] util: add talloc-extra.[ch]

2012-12-26 Thread da...@tethera.net
From: David Bremner These are intended to be simple wrappers to provide slightly better debugging information than what talloc currently provides natively. --- notmuch-client.h|2 +- util/Makefile.local |2 +- util/talloc-extra.c | 14 ++

[Patch v2 1/4] CLI: add talloc leak report, controlled by an environment variable.

2012-12-26 Thread da...@tethera.net
From: David Bremner The argument handling in notmuch.c seems due for an overhaul, but until then use an environment variable to specify a location to write the talloc leak report to. This is only enabled for the (interesting) case where some notmuch subcommand is invoked.

v2 talloc leak report

2012-12-26 Thread da...@tethera.net
Obsoletes id:1355714648-23144-1-git-send-email-david at tethera.netZ [Patch v2 1/4] CLI: add talloc leak report, controlled by an - comments and formatting [Patch v2 2/4] util: add talloc-extra.[ch] - rename, fix dangerous memcpy [Patch v2 3/4] notmuch-restore: use debug version of

[PATCH 2/2] notmuch-restore: handle empty input file, leading blank lines and comments.

2012-12-26 Thread da...@tethera.net
From: David Bremner This patch corrects several undesirable behaviours: 1) Empty files were not detected, leading to buffer read overrun. 2) An initial blank line cause restore to silently abort 3) Initial comment line caused format detection to fail --- notmuch-restore.c

[PATCH 1/2] test/dump-restore: new tests for empty files and leading comments/whitespace.

2012-12-26 Thread da...@tethera.net
From: David Bremner Three of these are marked broken; the third is a regression test, since it passes by virtue of batch-tag being the default input format. --- test/dump-restore | 42 ++ 1 file changed, 42 insertions(+) diff --git

[PATCH] notmuch.c: run uncrustify

2012-12-26 Thread da...@tethera.net
From: David Bremner In anticipation of doing some updates to this code, it simplifies life if the code is "uncrustify clean" to start with --- notmuch.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/notmuch.c b/notmuch.c

[PATCH 11/11] test/tagging: add test for naked punctuation in tags; compare with quoting spaces.

2012-12-25 Thread da...@tethera.net
From: David Bremner This test also serves as documentation of the quoting requirements. The comment lines are so that it exactly matches the man page. Nothing more embarrassing than having an example in the man page fail. --- test/tagging | 25 + 1

[PATCH 10/11] man: document notmuch tag --batch, --input options

2012-12-25 Thread da...@tethera.net
From: Jani Nikula --- man/man1/notmuch-tag.1 | 92 1 file changed, 92 insertions(+) diff --git a/man/man1/notmuch-tag.1 b/man/man1/notmuch-tag.1 index 9444aa4..3aa2fa5 100644 --- a/man/man1/notmuch-tag.1 +++

[PATCH 09/11] notmuch-tag.1: tidy synopsis formatting, reference

2012-12-25 Thread da...@tethera.net
From: David Bremner Consistently use [...]; one less space. Use singular --- man/man1/notmuch-tag.1 |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/man/man1/notmuch-tag.1 b/man/man1/notmuch-tag.1 index 0f86582..9444aa4 100644 ---

[PATCH 08/11] test/tagging: add test for exotic message-ids and batch tagging

2012-12-25 Thread da...@tethera.net
From: David Bremner The (now fixed) bug that this test revealed is that unquoted message-ids with whitespace or other control characters in them are split into several tokens by the Xapian query parser. --- test/tagging | 18 ++ 1 file changed, 18

[PATCH 07/11] test/tagging: add tests for exotic tags

2012-12-25 Thread da...@tethera.net
From: David Bremner We test quotes seperately because they matter to the query escaper. --- test/tagging | 66 ++ 1 file changed, 66 insertions(+) diff --git a/test/tagging b/test/tagging index 405ad7c..417112b

[PATCH 06/11] test/tagging: add basic tests for batch tagging functionality

2012-12-25 Thread da...@tethera.net
From: David Bremner This tests argument parsing, blank lines and comments, and basic hex decoding functionality. --- test/tagging | 51 +++ 1 file changed, 51 insertions(+) diff --git a/test/tagging b/test/tagging index

[PATCH 05/11] test/tagging: add test for error messages of tag --batch

2012-12-25 Thread da...@tethera.net
From: David Bremner This is based on the similar test for notmuch restore, but the parser in batch tagging mode is less tolerant of a few cases, in particular those tested by illegal_tag. --- test/tagging | 35 +++ 1 file changed, 35

[PATCH 04/11] cli: add support for batch tagging operations to "notmuch tag"

2012-12-25 Thread da...@tethera.net
From: Jani Nikula Add support for batch tagging operations through stdin to "notmuch tag". This can be enabled with the new --batch command line option to "notmuch tag". The input must consist of lines of the format: +|- [...] [--] [...] Each line is interpreted similarly to

[PATCH 03/11] notmuch-tag.c: convert to use tag-utils

2012-12-25 Thread da...@tethera.net
From: David Bremner Command line parsing is factored out into a function parse_tag_command_line in tag-utils.c. There is some duplicated code eliminated in tag_query, and a bunch of translation from using the bare tag_op structs to using that tag-utils API. ---

[PATCH 02/11] tag-util: factor out rules for illegal tags, use in parse_tag_line

2012-12-25 Thread da...@tethera.net
From: David Bremner This will allow us to be consistent between batch tagging and command line tagging as far as what is an illegal tag. --- tag-util.c | 36 +++- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/tag-util.c

[PATCH 01/11] parse_tag_line: use enum for return value.

2012-12-25 Thread da...@tethera.net
From: David Bremner This is essentially cosmetic, since success=0 is promised by the comments in tag-utils.h. --- tag-util.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tag-util.c b/tag-util.c index e4e5dda..ca12b3b 100644 --- a/tag-util.c +++

Xapian-quoting based batch-tagging.

2012-12-25 Thread da...@tethera.net
This is an alternative version of id:1356313183-9266-1-git-send-email-david at tethera.net batch tagging patches rebased on top of id:1356415076-5692-1-git-send-email-amdragon at mit.edu This mainly consisted of removing [Patch v9 04/17] notmuch-tag: factor out double

[Patch v2 4/4] perf-test: add memory leak test for dump restore

2012-12-24 Thread da...@tethera.net
From: David Bremner In id:87vcc2q5n2.fsf at nikula.org, Jani points out a memory leak in the current version of the sup restore code. Among other things, this test is intended to verify a fix for that leak. --- performance-test/M01-dump-restore | 15 +++ 1 file

[Patch v2 3/4] perf-test: initial version of memory test infrastructure.

2012-12-24 Thread da...@tethera.net
From: David Bremner The idea is run some code under valgrind --leak-check=full and report a summary, leaving the user to peruse the log file if they want. We go to some lengths to preserve the log files from accidental overwriting; the full corpus takes about 3 hours to run

[Patch v2 2/4] perf-test: rename current tests as "time tests"

2012-12-24 Thread da...@tethera.net
From: David Bremner This is almost entirely renaming files, except for updating a few references to those file names, and changing the makefile target. A new set of memory tests will be run separately because they take much longer. --- performance-test/00-new|

[Patch v2 1/4] perf-test: remove redundant "initial notmuch new"

2012-12-24 Thread da...@tethera.net
From: David Bremner The initial notmuch-new and caching are now done automatically by time_start --- performance-test/00-new |4 1 file changed, 4 deletions(-) diff --git a/performance-test/00-new b/performance-test/00-new index 6f0b50c..553bb8b 100755 ---

v2 of valgrind based memory tests

2012-12-24 Thread da...@tethera.net
These obsolete id:1355196820-29734-1-git-send-email-david at tethera.net I tried to follow the suggestions of id:20121216191121.GH6187 at mit.edu pretty closely. diff --git a/performance-test/M00-new b/performance-test/M00-new index 733e9b0..99c3f52 100755 ---

[PATCH] devel: add script to run tests on a patch series.

2012-12-24 Thread da...@tethera.net
From: David Bremner This script is a thin wrapper around git rebase --interactive, that allows the user to fine tune patches if they break the test suite, or violate the coding style guidelines. The user can always run "git rebase --continue" to ignore false positives. I

[Patch v9 17/17] test/tagging: add test for handling of parenthesized tag queries.

2012-12-23 Thread da...@tethera.net
From: David Bremner This test is intended to verify that '(' and ')' are passed through unscathed to Xapian to parse. --- test/tagging | 20 1 file changed, 20 insertions(+) diff --git a/test/tagging b/test/tagging index 748d947..70be943 100755 ---

[Patch v9 16/17] test/tagging: add test for naked punctuation in tags; compare with quoting spaces.

2012-12-23 Thread da...@tethera.net
From: David Bremner This test also serves as documentation of the quoting requirements. The comment lines are so that it exactly matches the man page. Nothing more embarrassing than having an example in the man page fail. --- test/tagging | 24 1

[Patch v9 15/17] man: document notmuch tag --batch, --input options

2012-12-23 Thread da...@tethera.net
From: Jani Nikula --- man/man1/notmuch-tag.1 | 79 1 file changed, 79 insertions(+) diff --git a/man/man1/notmuch-tag.1 b/man/man1/notmuch-tag.1 index 9444aa4..19ccf7e 100644 --- a/man/man1/notmuch-tag.1 +++

  1   2   3   4   5   >