Re: [PATCH v3 3/6] util: make sanitize string available in string util for reuse

2014-03-08 Thread David Bremner
The first 3 patches in this series seem uncontroverisal, and pushable alone. d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

Re: [PATCH] nmbug: Add 'clone' and replace FETCH_HEAD with @{upstream}

2014-03-08 Thread David Bremner
W. Trevor King wk...@tremily.us writes: +sub do_clone { + my $repository = shift; + system ('git', 'clone', '--bare', $repository, $NMBGIT) == 0 +or die 'git clone' exited with nonzero value\n; + my $branch = git ('symbolic-ref', 'HEAD'); + $branch =~ s|^refs/heads/||; + git

Re: [PATCH v3 3/3] emacs: defun notmuch-hello-versions and bind 'v' in hello mode to it

2014-03-08 Thread David Bremner
Tomi Ollila tomi.oll...@iki.fi writes: If notmuch cli notmuch emacs MUA versions differ, print also the emacs MUA version string (along with the cli version) to the minibuffer. any idea why I get notmuch version 0.17+111~g93cd619 (emacs mua version unknown) when I make debian-snapshot

[PATCH] test: don't use $(dir) in recipes.

2014-03-08 Thread David Bremner
According the semantics of make, the expansion of $(dir) in recipes uses dynamic scope, i.e. the value at the time the recipe is run. This means if test/Makefile.local is not the last sub-makefile included, all heck breaks loose. --- This was originally part of some suggested changes to Jani's

Re: [PATCH] nmbug: Add 'clone' and replace FETCH_HEAD with @{upstream}

2014-03-08 Thread W. Trevor King
On Sat, Mar 08, 2014 at 08:43:26AM -0400, David Bremner wrote: W. Trevor King writes: +sub do_clone { + my $repository = shift; + system ('git', 'clone', '--bare', $repository, $NMBGIT) == 0 +or die 'git clone' exited with nonzero value\n; + my $branch = git ('symbolic-ref',

Re: [PATCH] nmbug: Add 'clone' and replace FETCH_HEAD with @{upstream}

2014-03-08 Thread W. Trevor King
On Sat, Mar 08, 2014 at 08:26:33AM -0800, W. Trevor King wrote: That's going to create ~/.nmbug/.git though, if we want to preserve the current bare-style ~/.nmbug/ layout, we'd need something like: $ TEMPDIR=$(mktemp -d) $ git clone --no-checkout --separate-git-dir=~/.nmbug \

v3 of boolean folder: patches

2014-03-08 Thread David Bremner
This is a followup to id:cover.1393105055.git.j...@nikula.org The first 11 patches are very close to that series; in the last 4 I have added some minimalist infrastructure to download and verify pre-built test databases. I decided that the benefits of being to really apply and test the

[Patch v3 14/15] test: commit folders-v1.tar.xz checksum, ignore actual databases

2014-03-08 Thread David Bremner
The checksum file is used by the test infrastructure to verify the downloaded test database is the one we had in mind. Note that this test is rather strict, and the the checksum file needs to be recommitted when the database is regenerated. add a pattern .gitignore to ignore the actual databases

[Patch v3 15/15] test: add machinery to download and verify databases

2014-03-08 Thread David Bremner
Note that it is intentional that the checksum file is not downloaded. The intent is to check those into git. --- Makefile | 3 ++- test/Makefile.local| 2 +- test/README| 8 test/T530-upgrade.sh | 2 +-

[Patch v3 05/15] test: fix test for literal folder: search

2014-03-08 Thread David Bremner
From: Jani Nikula j...@nikula.org Some of the folder: matching capabilities are lost in the probabilistic to boolean prefix change. Fix them. --- test/T100-search-by-folder.sh | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git

[Patch v3 04/15] lib: make folder: prefix literal

2014-03-08 Thread David Bremner
From: Jani Nikula j...@nikula.org In xapian terms, convert folder: prefix from probabilistic to boolean prefix, matching the paths, relative form the maildir root, of the message files, ignoring the maildir new and cur leaf directories. folder:foo matches all message files in foo, foo/new, and

[Patch v3 11/15] man: try to clarify the folder: and path: vs. --output=files confusion

2014-03-08 Thread David Bremner
From: Jani Nikula j...@nikula.org --- man/man1/notmuch-search.1 | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/man/man1/notmuch-search.1 b/man/man1/notmuch-search.1 index 55a81e7..a2b1ae4 100644 --- a/man/man1/notmuch-search.1 +++ b/man/man1/notmuch-search.1 @@

[Patch v3 03/15] test: make insert test use the path: prefix

2014-03-08 Thread David Bremner
From: Jani Nikula j...@nikula.org This is a more strict test for the insert test. --- test/T070-insert.sh | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/T070-insert.sh b/test/T070-insert.sh index b77c5e1..ea9db07 100755 --- a/test/T070-insert.sh +++

[Patch v3 01/15] lib: refactor folder term update after filename removal

2014-03-08 Thread David Bremner
From: Jani Nikula j...@nikula.org Abstract some blocks of code for reuse. No functional changes. --- lib/message.cc | 135 - 1 file changed, 66 insertions(+), 69 deletions(-) diff --git a/lib/message.cc b/lib/message.cc index

[Patch v3 10/15] man: update man pages for folder: and path: search terms

2014-03-08 Thread David Bremner
From: Jani Nikula j...@nikula.org --- man/man7/notmuch-search-terms.7 | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/man/man7/notmuch-search-terms.7 b/man/man7/notmuch-search-terms.7 index a768b63..907403d 100644 ---

[Patch v3 09/15] test: add database upgrade test from format version 1 to 2

2014-03-08 Thread David Bremner
From: Jani Nikula j...@nikula.org Test the upgrade from probabilistic to boolean folder: terms, and addition of path: terms. The test depends on the pre-built test corpus and database tarball and checksum file being in place. If it's not, the test is skipped. The mechanism to fetch the test

[Patch v3 13/15] devel: add script to generate test databases

2014-03-08 Thread David Bremner
From: Jani Nikula j...@nikula.org Add script to generate notmuch test databases using specified versions of notmuch. This is useful for generating material for database upgrade tests. This reuses the test infrastructure to have a sandbox environment for notmuch new etc. --- devel/gen-testdb.sh

[Patch v3 08/15] test: add tests for the new boolean folder: and path: prefixes

2014-03-08 Thread David Bremner
From: Jani Nikula j...@nikula.org Additional tests for the boolean folder: and path: prefixes using the new corpus. --- test/T101-search-by-folder-and-path.sh | 83 ++ 1 file changed, 83 insertions(+) create mode 100755 test/T101-search-by-folder-and-path.sh

[Patch v3 02/15] lib: add support for path: prefix searches

2014-03-08 Thread David Bremner
From: Jani Nikula j...@nikula.org The path: prefix is a literal boolean prefix matching the paths, relative from the maildir root, of the message files. path:foo matches all message files in foo (but not in foo/new or foo/cur). path:foo/new matches all message files in foo/new. path: matches

[Patch v3 12/15] test: don't use $(dir) in recipes.

2014-03-08 Thread David Bremner
According the semantics of make, the expansion of $(dir) in recipes uses dynamic scope, i.e. the value at the time the recipe is run. This means if test/Makefile.local is not the last sub-makefile included, all heck breaks loose. --- test/Makefile.local | 4 +++- 1 file changed, 3 insertions(+),

Re: v3 of boolean folder: patches

2014-03-08 Thread David Bremner
David Bremner da...@tethera.net writes: I decided that the benefits of being to really apply and test the patch series outweighed the fact that one of patchs is about 150K. Apologies to those of you on GSM modems and the like. Oops. I didn't realize the reorganize the corpus patch was so

Re: [Patch v3 04/15] lib: make folder: prefix literal

2014-03-08 Thread Austin Clements
Quoth David Bremner on Mar 08 at 5:19 pm: From: Jani Nikula j...@nikula.org In xapian terms, convert folder: prefix from probabilistic to boolean prefix, matching the paths, relative form the maildir root, of the s/form/from/ message files, ignoring the maildir new and cur leaf

Re: [Patch v3 08/15] test: add tests for the new boolean folder: and path: prefixes

2014-03-08 Thread Austin Clements
Quoth David Bremner on Mar 08 at 5:19 pm: From: Jani Nikula j...@nikula.org Additional tests for the boolean folder: and path: prefixes using the new corpus. --- test/T101-search-by-folder-and-path.sh | 83 ++ Would it be possible to fold these in to (or

Re: [Patch v3 10/15] man: update man pages for folder: and path: search terms

2014-03-08 Thread Austin Clements
Quoth David Bremner on Mar 08 at 5:19 pm: From: Jani Nikula j...@nikula.org --- man/man7/notmuch-search-terms.7 | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/man/man7/notmuch-search-terms.7 b/man/man7/notmuch-search-terms.7 index

[PATCH v3 3/6] util: make sanitize string available in string util for reuse

2014-03-08 Thread David Bremner
The first 3 patches in this series seem uncontroverisal, and pushable alone. d

[PATCH] nmbug: Add 'clone' and replace FETCH_HEAD with @{upstream}

2014-03-08 Thread David Bremner
"W. Trevor King" writes: > +sub do_clone { > + my $repository = shift; > + system ('git', 'clone', '--bare', $repository, $NMBGIT) == 0 > +or die "'git clone' exited with nonzero value\n"; > + my $branch = git ('symbolic-ref', 'HEAD'); > + $branch =~ s|^refs/heads/||; > + git

[PATCH v3 3/3] emacs: defun notmuch-hello-versions and bind 'v' in hello mode to it

2014-03-08 Thread David Bremner
Tomi Ollila writes: > If notmuch cli & notmuch emacs MUA versions differ, print also the > emacs MUA version string (along with the cli version) to the > minibuffer. any idea why I get notmuch version 0.17+111~g93cd619 (emacs mua version unknown) when I "make debian-snapshot" after

[PATCH] test: don't use $(dir) in recipes.

2014-03-08 Thread David Bremner
According the semantics of make, the expansion of $(dir) in recipes uses dynamic scope, i.e. the value at the time the recipe is run. This means if test/Makefile.local is not the last sub-makefile included, all heck breaks loose. --- This was originally part of some suggested changes to Jani's

[PATCH] nmbug: Add 'clone' and replace FETCH_HEAD with @{upstream}

2014-03-08 Thread W. Trevor King
ful example. I don't think that calls for another layer of indirection. Cheers, Trevor -- This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy -- next part -- A non-text att

[PATCH] nmbug: Add 'clone' and replace FETCH_HEAD with @{upstream}

2014-03-08 Thread W. Trevor King
ital signature URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20140308/fe32bab6/attachment.pgp>

[Patch v3 14/15] test: commit folders-v1.tar.xz checksum, ignore actual databases

2014-03-08 Thread David Bremner
The checksum file is used by the test infrastructure to verify the downloaded test database is the one we had in mind. Note that this test is rather strict, and the the checksum file needs to be recommitted when the database is regenerated. add a pattern .gitignore to ignore the actual databases

v3 of boolean folder: patches

2014-03-08 Thread David Bremner
This is a followup to id:cover.1393105055.git.jani at nikula.org The first 11 patches are very close to that series; in the last 4 I have added some minimalist infrastructure to download and verify pre-built test databases. I decided that the benefits of being to really apply and test the

[Patch v3 15/15] test: add machinery to download and verify databases

2014-03-08 Thread David Bremner
Note that it is intentional that the checksum file is not downloaded. The intent is to check those into git. --- Makefile | 3 ++- test/Makefile.local| 2 +- test/README| 8 test/T530-upgrade.sh | 2 +-

[Patch v3 05/15] test: fix test for literal folder: search

2014-03-08 Thread David Bremner
From: Jani Nikula Some of the folder: matching capabilities are lost in the probabilistic to boolean prefix change. Fix them. --- test/T100-search-by-folder.sh | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git

[Patch v3 04/15] lib: make folder: prefix literal

2014-03-08 Thread David Bremner
From: Jani Nikula In xapian terms, convert folder: prefix from probabilistic to boolean prefix, matching the paths, relative form the maildir root, of the message files, ignoring the maildir new and cur leaf directories. folder:foo matches all message files in foo, foo/new, and

[Patch v3 11/15] man: try to clarify the folder: and path: vs. --output=files confusion

2014-03-08 Thread David Bremner
From: Jani Nikula --- man/man1/notmuch-search.1 | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/man/man1/notmuch-search.1 b/man/man1/notmuch-search.1 index 55a81e7..a2b1ae4 100644 --- a/man/man1/notmuch-search.1 +++ b/man/man1/notmuch-search.1 @@

[Patch v3 01/15] lib: refactor folder term update after filename removal

2014-03-08 Thread David Bremner
From: Jani Nikula Abstract some blocks of code for reuse. No functional changes. --- lib/message.cc | 135 - 1 file changed, 66 insertions(+), 69 deletions(-) diff --git a/lib/message.cc b/lib/message.cc index

[Patch v3 03/15] test: make insert test use the path: prefix

2014-03-08 Thread David Bremner
From: Jani Nikula This is a more strict test for the insert test. --- test/T070-insert.sh | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/T070-insert.sh b/test/T070-insert.sh index b77c5e1..ea9db07 100755 --- a/test/T070-insert.sh +++

[Patch v3 09/15] test: add database upgrade test from format version 1 to 2

2014-03-08 Thread David Bremner
From: Jani Nikula Test the upgrade from probabilistic to boolean folder: terms, and addition of path: terms. The test depends on the pre-built test corpus and database tarball and checksum file being in place. If it's not, the test is skipped. The mechanism to fetch the test

[Patch v3 10/15] man: update man pages for folder: and path: search terms

2014-03-08 Thread David Bremner
From: Jani Nikula --- man/man7/notmuch-search-terms.7 | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/man/man7/notmuch-search-terms.7 b/man/man7/notmuch-search-terms.7 index a768b63..907403d 100644 ---

[Patch v3 13/15] devel: add script to generate test databases

2014-03-08 Thread David Bremner
From: Jani Nikula Add script to generate notmuch test databases using specified versions of notmuch. This is useful for generating material for database upgrade tests. This reuses the test infrastructure to have a sandbox environment for notmuch new etc. ---

[Patch v3 08/15] test: add tests for the new boolean folder: and path: prefixes

2014-03-08 Thread David Bremner
From: Jani Nikula Additional tests for the boolean folder: and path: prefixes using the new corpus. --- test/T101-search-by-folder-and-path.sh | 83 ++ 1 file changed, 83 insertions(+) create mode 100755 test/T101-search-by-folder-and-path.sh

[Patch v3 12/15] test: don't use $(dir) in recipes.

2014-03-08 Thread David Bremner
According the semantics of make, the expansion of $(dir) in recipes uses dynamic scope, i.e. the value at the time the recipe is run. This means if test/Makefile.local is not the last sub-makefile included, all heck breaks loose. --- test/Makefile.local | 4 +++- 1 file changed, 3 insertions(+),

[Patch v3 02/15] lib: add support for path: prefix searches

2014-03-08 Thread David Bremner
From: Jani Nikula The path: prefix is a literal boolean prefix matching the paths, relative from the maildir root, of the message files. path:foo matches all message files in foo (but not in foo/new or foo/cur). path:foo/new matches all message files in foo/new. path:""

v3 of boolean folder: patches

2014-03-08 Thread David Bremner
David Bremner writes: > > I decided that the benefits of being to really apply and test the > patch series outweighed the fact that one of patchs is about > 150K. Apologies to those of you on GSM modems and the like. > Oops. I didn't realize the "reorganize the corpus" patch was so big. So I

[Patch v3 04/15] lib: make folder: prefix literal

2014-03-08 Thread Austin Clements
Quoth David Bremner on Mar 08 at 5:19 pm: > From: Jani Nikula > > In xapian terms, convert folder: prefix from probabilistic to boolean > prefix, matching the paths, relative form the maildir root, of the s/form/from/ > message files, ignoring the maildir new and cur leaf directories. > >

[Patch v3 08/15] test: add tests for the new boolean folder: and path: prefixes

2014-03-08 Thread Austin Clements
Quoth David Bremner on Mar 08 at 5:19 pm: > From: Jani Nikula > > Additional tests for the boolean folder: and path: prefixes using the > new corpus. > --- > test/T101-search-by-folder-and-path.sh | 83 > ++ Would it be possible to fold these in to (or simply

[Patch v3 10/15] man: update man pages for folder: and path: search terms

2014-03-08 Thread Austin Clements
Quoth David Bremner on Mar 08 at 5:19 pm: > From: Jani Nikula > > --- > man/man7/notmuch-search-terms.7 | 28 ++-- > 1 file changed, 22 insertions(+), 6 deletions(-) > > diff --git a/man/man7/notmuch-search-terms.7 b/man/man7/notmuch-search-terms.7 > index