1 Return-Path: <bremner@tethera.net>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 92325431FD2
\r
6 for <notmuch@notmuchmail.org>; Fri, 3 Aug 2012 19:23:32 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id d6a-B4nmGPb3 for <notmuch@notmuchmail.org>;
\r
16 Fri, 3 Aug 2012 19:23:30 -0700 (PDT)
\r
17 Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])
\r
18 (using TLSv1 with cipher AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 2E923431FC7
\r
21 for <notmuch@notmuchmail.org>; Fri, 3 Aug 2012 19:23:28 -0700 (PDT)
\r
22 Received: from fctnnbsc30w-156034089108.dhcp-dynamic.fibreop.nb.bellaliant.net
\r
23 ([156.34.89.108] helo=zancas.localnet)
\r
24 by tesseract.cs.unb.ca with esmtpsa
\r
25 (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72)
\r
26 (envelope-from <bremner@tethera.net>)
\r
27 id 1SxU1X-0005C7-65; Fri, 03 Aug 2012 23:23:27 -0300
\r
28 Received: from bremner by zancas.localnet with local (Exim 4.80)
\r
29 (envelope-from <bremner@tethera.net>)
\r
30 id 1SxU1R-0006mS-Mg; Fri, 03 Aug 2012 23:23:21 -0300
\r
31 From: david@tethera.net
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [PATCH 1/2] notmuch-dump: remove deprecated positional argument for
\r
35 Date: Fri, 3 Aug 2012 23:23:11 -0300
\r
36 Message-Id: <1344046992-25976-2-git-send-email-david@tethera.net>
\r
37 X-Mailer: git-send-email 1.7.10.4
\r
38 In-Reply-To: <1344046992-25976-1-git-send-email-david@tethera.net>
\r
39 References: <1344046992-25976-1-git-send-email-david@tethera.net>
\r
41 Cc: David Bremner <bremner@debian.org>
\r
42 X-BeenThere: notmuch@notmuchmail.org
\r
43 X-Mailman-Version: 2.1.13
\r
45 List-Id: "Use and development of the notmuch mail system."
\r
46 <notmuch.notmuchmail.org>
\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
50 List-Post: <mailto:notmuch@notmuchmail.org>
\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
54 X-List-Received-Date: Sat, 04 Aug 2012 02:23:32 -0000
\r
56 From: David Bremner <bremner@debian.org>
\r
58 The syntax --output=filename is a smaller change than deleting the
\r
59 output argument completely, and conceivably useful e.g. when running
\r
60 notmuch under a debugger.
\r
62 man/man1/notmuch-dump.1 | 5 ++---
\r
63 notmuch-dump.c | 3 +--
\r
64 test/dump-restore | 20 ++++++++------------
\r
65 test/maildir-sync | 2 +-
\r
66 4 files changed, 12 insertions(+), 18 deletions(-)
\r
68 diff --git a/man/man1/notmuch-dump.1 b/man/man1/notmuch-dump.1
\r
69 index 64abf01..5d1e197 100644
\r
70 --- a/man/man1/notmuch-dump.1
\r
71 +++ b/man/man1/notmuch-dump.1
\r
72 @@ -5,15 +5,14 @@ notmuch-dump \- creates a plain-text dump of the tags of each message
\r
76 -.RI "[ <" filename "> ] [--]"
\r
77 +.RI "[ --output=<" filename "> ] [--]"
\r
78 .RI "[ <" search-term ">...]"
\r
82 Dump tags for messages matching the given search terms.
\r
84 -Output is to the given filename, if any, or to stdout. Note that
\r
85 -using the filename argument is deprecated.
\r
86 +Output is to the given filename, if any, or to stdout.
\r
88 These tags are the only data in the notmuch database that can't be
\r
89 recreated from the messages themselves. The output of notmuch dump is
\r
90 diff --git a/notmuch-dump.c b/notmuch-dump.c
\r
91 index 3743214..d8186fb 100644
\r
92 --- a/notmuch-dump.c
\r
93 +++ b/notmuch-dump.c
\r
94 @@ -44,7 +44,7 @@ notmuch_dump_command (unused (void *ctx), int argc, char *argv[])
\r
97 notmuch_opt_desc_t options[] = {
\r
98 - { NOTMUCH_OPT_POSITION, &output_file_name, 0, 0, 0 },
\r
99 + { NOTMUCH_OPT_STRING, &output_file_name, "output", 'o', 0 },
\r
103 @@ -56,7 +56,6 @@ notmuch_dump_command (unused (void *ctx), int argc, char *argv[])
\r
106 if (output_file_name) {
\r
107 - fprintf (stderr, "Warning: the output file argument of dump is deprecated.\n");
\r
108 output = fopen (output_file_name, "w");
\r
109 if (output == NULL) {
\r
110 fprintf (stderr, "Error opening %s for writing: %s\n",
\r
111 diff --git a/test/dump-restore b/test/dump-restore
\r
112 index 439e998..c7801cf 100755
\r
113 --- a/test/dump-restore
\r
114 +++ b/test/dump-restore
\r
115 @@ -53,16 +53,12 @@ test_expect_success 'Restore with nothing to do, III' \
\r
116 test_expect_success 'Invalid restore invocation' \
\r
117 'test_must_fail notmuch restore dump.expected another_one'
\r
119 -test_begin_subtest "dump outfile"
\r
120 -notmuch dump dump-outfile.actual
\r
121 +test_begin_subtest "dump --output=outfile"
\r
122 +notmuch dump --output=dump-outfile.actual
\r
123 test_expect_equal_file dump.expected dump-outfile.actual
\r
125 -test_begin_subtest "dump outfile # deprecated"
\r
126 -test_expect_equal "Warning: the output file argument of dump is deprecated."\
\r
127 - "$(notmuch dump /dev/null 2>&1)"
\r
129 -test_begin_subtest "dump outfile --"
\r
130 -notmuch dump dump-1-arg-dash.actual --
\r
131 +test_begin_subtest "dump --output=outfile --"
\r
132 +notmuch dump --output=dump-1-arg-dash.actual --
\r
133 test_expect_equal_file dump.expected dump-1-arg-dash.actual
\r
135 # Note, we assume all messages from cworth have a message-id
\r
136 @@ -74,12 +70,12 @@ test_begin_subtest "dump -- from:cworth"
\r
137 notmuch dump -- from:cworth > dump-dash-cworth.actual
\r
138 test_expect_equal_file dump-cworth.expected dump-dash-cworth.actual
\r
140 -test_begin_subtest "dump outfile from:cworth"
\r
141 -notmuch dump dump-outfile-cworth.actual from:cworth
\r
142 +test_begin_subtest "dump --output=outfile from:cworth"
\r
143 +notmuch dump --output=dump-outfile-cworth.actual from:cworth
\r
144 test_expect_equal_file dump-cworth.expected dump-outfile-cworth.actual
\r
146 -test_begin_subtest "dump outfile -- from:cworth"
\r
147 -notmuch dump dump-outfile-dash-inbox.actual -- from:cworth
\r
148 +test_begin_subtest "dump --output=outfile -- from:cworth"
\r
149 +notmuch dump --output=dump-outfile-dash-inbox.actual -- from:cworth
\r
150 test_expect_equal_file dump-cworth.expected dump-outfile-dash-inbox.actual
\r
153 diff --git a/test/maildir-sync b/test/maildir-sync
\r
154 index cd7d241..0914fa5 100755
\r
155 --- a/test/maildir-sync
\r
156 +++ b/test/maildir-sync
\r
157 @@ -124,7 +124,7 @@ mv $MAIL_DIR/cur/adding-replied-tag:2,RS $MAIL_DIR/cur/adding-replied-tag:2,S
\r
158 mv $MAIL_DIR/cur/adding-s-flag:2,S $MAIL_DIR/cur/adding-s-flag:2,
\r
159 mv $MAIL_DIR/cur/adding-with-s-flag:2,S $MAIL_DIR/cur/adding-with-s-flag:2,RS
\r
160 mv $MAIL_DIR/cur/message-to-move-to-cur:2,S $MAIL_DIR/cur/message-to-move-to-cur:2,DS
\r
161 -notmuch dump dump.txt
\r
162 +notmuch dump --output=dump.txt
\r
163 NOTMUCH_NEW >/dev/null
\r
164 notmuch restore dump.txt
\r
165 output=$(ls $MAIL_DIR/cur)
\r