Re: [PATCH v3 04/10] notmuch-dump: add --format=(notmuch|sup)

Subject: Re: [PATCH v3 04/10] notmuch-dump: add --format=(notmuch|sup)

Date: Sun, 15 Jan 2012 15:35:11 -0500

To: David Bremner

Cc: notmuch@notmuchmail.org, David Bremner

From: Austin Clements


Quoth David Bremner on Jan 14 at  9:40 pm:
> From: David Bremner <bremner@debian.org>
> 
> sup is the old format, and remains the default.
> 
> Each line of the notmuch format is "msg_id tag tag...tag" where each
> space seperated token is 'hex-encoded' to remove troubling characters.
> In particular this format won't have the same problem with e.g. spaces
> in message-ids or tags; they will be round-trip-able.

We definitely need a round-trip-able dump format.  Did you consider
using JSON to allow for future flexibility (e.g., expansion of what we
store in the database) and so we don't have to invent our own
encodings?  A JSON format wouldn't necessarily be a reason *not* to
also have this format, especially considering how
shell-script-friendly this is (versus how shell-script-unfriendly JSON
is), I'm just curious what trade-offs you're considering.

You might want to call this format something more self-descriptive
like "text" or "hextext" or something in case we do want to expand in
the future.  "sup" is probably fine for the legacy format since that's
set in stone at this point.

Thread: