unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH v2 0/6] batch tagging support: "notmuch tag --stdin"
@ 2012-04-14 12:15 Jani Nikula
  2012-04-14 12:15 ` [PATCH v2 1/6] hex-escape: (en|de)code strings to/from restricted character set Jani Nikula
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Jani Nikula @ 2012-04-14 12:15 UTC (permalink / raw)
  To: notmuch

v2 of id:"cover.1333231401.git.jani@nikula.org"

This series adds support for batch tagging through stdin to "notmuch
tag". This should be useful and efficient for e.g. initial tagging
scripts. Also, this adds locking around a batch of tag changes, which is
also useful for initial tagging scripts. See the test patch for an
example using a "here document".

The idea is that the same format (and parser) would be later used for
notmuch dump/restore, building on David's earlier work at
id:"1324214111-32079-1-git-send-email-david@tethera.net".

The v2 only has non-functional changes per David's comments, and
squashes the first three patches of v1 into one.

BR,
Jani.


David Bremner (3):
  hex-escape: (en|de)code strings to/from restricted character set
  test/hex-xcode: new test binary
  test/hex-escaping: new test for hex escaping routines

Jani Nikula (3):
  cli: add support for batch tagging operations to "notmuch tag"
  test: add test for notmuch tag --stdin option
  man: document notmuch tag --stdin option

 man/man1/notmuch-tag.1 |   44 +++++++++-
 notmuch-tag.c          |  244 ++++++++++++++++++++++++++++++++++++++++++------
 test/.gitignore        |    1 +
 test/Makefile.local    |    6 +-
 test/basic             |    2 +-
 test/hex-escaping      |   26 +++++
 test/hex-xcode.c       |  103 ++++++++++++++++++++
 test/notmuch-test      |    1 +
 test/tagging           |   13 +++
 util/Makefile.local    |    2 +-
 util/hex-escape.c      |  168 +++++++++++++++++++++++++++++++++
 util/hex-escape.h      |   41 ++++++++
 12 files changed, 616 insertions(+), 35 deletions(-)
 create mode 100755 test/hex-escaping
 create mode 100644 test/hex-xcode.c
 create mode 100644 util/hex-escape.c
 create mode 100644 util/hex-escape.h

-- 
1.7.5.4

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Random message corpus, v2
@ 2012-08-13 20:13 David Bremner
  2012-08-13 20:13 ` [Patch v2 2/6] test/hex-xcode: new test binary David Bremner
  0 siblings, 1 reply; 12+ messages in thread
From: David Bremner @ 2012-08-13 20:13 UTC (permalink / raw)
  To: notmuch

This obsoletes the series

     id:"1344190393-22497-1-git-send-email-david@tethera.net"

[Patch v2 1/6] hex-escape: (en|de)code strings to/from restricted
[Patch v2 2/6] test/hex-xcode: new test binary
[Patch v2 3/6] test/hex-escaping: new test for hex escaping routines

In order to avoid the problem of trashing people's terminals, the new
version hex escapes the files being compared.  This brings in another
three patches from the previous dump-restore series, but we need them
anyway for the eventual new dump-restore format.

[Patch v2 4/6] test: add database routines for testing.

No changes since v1.

[Patch v2 5/6] test: add generator for random "stub" messages

- Simplified to have only two character classes.
- Fix bug with "stop - start" as opposed to "start - stop"

See id:"87393x3jz1.fsf@qmul.ac.uk"

[Patch v2 6/6] test: add broken roundtrip test

- use hexdump to encode non-ascii octets.

  See id:"87zk6524f0.fsf@qmul.ac.uk"

- Both Mark and Jamie remarked on the use of 'test_expect_success'
  Basically there are two styles of running tests, "git style" as
  written here, or "notmuch style" using "test_begin_subtest".  The
  git style seems to be more robust against failure of intermediate
  commands: for example, if the hex-xcode binary is missing, the
  corresponding notmuch style test shows (wrongly) as fixed (see
  also id:"1317317811-29540-1-git-send-email-thomas@schwinge.name" for
  Thomas converting some notmuch style tests to git style).

  Obviously the notmuch style is more pleasant to edit.  Maybe there
  is a way to make them more robust; something like "set -e".

  Note that some failures still do not abort the test, because of a
  missing "set -o pipefile". Setting this locally in a test seems
  definitely wrong, but maybe it should be set globally in test-lib.sh

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

end of thread, other threads:[~2012-08-14  9:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-14 12:15 [PATCH v2 0/6] batch tagging support: "notmuch tag --stdin" Jani Nikula
2012-04-14 12:15 ` [PATCH v2 1/6] hex-escape: (en|de)code strings to/from restricted character set Jani Nikula
2012-04-14 12:15 ` [PATCH v2 2/6] test/hex-xcode: new test binary Jani Nikula
2012-04-14 12:15 ` [PATCH v2 3/6] test/hex-escaping: new test for hex escaping routines Jani Nikula
2012-04-14 12:15 ` [PATCH v2 4/6] cli: add support for batch tagging operations to "notmuch tag" Jani Nikula
2012-04-14 12:15 ` [PATCH v2 5/6] test: add test for notmuch tag --stdin option Jani Nikula
2012-04-14 12:15 ` [PATCH v2 6/6] man: document " Jani Nikula
2012-04-14 20:27 ` [PATCH v2 0/6] batch tagging support: "notmuch tag --stdin" Jameson Graef Rollins
2012-04-14 21:07   ` Jani Nikula
2012-04-15 12:02     ` David Bremner
2012-04-18 18:58       ` Jani Nikula
  -- strict thread matches above, loose matches on Subject: below --
2012-08-13 20:13 Random message corpus, v2 David Bremner
2012-08-13 20:13 ` [Patch v2 2/6] test/hex-xcode: new test binary 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).