[PATCH 1/5] util: Factor out boolean term quoting routine

2012-12-24 Thread Austin Clements
From: Austin Clements This is now a generic boolean term quoting function. It performs minimal quoting to produce user-friendly queries. This could live in tag-util as well, but it is really nothing specific to tags (although the conventions are specific to Xapian). The API is changed from "ca

[PATCH 4/5] dump/restore: Use Xapian queries for batch-tag format

2012-12-24 Thread Austin Clements
This switches the new batch-tag format away from using a home-grown hex-encoding scheme for message IDs in the dump to simply using Xapian queries with Xapian quoting syntax. This has a variety of advantages beyond presenting a cleaner and more consistent interface. Foremost is that it will drama

[PATCH 2/5] util: Function to parse boolean term queries

2012-12-24 Thread Austin Clements
This reproduces Xapian's parsing rules for boolean term queries. This is provided as a generic string utility, but will be used shortly in notmuch restore to parse and optimize for ID queries. --- util/string-util.c | 63 util/string-util.h |

[PATCH 5/5] man: Update notmuch-dump(1) for new batch-tag format

2012-12-24 Thread Austin Clements
--- man/man1/notmuch-dump.1 | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/man/man1/notmuch-dump.1 b/man/man1/notmuch-dump.1 index 770b00f..7bd6def 100644 --- a/man/man1/notmuch-dump.1 +++ b/man/man1/notmuch-dump.1 @@ -64,13 +64,16 @@ and tags containing whitespa

[PATCH 3/5] dump: Disallow \n in message IDs

2012-12-24 Thread Austin Clements
When we switch to using regular Xapian queries in the dump format, \n will cause problems, so we disallow it. Specially, while Xapian can quote and parse queries containing \n without difficultly, quoted queries containing \n still span multiple lines, which breaks the line-orientedness of the dum

[PATCH 0/5] Use Xapian query syntax for batch-tag dump/restore

2012-12-24 Thread Austin Clements
This is a stab at tweaking the new batch-tag dump/restore format to be more amenable to batch tagging. Currently, the "query" part of each line isn't really a Xapian query; it's a hex-encoded message ID prefixed with "id:". This is fine for the very limited case of dump/restore, but it extends po

[PATCH 1/1] lib/message-file.c: use g_malloc () & g_free () in hash table values

2012-12-24 Thread David Bremner
Tomi Ollila writes: > > The remaining frees and allocations referencing to message->headers hash > values have been changed to use g_free and g_malloc functions. > pushed, d

[PATCH] _notmuch_message_index_file: unref (free) address lists from gmime.

2012-12-24 Thread David Bremner
david at tethera.net writes: > From: David Bremner > > Apparently as of GMime 2.4, you don't need to call > internet_address_list_destroy anymore, but you still need to call > g_object_unref (from the GMime Changelog). > pushed, d

[PATCH] contrib: pick: slightly tweak running search and pick from pick buffer

2012-12-24 Thread David Bremner
Mark Walters writes: > Previously running search or pick from the pick buffer did not close > the message pane (if open). This meant that then new search ends up in > a very small window. Fix this so that the message pane is > shut. However, make it so that the pane is shut after the search > str

[PATCH 1/1] lib/message-file.c: use g_malloc () & g_free () in hash table values

