unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] notmuch dump: default to batch-tag format.
@ 2014-01-21 13:41 david
  2014-01-21 13:58 ` Tomi Ollila
  0 siblings, 1 reply; 7+ messages in thread
From: david @ 2014-01-21 13:41 UTC (permalink / raw)
  To: notmuch

From: David Bremner <david@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..bdb248e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,13 @@
+Notmuch 0.18 (2014-xx-xx)
+=========================
+
+Command-Line Interface
+----------------------
+
+`notmuch dump` now defaults to `batch-tag` format.
+
+  The old format is still available with `--format=sup`.
+
 Notmuch 0.17 (2013-12-30)
 =========================
 
diff --git a/notmuch-dump.c b/notmuch-dump.c
index f8edda7..158142f 100644
--- a/notmuch-dump.c
+++ b/notmuch-dump.c
@@ -40,7 +40,7 @@ notmuch_dump_command (notmuch_config_t *config, int argc, char *argv[])
     char *output_file_name = NULL;
     int opt_index;
 
-    int output_format = DUMP_FORMAT_SUP;
+    int output_format = DUMP_FORMAT_BATCH_TAG;
 
     notmuch_opt_desc_t options[] = {
 	{ NOTMUCH_OPT_KEYWORD, &output_format, "format", 'f',
-- 
1.8.5.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] notmuch dump: default to batch-tag format.
  2014-01-21 13:41 [PATCH] notmuch dump: default to batch-tag format david
@ 2014-01-21 13:58 ` Tomi Ollila
  2014-01-23 13:02   ` [PATCH 1/2] " David Bremner
  0 siblings, 1 reply; 7+ messages in thread
From: Tomi Ollila @ 2014-01-21 13:58 UTC (permalink / raw)
  To: david, notmuch

On Tue, Jan 21 2014, david@tethera.net wrote:

> From: David Bremner <david@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..bdb248e 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -1,3 +1,13 @@
> +Notmuch 0.18 (2014-xx-xx)
> +=========================

I tried to advocate Notmuch 0.18 (UNRELEASED) during last development
cycle -- in followu ========================= p patch (if any -- 
with manpage change) this change could also be made.

> +
> +Command-Line Interface
> +----------------------
> +
> +`notmuch dump` now defaults to `batch-tag` format.
> +
> +  The old format is still available with `--format=sup`.
> +
>  Notmuch 0.17 (2013-12-30)
>  =========================
>  
> diff --git a/notmuch-dump.c b/notmuch-dump.c
> index f8edda7..158142f 100644
> --- a/notmuch-dump.c
> +++ b/notmuch-dump.c
> @@ -40,7 +40,7 @@ notmuch_dump_command (notmuch_config_t *config, int argc, char *argv[])
>      char *output_file_name = NULL;
>      int opt_index;
>  
> -    int output_format = DUMP_FORMAT_SUP;
> +    int output_format = DUMP_FORMAT_BATCH_TAG;

This part looks good.

>  
>      notmuch_opt_desc_t options[] = {
>  	{ NOTMUCH_OPT_KEYWORD, &output_format, "format", 'f',
> -- 

Tomi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] notmuch dump: default to batch-tag format.
  2014-01-21 13:58 ` Tomi Ollila
@ 2014-01-23 13:02   ` David Bremner
  2014-01-23 13:02     ` [PATCH 2/2] man: update notmuch-dump man page for new default David Bremner
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: David Bremner @ 2014-01-23 13:02 UTC (permalink / raw)
  To: notmuch

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..65679eb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,13 @@
+Notmuch 0.18 (UNRELEASED)
+=========================
+
+Command-Line Interface
+----------------------
+
+`notmuch dump` now defaults to `batch-tag` format.
+
+  The old format is still available with `--format=sup`.
+
 Notmuch 0.17 (2013-12-30)
 =========================
 
