1 Return-Path: <amdragon@mit.edu>
\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 D51C8431FAF
\r
6 for <notmuch@notmuchmail.org>; Fri, 3 Feb 2012 14:46:02 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\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 x8RKZAZeZk3v for <notmuch@notmuchmail.org>;
\r
16 Fri, 3 Feb 2012 14:46:02 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 32C4F431FAE
\r
20 for <notmuch@notmuchmail.org>; Fri, 3 Feb 2012 14:46:02 -0800 (PST)
\r
21 X-AuditID: 1209190d-b7fbf6d0000008ba-5c-4f2c63a98d0d
\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])
\r
23 by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id F3.E0.02234.9A36C2F4; Fri, 3 Feb 2012 17:46:01 -0500 (EST)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q13Mk0vO009754;
\r
27 Fri, 3 Feb 2012 17:46:00 -0500
\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q13MjweI019606
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Fri, 3 Feb 2012 17:45:59 -0500 (EST)
\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1RtRsG-0001en-1i; Fri, 03 Feb 2012 17:44:56 -0500
\r
37 From: Austin Clements <amdragon@MIT.EDU>
\r
38 To: Pieter Praet <pieter@praet.org>, David Edmondson <dme@dme.org>,
\r
39 Tomi Ollila <tomi.ollila@iki.fi>, David Bremner <david@tethera.net>
\r
40 Subject: Re: [PATCH] test: add tests wrt ignoring user-specified files and
\r
42 In-Reply-To: <1328105573-4626-1-git-send-email-pieter@praet.org>
\r
43 References: <cunr4yonvn4.fsf@hotblack-desiato.hh.sledj.net>
\r
44 <1328105573-4626-1-git-send-email-pieter@praet.org>
\r
45 User-Agent: Notmuch/0.11+118~g220ee2c (http://notmuchmail.org) Emacs/23.3.1
\r
47 Date: Fri, 03 Feb 2012 17:44:55 -0500
\r
48 Message-ID: <874nv7wn88.fsf@awakening.csail.mit.edu>
\r
50 Content-Type: text/plain; charset=us-ascii
\r
51 X-Brightmail-Tracker:
\r
52 H4sIAAAAAAAAA+NgFuphleLIzCtJLcpLzFFi42IR4hRV1l2ZrONvMOetnsWN1m5Gi313tjBZ
\r
53 XL85k9ni9+sbzBZvVs5jdWD12PX8L5PH4a8LWTyerbrF7NGx7zKrx5ZD75kDWKO4bFJSczLL
\r
54 Uov07RK4MlZ/esRW0C1YceTJf6YGxuV8XYycHBICJhIdO3uZIGwxiQv31rN1MXJxCAnsY5T4
\r
55 uL+JHcJZzyjxtvkgI4RzgkniSfMCVghnCaPEl/NTmUH62QQ0JLbtXw5WJSIwgVGi+dscNpAE
\r
56 s4CWxNaNHxhBbGGBMIlXW1vBGjgFHCSeNDawg9hCAvkSX169YQGxRQXiJe7MXQnWyyKgKrHu
\r
57 5yOgOAcHL9Cxhxu5QMK8AoISJ2c+YYEZf+PfS6YJjIKzkKRmIUktYGRaxSibklulm5uYmVOc
\r
58 mqxbnJyYl5dapGukl5tZopeaUrqJERzokrw7GN8dVDrEKMDBqMTDu0FPx1+INbGsuDL3EKMk
\r
59 B5OSKG9QAlCILyk/pTIjsTgjvqg0J7X4EKMEB7OSCK+VOlCONyWxsiq1KB8mJc3BoiTOq6r1
\r
60 zk9IID2xJDU7NbUgtQgmK8PBoSTBywiMaCHBotT01Iq0zJwShDQTByfIcB6g4RIgNbzFBYm5
\r
61 xZnpEPlTjIpS4rwiIAkBkERGaR5cLywRvWIUB3pFmFcOpIoHmMTgul8BDWYCGsxgoQkyuCQR
\r
62 ISXVwBj+X6xq64k9u9R3VEqfqoq9nednL/YjxsdlS/TcP9+qhO7x/pwd6mLyZkV16Yfv/I5C
\r
63 HTbeiyRig/YViInlrwyJV12x64DvVu8zCVl39vy+++zCieK59mbaLY0VrPNr0m9v3bTsIWPH
\r
64 D4fmywGmR1SSfTgqMzo2r7Fu+KAY1Zko9yxaaPa3OCWW4oxEQy3mouJEALfHTTkfAwAA
\r
65 Cc: Notmuch Mail <notmuch@notmuchmail.org>
\r
66 X-BeenThere: notmuch@notmuchmail.org
\r
67 X-Mailman-Version: 2.1.13
\r
69 List-Id: "Use and development of the notmuch mail system."
\r
70 <notmuch.notmuchmail.org>
\r
71 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
72 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
73 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
74 List-Post: <mailto:notmuch@notmuchmail.org>
\r
75 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
76 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
77 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
78 X-List-Received-Date: Fri, 03 Feb 2012 22:46:03 -0000
\r
80 On Wed, 1 Feb 2012 15:12:53 +0100, Pieter Praet <pieter@praet.org> wrote:
\r
81 > Files and directories which are specified in 'new.ignore' in the
\r
82 > config file shouldn't be indexed nor reported by `notmuch new'.
\r
85 > test/new | 23 +++++++++++++++++++++++
\r
86 > 1 files changed, 23 insertions(+), 0 deletions(-)
\r
88 > diff --git a/test/new b/test/new
\r
89 > index 49f390d..740ba05 100755
\r
92 > @@ -153,4 +153,27 @@ rm -rf "${MAIL_DIR}"/two
\r
93 > output=$(NOTMUCH_NEW)
\r
94 > test_expect_equal "$output" "No new mail. Removed 3 messages."
\r
96 > +test_begin_subtest "Skip and report non-mail files"
\r
98 > +mkdir -p "${MAIL_DIR}"/.git && touch "${MAIL_DIR}"/.git/config
\r
99 > +touch "${MAIL_DIR}"/ignored_file
\r
100 > +touch "${MAIL_DIR}"/.ignored_hidden_file
\r
101 > +output=$(NOTMUCH_NEW 2>&1)
\r
102 > +test_expect_equal "$output" \
\r
103 > +"Note: Ignoring non-mail file: ${MAIL_DIR}/.git/config
\r
104 > +Note: Ignoring non-mail file: ${MAIL_DIR}/.ignored_hidden_file
\r
105 > +Note: Ignoring non-mail file: ${MAIL_DIR}/ignored_file
\r
106 > +Added 1 new message to the database."
\r
108 > +test_begin_subtest "Ignore files and directories specified in new.ignore"
\r
109 > +test_subtest_known_broken
\r
110 > +generate_message
\r
111 > +notmuch config set new.ignore .git ignored_file .ignored_hidden_file
\r
112 > +mkdir -p "${MAIL_DIR}"/.git && touch "${MAIL_DIR}"/.git/config
\r
114 This doesn't change .git's mtime, so notmuch new may not scan it (*may*
\r
115 not because it's possible/likely notmuch refused to record the mtime in
\r
116 the above test on account of lack of granularity). Probably you should
\r
117 just touch "${MAIL_DIR}"/.git. Or maybe touch a new file under it.
\r
119 > +touch "${MAIL_DIR}"/ignored_file
\r
120 > +touch "${MAIL_DIR}"/.ignored_hidden_file
\r
122 These aren't necessary since these files already exist and they won't
\r
123 touch the directory's mtime (though the generate_message will).
\r
125 > +output=$(NOTMUCH_NEW 2>&1)
\r
126 > +test_expect_equal "$output" "Added 1 new message to the database."
\r
133 > _______________________________________________
\r
134 > notmuch mailing list
\r
135 > notmuch@notmuchmail.org
\r
136 > http://notmuchmail.org/mailman/listinfo/notmuch
\r