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 3EB83431FB6
\r
6 for <notmuch@notmuchmail.org>; Fri, 3 Aug 2012 19:23:35 -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 8k2MDS4qzMdj for <notmuch@notmuchmail.org>;
\r
16 Fri, 3 Aug 2012 19:23:34 -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 5DA57431FC7
\r
21 for <notmuch@notmuchmail.org>; Fri, 3 Aug 2012 19:23:34 -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 1SxU1d-0005CC-Kv; Fri, 03 Aug 2012 23:23:33 -0300
\r
28 Received: from bremner by zancas.localnet with local (Exim 4.80)
\r
29 (envelope-from <bremner@tethera.net>)
\r
30 id 1SxU1Y-0006mc-9G; Fri, 03 Aug 2012 23:23:28 -0300
\r
31 From: david@tethera.net
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [PATCH 2/2] notmuch-restore: replace positional argument for input
\r
35 Date: Fri, 3 Aug 2012 23:23:12 -0300
\r
36 Message-Id: <1344046992-25976-3-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:35 -0000
\r
56 From: David Bremner <bremner@debian.org>
\r
58 Since notmuch dump doesn't use positional arguments anymore, it seems
\r
59 better to be consistent.
\r
61 man/man1/notmuch-restore.1 | 2 +-
\r
62 notmuch-restore.c | 2 +-
\r
63 test/dump-restore | 8 ++++----
\r
64 3 files changed, 6 insertions(+), 6 deletions(-)
\r
66 diff --git a/man/man1/notmuch-restore.1 b/man/man1/notmuch-restore.1
\r
67 index 18281c7..d0d50dd 100644
\r
68 --- a/man/man1/notmuch-restore.1
\r
69 +++ b/man/man1/notmuch-restore.1
\r
70 @@ -6,7 +6,7 @@ notmuch-restore \- restores the tags from the given file (see notmuch dump)
\r
72 .B "notmuch restore"
\r
73 .RB [ "--accumulate" ]
\r
74 -.RI "[ <" filename "> ]"
\r
75 +.RI "[ --input=<" filename "> ]"
\r
79 diff --git a/notmuch-restore.c b/notmuch-restore.c
\r
80 index 4f4096e..08d5adc 100644
\r
81 --- a/notmuch-restore.c
\r
82 +++ b/notmuch-restore.c
\r
83 @@ -122,7 +122,7 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[])
\r
84 synchronize_flags = notmuch_config_get_maildir_synchronize_flags (config);
\r
86 notmuch_opt_desc_t options[] = {
\r
87 - { NOTMUCH_OPT_POSITION, &input_file_name, 0, 0, 0 },
\r
88 + { NOTMUCH_OPT_STRING, &input_file_name, "input", 'i', 0 },
\r
89 { NOTMUCH_OPT_BOOLEAN, &accumulate, "accumulate", 'a', 0 },
\r
92 diff --git a/test/dump-restore b/test/dump-restore
\r
93 index c7801cf..f25f7cf 100755
\r
94 --- a/test/dump-restore
\r
95 +++ b/test/dump-restore
\r
96 @@ -19,7 +19,7 @@ test_expect_success 'Dumping all tags II' \
\r
98 test_expect_success 'Clearing all tags' \
\r
99 'sed -e "s/(\([^(]*\))$/()/" < dump.expected > clear.expected &&
\r
100 - notmuch restore clear.expected &&
\r
101 + notmuch restore --input=clear.expected &&
\r
102 notmuch dump > clear.actual &&
\r
103 test_cmp clear.expected clear.actual'
\r
105 @@ -30,7 +30,7 @@ test_expect_success 'Accumulate original tags' \
\r
106 test_cmp dump-ABC_DEF.expected dump.actual'
\r
108 test_expect_success 'Restoring original tags' \
\r
109 - 'notmuch restore dump.expected &&
\r
110 + 'notmuch restore --input=dump.expected &&
\r
111 notmuch dump > dump.actual &&
\r
112 test_cmp dump.expected dump.actual'
\r
114 @@ -40,7 +40,7 @@ test_expect_success 'Restore with nothing to do' \
\r
115 test_cmp dump.expected dump.actual'
\r
117 test_expect_success 'Restore with nothing to do, II' \
\r
118 - 'notmuch restore --accumulate dump.expected &&
\r
119 + 'notmuch restore --accumulate --input=dump.expected &&
\r
120 notmuch dump > dump.actual &&
\r
121 test_cmp dump.expected dump.actual'
\r
123 @@ -51,7 +51,7 @@ test_expect_success 'Restore with nothing to do, III' \
\r
125 # notmuch restore currently only considers the first argument.
\r
126 test_expect_success 'Invalid restore invocation' \
\r
127 - 'test_must_fail notmuch restore dump.expected another_one'
\r
128 + 'test_must_fail notmuch restore --input=dump.expected another_one'
\r
130 test_begin_subtest "dump --output=outfile"
\r
131 notmuch dump --output=dump-outfile.actual
\r