diff --git a/notmuch-dump.c b/notmuch-dump.c
index f8edda7..158142f 100644
--- a/notmuch-dump.c
+++ b/notmuch-dump.c
@@ -40,7 +40,7 @@ notmuch_dump_command (notmuch_config_t *config, int argc, char *argv[])
     char *output_file_name = NULL;
     int opt_index;
 
-    int output_format = DUMP_FORMAT_SUP;
+    int output_format = DUMP_FORMAT_BATCH_TAG;
 
     notmuch_opt_desc_t options[] = {
 	{ NOTMUCH_OPT_KEYWORD, &output_format, "format", 'f',
-- 
1.8.5.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] man: update notmuch-dump man page for new default.
  2014-01-23 13:02   ` [PATCH 1/2] " David Bremner
@ 2014-01-23 13:02     ` David Bremner
  2014-01-23 21:51     ` [PATCH 1/2] notmuch dump: default to batch-tag format Mark Walters
  2014-01-24  9:26     ` Tomi Ollila
  2 siblings, 0 replies; 7+ messages in thread
From: David Bremner @ 2014-01-23 13:02 UTC (permalink / raw)
  To: notmuch

Actually the previous default was not documented explicitely.  I moved
the batch-tag section first because it seemed that the formats were
previously documented in order default, other.
---
 man/man1/notmuch-dump.1 | 54 +++++++++++++++++++++++++------------------------
 1 file changed, 28 insertions(+), 26 deletions(-)

diff --git a/man/man1/notmuch-dump.1 b/man/man1/notmuch-dump.1
index 0c52d1b..16e72eb 100644
--- a/man/man1/notmuch-dump.1
+++ b/man/man1/notmuch-dump.1
@@ -28,6 +28,34 @@ per line, followed by a list of tags.
 
 .RS 4
 .TP 4
+.B batch-tag
+
+The default
+.B batch-tag
+dump format is intended to more robust against malformed message-ids
+and tags containing whitespace or non-\fBascii\fR(7) characters.
+Each line has the form
+
+.RS 4
+.RI "+<" "encoded-tag" "> " "" "+<" "encoded-tag" "> ... -- " "" " id:<" quoted-message-id >
+
+Tags are hex-encoded by replacing every byte not matching the regex
+.B [A-Za-z0-9@=.,_+-]
+with
+.B %nn
+where nn is the two digit hex encoding.  The message ID is a valid Xapian
+query, quoted using Xapian boolean term quoting rules: if the ID contains
+whitespace or a close paren or starts with a double quote, it must be
+enclosed in double quotes and double quotes inside the ID must be doubled.
+The astute reader will notice this is a special case of the batch input
+format for \fBnotmuch-tag\fR(1); note that the single message-id query is
+mandatory for \fBnotmuch-restore\fR(1).
+
+.RE
+.RE
+
+.RS 4
+.TP 4
 .B sup
 
 The
@@ -53,32 +81,6 @@ that tags with spaces will not be correctly restored with this format.
 .RE
 
 .RE
-.RS 4
-.TP 4
-.B batch-tag
-
-The
-.B batch-tag
-dump format is intended to more robust against malformed message-ids
-and tags containing whitespace or non-\fBascii\fR(7) characters.
-Each line has the form
-
-.RS 4
-.RI "+<" "encoded-tag" "> " "" "+<" "encoded-tag" "> ... -- " "" " id:<" quoted-message-id >
-
-Tags are hex-encoded by replacing every byte not matching the regex
-.B [A-Za-z0-9@=.,_+-]
-with
-.B %nn
-where nn is the two digit hex encoding.  The message ID is a valid Xapian
-query, quoted using Xapian boolean term quoting rules: if the ID contains
-whitespace or a close paren or starts with a double quote, it must be
-enclosed in double quotes and double quotes inside the ID must be doubled.
-The astute reader will notice this is a special case of the batch input
-format for \fBnotmuch-tag\fR(1); note that the single message-id query is
-mandatory for \fBnotmuch-restore\fR(1).
-
-.RE
 
 
 With no search terms, a dump of all messages in the database will be
-- 
1.8.5.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] notmuch dump: default to batch-tag format.
  2014-01-23 13:02   ` [PATCH 1/2] " David Bremner
  2014-01-23 13:02     ` [PATCH 2/2] man: update notmuch-dump man page for new default David Bremner