2012-12-24 Thread Austin Clements
LGTM. On Fri, 21 Dec 2012, Tomi Ollila wrote: > The message->headers hash table values get data returned by > g_mime_utils_header_decode_text (). > > The pointer returned by g_mime_utils_header_decode_text is from the > following line in rfc2047_decode_tokens > > return g_string_free (dec

[PATCH] _notmuch_message_index_file: unref (free) address lists from gmime.

2012-12-24 Thread Austin Clements
This patch LGTM. On Mon, 10 Dec 2012, david at tethera.net wrote: > From: David Bremner > > Apparently as of GMime 2.4, you don't need to call > internet_address_list_destroy anymore, but you still need to call > g_object_unref (from the GMime Changelog). > > On the medium performance corpus, val

Re: [PATCH 1/1] lib/message-file.c: use g_malloc () & g_free () in hash table values

2012-12-24 Thread David Bremner
Tomi Ollila writes: > > The remaining frees and allocations referencing to message->headers hash > values have been changed to use g_free and g_malloc functions. > pushed, d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailm

Re: [PATCH] _notmuch_message_index_file: unref (free) address lists from gmime.

2012-12-24 Thread David Bremner
da...@tethera.net writes: > From: David Bremner > > Apparently as of GMime 2.4, you don't need to call > internet_address_list_destroy anymore, but you still need to call > g_object_unref (from the GMime Changelog). > pushed, d ___ notmuch mailing li

Re: [PATCH] contrib: pick: slightly tweak running search and pick from pick buffer

2012-12-24 Thread David Bremner
Mark Walters writes: > Previously running search or pick from the pick buffer did not close > the message pane (if open). This meant that then new search ends up in > a very small window. Fix this so that the message pane is > shut. However, make it so that the pane is shut after the search > str

Re: [PATCH 1/1] lib/message-file.c: use g_malloc () & g_free () in hash table values

2012-12-24 Thread Austin Clements
LGTM. On Fri, 21 Dec 2012, Tomi Ollila wrote: > The message->headers hash table values get data returned by > g_mime_utils_header_decode_text (). > > The pointer returned by g_mime_utils_header_decode_text is from the > following line in rfc2047_decode_tokens > > return g_string_free (dec

Re: [PATCH] _notmuch_message_index_file: unref (free) address lists from gmime.

2012-12-24 Thread Austin Clements
This patch LGTM. On Mon, 10 Dec 2012, da...@tethera.net wrote: > From: David Bremner > > Apparently as of GMime 2.4, you don't need to call > internet_address_list_destroy anymore, but you still need to call > g_object_unref (from the GMime Changelog). > > On the medium performance corpus, valgri

[PATCH] emacs: show: make id links respect window

2012-12-24 Thread David Bremner
Mark Walters writes: > I think this is a bug but that could be debated. It is particularly > easy to trigger with notmuch pick because that uses the split pane > while focus usually remains in the `pick' pane rather than the `show' > pane. I can imagine that people would want/like the "open in o

[PATCH] contrib: pick: slightly tweak running search and pick from pick buffer

2012-12-24 Thread David Bremner
Mark Walters writes: > Previously running search or pick from the pick buffer did not close > the message pane (if open). This meant that then new search ends up in > a very small window. Fix this so that the message pane is > shut. However, make it so that the pane is shut after the search > str

[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 changed, 15 insertio

[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 under valgrind on my

[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| 15 ---

[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 --- a/performance-test/00-new +++

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 --- a/performance-test/M00-n

[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 decided to use perl bec

Re: [PATCH] emacs: show: make id links respect window

2012-12-24 Thread David Bremner
Mark Walters writes: > I think this is a bug but that could be debated. It is particularly > easy to trigger with notmuch pick because that uses the split pane > while focus usually remains in the `pick' pane rather than the `show' > pane. I can imagine that people would want/like the "open in o

Re: [PATCH] contrib: pick: slightly tweak running search and pick from pick buffer

2012-12-24 Thread David Bremner
Mark Walters writes: > Previously running search or pick from the pick buffer did not close > the message pane (if open). This meant that then new search ends up in > a very small window. Fix this so that the message pane is > shut. However, make it so that the pane is shut after the search > str

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

2012-12-24 Thread david
From: David Bremner In id:87vcc2q5n2@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 changed, 15 insertions(

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

2012-12-24 Thread david
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 under valgrind on my

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

2012-12-24 Thread david
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| 15 ---

v2 of valgrind based memory tests

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

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

2012-12-24 Thread david
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 --- a/performance-test/00-new +++

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

2012-12-24 Thread david
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 decided to use perl bec

v9 of batch tagging

2012-12-24 Thread Mark Walters
On Mon, 24 Dec 2012, david at tethera.net wrote: > This obsoletes > > id:1356095307-22895-1-git-send-email-david at tethera.net > > The main changes since v8 are the rebasing against the notmuch-restore > fixes in master, and the rewrite of the query (pre)-processing > unhex_and_quote. This