<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/notmuch-restore.c, branch 0.15.2</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.15.2</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.15.2'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2013-01-07T02:40:32Z</updated>
<entry>
<title>dump/restore: Use Xapian queries for batch-tag format</title>
<updated>2013-01-07T02:40:32Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2013-01-06T20:22:41Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=425e2bc81263230df301c67d93c64ff9685ff840'/>
<id>urn:sha1:425e2bc81263230df301c67d93c64ff9685ff840</id>
<content type='text'>
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 dramatically simplify
the quoting for batch tagging, which shares the same input format.
While the hex-encoding is no better or worse for the simple ID queries
used by dump/restore, it becomes onerous for general-purpose queries
used in batch tagging.  It also better handles strange cases like
"id:foo and bar", since this is no longer syntactically valid.
</content>
</entry>
<entry>
<title>restore: Make missing messages non-fatal (again)</title>
<updated>2013-01-07T02:39:23Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2013-01-06T20:22:37Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=baca1219af0ef1f81985759e868a68e9dd78e0d1'/>
<id>urn:sha1:baca1219af0ef1f81985759e868a68e9dd78e0d1</id>
<content type='text'>
Previously, restore would abort if a message ID in the dump was
missing.  Furthermore, it would only report this as a warning.  This
patch makes it distinguish abort-worthy lookup failures like
out-of-memory from non-fatal failure to find a message ID.  The former
is reported as an error and causes restore to abort, while the latter
is reported as a warning and does not cause an abort.

This restores 0.14's non-fatal handling of missing message IDs in
restore (though 0.14 also considered serious errors non-fatal; we
retain the new and better handling of serious errors).
</content>
</entry>
<entry>
<title>notmuch-restore: handle empty input file, leading blank lines and comments.</title>
<updated>2013-01-06T14:04:19Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2012-12-26T19:36:33Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d705a6a45bf691b60101203bd09a459be255dceb'/>
<id>urn:sha1:d705a6a45bf691b60101203bd09a459be255dceb</id>
<content type='text'>
This patch corrects several undesirable behaviours:

1) Empty files were not detected, leading to buffer read overrun.

2) An initial blank line cause restore to silently abort

3) Initial comment line caused format detection to fail
</content>
</entry>
<entry>
<title>notmuch-restore: use debug version of talloc_strndup</title>
<updated>2012-12-31T01:12:11Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2012-12-17T03:14:42Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e40bb1561a6036fcc6a8ff3510dc5061a0ea31e8'/>
<id>urn:sha1:e40bb1561a6036fcc6a8ff3510dc5061a0ea31e8</id>
<content type='text'>
This gives line numbers for better debugging.
</content>
</entry>
<entry>
<title>notmuch-restore: allocate a temporary talloc context for each line parsed.</title>
<updated>2012-12-23T03:19:43Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2012-12-16T20:05:58Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=0919ea4c553bde840a0f37c6076712f345bcac7d'/>
<id>urn:sha1:0919ea4c553bde840a0f37c6076712f345bcac7d</id>
<content type='text'>
This lets the high level code in notmuch restore be ignorant about
what the lower level code is doing as far as allocating memory.
</content>
</entry>
<entry>
<title>tag-utils: use the tag_opt_list_t as talloc context, if possible.</title>
<updated>2012-12-23T03:13:15Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2012-12-16T19:58:15Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ba4e8565294fc0a197b4c08082ad912c31888008'/>
<id>urn:sha1:ba4e8565294fc0a197b4c08082ad912c31888008</id>
<content type='text'>
The memory usage discipline of tag_op_list_t is never to free the
internal array of tag operations before freeing the whole list, so it
makes sense to take advantage of hierarchical de-allocation by talloc.

By not relying on the context passed into tag_parse_line, we can allow
tag_op_list_t structures to live longer than that context.
</content>
</entry>
<entry>
<title>notmuch-restore: fix return value propagation</title>
<updated>2012-12-23T03:11:47Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2012-12-16T20:04:21Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=77b4ec70ecb9fdcbf9afd31f3663bd0135806bda'/>
<id>urn:sha1:77b4ec70ecb9fdcbf9afd31f3663bd0135806bda</id>
<content type='text'>
Previously notmuch_restore_command returned 0 if tag_message returned
a non-zero (failure) value. This is wrong, since non-zero status
indicates something mysterious went wrong with retrieving the message,
or applying it.

There was also a failure to check or propagate the return value from
tag_op_list_apply in tag_message.
</content>
</entry>
<entry>
<title>notmuch-restore: normalize case of error messages.</title>
<updated>2012-12-09T17:33:34Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2012-12-08T21:57:10Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ea85725450de3e65f1db35112fd621c11dd1cab9'/>
<id>urn:sha1:ea85725450de3e65f1db35112fd621c11dd1cab9</id>
<content type='text'>
In English, (unlike German) one does not capitalize the first word
after a colon.
</content>
</entry>
<entry>
<title>notmuch-restore: add support for input format 'batch-tag'</title>
<updated>2012-12-09T17:33:34Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2012-11-11T14:13:48Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=33434d76f3fdb6f0602ab50bd9e72f5f12ce3e4b'/>
<id>urn:sha1:33434d76f3fdb6f0602ab50bd9e72f5f12ce3e4b</id>
<content type='text'>
This can be enabled with the new --format=batch-tag command line
option to "notmuch restore". The input must consist of lines of the
format:

    +&lt;tag&gt;|-&lt;tag&gt; [...] [--] id:&lt;msg-id&gt;

Each line is interpreted similarly to "notmuch tag" command line
arguments. The delimiter is one or more spaces ' '. Any characters in
&lt;tag&gt; and &lt;search-terms&gt; MAY be hex encoded with %NN where NN is the
hexadecimal value of the character. Any ' ' and '%' characters in
&lt;tag&gt; and &lt;msg-id&gt; MUST be hex encoded (using %20 and %25,
respectively). Any characters that are not part of &lt;tag&gt; or
&lt;search-terms&gt; MUST NOT be hex encoded.

Leading and trailing space ' ' is ignored. Empty lines and lines
beginning with '#' are ignored.

Commit message mainly stolen from Jani's batch tagging commit, to
follow.
</content>
</entry>
<entry>
<title>notmuch-restore: tidy formatting</title>
<updated>2012-11-16T12:46:07Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2012-11-15T01:33:21Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=660e1b64370e864b6ecee6303bbbae9f20d01830'/>
<id>urn:sha1:660e1b64370e864b6ecee6303bbbae9f20d01830</id>
<content type='text'>
This is again the work of uncrustify.

I remember there is some controversy about "! foo" versus "!foo", but
in context I think "! foo" looks OK. Also, for functions "! foo
(blah)" seems better than "!foo (blah)".
</content>
</entry>
</feed>