@ 2014-01-23 21:51     ` Mark Walters
  2014-01-24  9:26     ` Tomi Ollila
  2 siblings, 0 replies; 7+ messages in thread
From: Mark Walters @ 2014-01-23 21:51 UTC (permalink / raw)
  To: David Bremner, notmuch


This series LGTM +1

Best wishes

Mark

On Thu, 23 Jan 2014, David Bremner <david@tethera.net> wrote:
> 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..65679eb 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -1,3 +1,13 @@
> +Notmuch 0.18 (UNRELEASED)
> +=========================
> +
> +Command-Line Interface
> +----------------------
> +
> +`notmuch dump` now defaults to `batch-tag` format.
> +
> +  The old format is still available with `--format=sup`.
> +
>  Notmuch 0.17 (2013-12-30)
>  =========================
>  
> diff --git a/notmuch-dump.c b/notmuch-dump.c
> index f8edda7..158142f 100644
> --- a/notmuch-dump.c
> +++ b/notmuch-dump.c
> @@ -40,7 +40,7 @@ notmuch_dump_command (notmuch_config_t *config, int argc, char *argv[])
>      char *output_file_name = NULL;
>      int opt_index;
>  
> -    int output_format = DUMP_FORMAT_SUP;
> +    int output_format = DUMP_FORMAT_BATCH_TAG;
>  
>      notmuch_opt_desc_t options[] = {
>  	{ NOTMUCH_OPT_KEYWORD, &output_format, "format", 'f',
> -- 
> 1.8.5.2
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] notmuch dump: default to batch-tag format.
  2014-01-23 13:02   ` [PATCH 1/2] " David Bremner
  2014-01-23 13:02     ` [PATCH 2/2] man: update notmuch-dump man page for new default David Bremner
  2014-01-23 21:51     ` [PATCH 1/2] notmuch dump: default to batch-tag format Mark Walters
@ 2014-01-24  9:26     ` Tomi Ollila
  2014-01-24 13:06       ` David Bremner
  2 siblings, 1 reply; 7+ messages in thread
From: Tomi Ollila @ 2014-01-24  9:26 UTC (permalink / raw)
  To: David Bremner, notmuch

On Thu, Jan 23 2014, David Bremner <david@tethera.net> wrote:

> Although we didn't formally deprecate the old format, the new one has
> been available for a year.
> ---

These 2 patches LGTM +1 

Tomi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] notmuch dump: default to batch-tag format.
  2014-01-24  9:26     ` Tomi Ollila
@ 2014-01-24 13:06       ` David Bremner
  0 siblings, 0 replies; 7+ messages in thread
From: David Bremner @ 2014-01-24 13:06 UTC (permalink / raw)
  To: Tomi Ollila, notmuch

Tomi Ollila <tomi.ollila@iki.fi> writes:

> On Thu, Jan 23 2014, David Bremner <david@tethera.net> wrote:
>
>> Although we didn't formally deprecate the old format, the new one has
>> been available for a year.
>> ---
>
> These 2 patches LGTM +1 
>
> Tomi

Pushed.

d

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-01-24 13:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-21 13:41 [PATCH] notmuch dump: default to batch-tag format david
2014-01-21 13:58 ` Tomi Ollila
2014-01-23 13:02   ` [PATCH 1/2] " David Bremner
2014-01-23 13:02     ` [PATCH 2/2] man: update notmuch-dump man page for new default David Bremner
2014-01-23 21:51     ` [PATCH 1/2] notmuch dump: default to batch-tag format Mark Walters
2014-01-24  9:26     ` Tomi Ollila
2014-01-24 13:06       ` 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).