* fix for dump headers @ 2017-03-28 11:09 David Bremner 2017-03-28 11:09 ` [PATCH 1/2] test: add known broken test for dump header David Bremner ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: David Bremner @ 2017-03-28 11:09 UTC (permalink / raw) To: notmuch When I added message properties to the dump output I messed up the copy-paste to add properties to the header. The fix is trivial, but I'm not sure if this means we should bump the format version (i.e. write #notmuch-dump:3) to denote the header can be relied upon. I guess it doesn't hurt to do so. Opinions? ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] test: add known broken test for dump header 2017-03-28 11:09 fix for dump headers David Bremner @ 2017-03-28 11:09 ` David Bremner 2017-04-01 0:23 ` David Bremner 2017-03-28 11:09 ` [PATCH 2/2] cli/dump: fix bug in " David Bremner 2017-04-01 11:12 ` fix for dump headers Tomi Ollila 2 siblings, 1 reply; 7+ messages in thread From: David Bremner @ 2017-03-28 11:09 UTC (permalink / raw) To: notmuch Apparently nobody uses the list of "what was included in the dump" --- test/T240-dump-restore.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh index 206c3ae1..f626a19e 100755 --- a/test/T240-dump-restore.sh +++ b/test/T240-dump-restore.sh @@ -2,6 +2,14 @@ test_description="\"notmuch dump\" and \"notmuch restore\"" . ./test-lib.sh || exit 1 +NOTMUCH_NEW > /dev/null +test_begin_subtest "dump header" +test_subtest_known_broken +cat <<EOF > EXPECTED +#notmuch-dump batch-tag:2 config,properties,tags +EOF +notmuch dump > OUTPUT +test_expect_equal_file EXPECTED OUTPUT add_email_corpus test_begin_subtest "Dumping all tags" -- 2.11.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] test: add known broken test for dump header 2017-03-28 11:09 ` [PATCH 1/2] test: add known broken test for dump header David Bremner @ 2017-04-01 0:23 ` David Bremner 0 siblings, 0 replies; 7+ messages in thread From: David Bremner @ 2017-04-01 0:23 UTC (permalink / raw) To: notmuch David Bremner <david@tethera.net> writes: > Apparently nobody uses the list of "what was included in the dump" test pushed to master. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] cli/dump: fix bug in dump header 2017-03-28 11:09 fix for dump headers David Bremner 2017-03-28 11:09 ` [PATCH 1/2] test: add known broken test for dump header David Bremner @ 2017-03-28 11:09 ` David Bremner 2017-03-31 10:55 ` [PATCH] cli/dump: bump dump format version to 3 David Bremner 2017-04-01 11:12 ` fix for dump headers Tomi Ollila 2 siblings, 1 reply; 7+ messages in thread From: David Bremner @ 2017-03-28 11:09 UTC (permalink / raw) To: notmuch Fix copy paste error. --- notmuch-dump.c | 2 +- test/T240-dump-restore.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/notmuch-dump.c b/notmuch-dump.c index 0cbcdc16..e451ac0c 100644 --- a/notmuch-dump.c +++ b/notmuch-dump.c @@ -84,7 +84,7 @@ print_dump_header (gzFile output, int output_format, int include) sep = ","; } if (include & DUMP_INCLUDE_TAGS) { - gzprintf (output, "%sproperties", sep); + gzprintf (output, "%stags", sep); } gzputs (output, "\n"); } diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh index f626a19e..a4eab65e 100755 --- a/test/T240-dump-restore.sh +++ b/test/T240-dump-restore.sh @@ -4,7 +4,6 @@ test_description="\"notmuch dump\" and \"notmuch restore\"" NOTMUCH_NEW > /dev/null test_begin_subtest "dump header" -test_subtest_known_broken cat <<EOF > EXPECTED #notmuch-dump batch-tag:2 config,properties,tags EOF -- 2.11.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] cli/dump: bump dump format version to 3 2017-03-28 11:09 ` [PATCH 2/2] cli/dump: fix bug in " David Bremner @ 2017-03-31 10:55 ` David Bremner 0 siblings, 0 replies; 7+ messages in thread From: David Bremner @ 2017-03-31 10:55 UTC (permalink / raw) To: David Bremner, notmuch No changes to the format of the body, but the header format was fixed, and version 2 headers probably shouldn't be relied on. --- doc/man1/notmuch-dump.rst | 2 +- notmuch-client.h | 2 +- test/T240-dump-restore.sh | 2 +- test/T590-libconfig.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/man1/notmuch-dump.rst b/doc/man1/notmuch-dump.rst index ca048aeb..f3f2b394 100644 --- a/doc/man1/notmuch-dump.rst +++ b/doc/man1/notmuch-dump.rst @@ -95,7 +95,7 @@ Supported options for **dump** include The default is to include all available types of data. The option can be specified multiple times to select some subset. As - of version 2 of the dump format, there is a header line of the + of version 3 of the dump format, there is a header line of the following form | diff --git a/notmuch-client.h b/notmuch-client.h index 7a674873..a6f70eae 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -469,7 +469,7 @@ typedef enum dump_includes { #define DUMP_INCLUDE_DEFAULT (DUMP_INCLUDE_TAGS | DUMP_INCLUDE_CONFIG | DUMP_INCLUDE_PROPERTIES) -#define NOTMUCH_DUMP_VERSION 2 +#define NOTMUCH_DUMP_VERSION 3 int notmuch_database_dump (notmuch_database_t *notmuch, diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh index a4eab65e..1f1f0866 100755 --- a/test/T240-dump-restore.sh +++ b/test/T240-dump-restore.sh @@ -5,7 +5,7 @@ test_description="\"notmuch dump\" and \"notmuch restore\"" NOTMUCH_NEW > /dev/null test_begin_subtest "dump header" cat <<EOF > EXPECTED -#notmuch-dump batch-tag:2 config,properties,tags +#notmuch-dump batch-tag:3 config,properties,tags EOF notmuch dump > OUTPUT test_expect_equal_file EXPECTED OUTPUT diff --git a/test/T590-libconfig.sh b/test/T590-libconfig.sh index e8c078d5..1b308693 100755 --- a/test/T590-libconfig.sh +++ b/test/T590-libconfig.sh @@ -112,7 +112,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} EOF notmuch dump --include=config >OUTPUT cat <<'EOF' >EXPECTED -#notmuch-dump batch-tag:2 config +#notmuch-dump batch-tag:3 config #@ aaabefore beforeval #@ key%20with%20spaces value,%20with,%20spaces%21 #@ testkey1 testvalue1 -- 2.11.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: fix for dump headers 2017-03-28 11:09 fix for dump headers David Bremner 2017-03-28 11:09 ` [PATCH 1/2] test: add known broken test for dump header David Bremner 2017-03-28 11:09 ` [PATCH 2/2] cli/dump: fix bug in " David Bremner @ 2017-04-01 11:12 ` Tomi Ollila 2017-04-01 12:41 ` David Bremner 2 siblings, 1 reply; 7+ messages in thread From: Tomi Ollila @ 2017-04-01 11:12 UTC (permalink / raw) To: David Bremner, notmuch On Tue, Mar 28 2017, David Bremner <david@tethera.net> wrote: > When I added message properties to the dump output I messed up the > copy-paste to add properties to the header. The fix is trivial, but > I'm not sure if this means we should bump the format version > (i.e. write #notmuch-dump:3) to denote the header can be relied > upon. I guess it doesn't hurt to do so. Opinions? I'd say bump the format version... so rest of the series LGTM. Tomi ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: fix for dump headers 2017-04-01 11:12 ` fix for dump headers Tomi Ollila @ 2017-04-01 12:41 ` David Bremner 0 siblings, 0 replies; 7+ messages in thread From: David Bremner @ 2017-04-01 12:41 UTC (permalink / raw) To: Tomi Ollila, notmuch Tomi Ollila <tomi.ollila@iki.fi> writes: > On Tue, Mar 28 2017, David Bremner <david@tethera.net> wrote: > >> When I added message properties to the dump output I messed up the >> copy-paste to add properties to the header. The fix is trivial, but >> I'm not sure if this means we should bump the format version >> (i.e. write #notmuch-dump:3) to denote the header can be relied >> upon. I guess it doesn't hurt to do so. Opinions? > > I'd say bump the format version... so rest of the series LGTM. > > Tomi OK, pushed to master and release d ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-04-01 12:41 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-03-28 11:09 fix for dump headers David Bremner 2017-03-28 11:09 ` [PATCH 1/2] test: add known broken test for dump header David Bremner 2017-04-01 0:23 ` David Bremner 2017-03-28 11:09 ` [PATCH 2/2] cli/dump: fix bug in " David Bremner 2017-03-31 10:55 ` [PATCH] cli/dump: bump dump format version to 3 David Bremner 2017-04-01 11:12 ` fix for dump headers Tomi Ollila 2017-04-01 12:41 ` David Bremner
Code repositories for project(s) associated with this public inbox https://yhetil.org/notmuch.git/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).