]> git.cworth.org Git - notmuch/commitdiff
Merge branch 'release'
authorDavid Bremner <david@tethera.net>
Sat, 1 Apr 2017 12:36:34 +0000 (09:36 -0300)
committerDavid Bremner <david@tethera.net>
Sat, 1 Apr 2017 12:36:34 +0000 (09:36 -0300)
Final 0.24.1 release

1  2 
notmuch-client.h
notmuch-dump.c
test/T240-dump-restore.sh

diff --combined notmuch-client.h
index 7a674873d5985b122a6ee99cf1f2861e6faac4a2,e8f17250818900467daebda7db5d63803040ab3a..a6f70eae5907743a6995f4828de357b6824beca9
@@@ -83,6 -83,7 +83,6 @@@ typedef struct notmuch_show_params 
      notmuch_bool_t entire_thread;
      notmuch_bool_t omit_excluded;
      notmuch_bool_t output_body;
 -    notmuch_bool_t raw;
      int part;
      notmuch_crypto_t crypto;
      notmuch_bool_t include_html;
@@@ -469,7 -470,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 --combined notmuch-dump.c
index 0cbcdc16695c3686ff6d1058da913be336a8ad63,0bb946f8f3378babd16d261d2e1106e068150db5..e451ac0c8e89448819184e2480b83db222ac93d6
@@@ -84,7 -84,7 +84,7 @@@ print_dump_header (gzFile output, int o
        sep = ",";
      }
      if (include & DUMP_INCLUDE_TAGS) {
-       gzprintf (output, "%sproperties", sep);
+       gzprintf (output, "%stags", sep);
      }
      gzputs (output, "\n");
  }
@@@ -240,7 -240,7 +240,7 @@@ database_dump_file (notmuch_database_t 
       */
      notmuch_query_set_sort (query, NOTMUCH_SORT_UNSORTED);
  
 -    status = notmuch_query_search_messages_st (query, &messages);
 +    status = notmuch_query_search_messages (query, &messages);
      if (print_status_query ("notmuch dump", query, status))
        return EXIT_FAILURE;
  
index f626a19e4b1ad931f475645984656e25dbdc0f9b,d45c9f87d17aca17aa0040ec8cd2e214acda21c1..1f1f08667ada652ec57ebe3d293dd3ff402d4fce
@@@ -4,66 -4,59 +4,65 @@@ test_description="\"notmuch dump\" and 
  
  NOTMUCH_NEW > /dev/null
  test_begin_subtest "dump header"
- test_subtest_known_broken
  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
  add_email_corpus
  
 -test_expect_success 'Dumping all tags' \
 -  'generate_message &&
 -  notmuch new &&
 -  notmuch dump > dump.expected'
 +test_begin_subtest "Dumping all tags"
 +test_expect_success 'generate_message && notmuch new && notmuch dump > dump.expected'
  
  # The use of from:cworth is rather arbitrary: it matches some of the
  # email corpus' messages, but not all of them.
  
 -test_expect_success 'Dumping all tags II' \
 +test_begin_subtest "Dumping all tags II"
 +test_expect_success \
    'notmuch tag +ABC +DEF -- from:cworth &&
    notmuch dump > dump-ABC_DEF.expected &&
    ! cmp dump.expected dump-ABC_DEF.expected'
  
 -test_expect_success 'Clearing all tags' \
 +test_begin_subtest "Clearing all tags"
 +test_expect_success \
    'sed -e "s/(\([^(]*\))$/()/" < dump.expected > clear.expected &&
    notmuch restore --input=clear.expected &&
    notmuch dump > clear.actual &&
    test_cmp clear.expected clear.actual'
  
 -test_expect_success 'Accumulate original tags' \
 +test_begin_subtest "Clearing all tags"
 +test_expect_success \
    'notmuch tag +ABC +DEF -- from:cworth &&
    notmuch restore --accumulate < dump.expected &&
    notmuch dump > dump.actual &&
    test_cmp dump-ABC_DEF.expected dump.actual'
  
 -test_expect_success 'Restoring original tags' \
 +test_begin_subtest "Restoring original tags"
 +test_expect_success \
    'notmuch restore --input=dump.expected &&
    notmuch dump > dump.actual &&
    test_cmp dump.expected dump.actual'
  
 -test_expect_success 'Restore with nothing to do' \
 +test_begin_subtest "Restore with nothing to do"
 +test_expect_success \
    'notmuch restore < dump.expected &&
    notmuch dump > dump.actual &&
    test_cmp dump.expected dump.actual'
  
 -test_expect_success 'Accumulate with existing tags' \
 +test_begin_subtest "Accumulate with existing tags"
 +test_expect_success \
    'notmuch restore --accumulate --input=dump.expected &&
    notmuch dump > dump.actual &&
    test_cmp dump.expected dump.actual'
  
 -test_expect_success 'Accumulate with no tags' \
 +test_begin_subtest "Accumulate with no tags"
 +test_expect_success \
    'notmuch restore --accumulate < clear.expected &&
    notmuch dump > dump.actual &&
    test_cmp dump.expected dump.actual'
  
 -test_expect_success 'Accumulate with new tags' \
 +test_begin_subtest "Accumulate with new tags"
 +test_expect_success \
    'notmuch restore --input=dump.expected &&
    notmuch restore --accumulate --input=dump-ABC_DEF.expected &&
    notmuch dump >  OUTPUT.$test_count &&
@@@ -71,8 -64,7 +70,8 @@@
    test_cmp dump-ABC_DEF.expected OUTPUT.$test_count'
  
  # notmuch restore currently only considers the first argument.
 -test_expect_success 'Invalid restore invocation' \
 +test_begin_subtest "Invalid restore invocation"
 +test_expect_success \
    'test_must_fail notmuch restore --input=dump.expected another_one'
  
  test_begin_subtest "dump --output=outfile"