database error
[notmuch-archives.git] / 0c / 9f8b5f1399ad381e9b4ce59c7af2920bd4a322
1 Return-Path: <pieter@praet.org>\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 7C3BC431FAF\r
6         for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:46:17 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \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 76eFsLdjf3pg for <notmuch@notmuchmail.org>;\r
16         Sun, 19 Feb 2012 12:46:16 -0800 (PST)\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
18  [74.125.82.45])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
19  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
20  ADF76431FAE    for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:46:16 -0800\r
21  (PST)\r
22 Received: by wgbdt12 with SMTP id dt12so4006676wgb.2\r
23         for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:46:15 -0800 (PST)\r
24 Received-SPF: pass (google.com: domain of pieter@praet.org designates\r
25         10.180.80.35 as permitted sender) client-ip=10.180.80.35; \r
26 Authentication-Results: mr.google.com;\r
27         spf=pass (google.com: domain of pieter@praet.org\r
28         designates 10.180.80.35 as permitted sender)\r
29         smtp.mail=pieter@praet.org\r
30 Received: from mr.google.com ([10.180.80.35])\r
31         by 10.180.80.35 with SMTP id o3mr12084970wix.5.1329684375468 (num_hops\r
32         = 1); Sun, 19 Feb 2012 12:46:15 -0800 (PST)\r
33 Received: by 10.180.80.35 with SMTP id o3mr10080859wix.5.1329684372425;\r
34         Sun, 19 Feb 2012 12:46:12 -0800 (PST)\r
35 Received: from localhost (104.218-242-81.adsl-dyn.isp.belgacom.be.\r
36         [81.242.218.104])\r
37         by mx.google.com with ESMTPS id dw7sm11421772wib.4.2012.02.19.12.46.11\r
38         (version=TLSv1/SSLv3 cipher=OTHER);\r
39         Sun, 19 Feb 2012 12:46:11 -0800 (PST)\r
40 From: Pieter Praet <pieter@praet.org>\r
41 To: Austin Clements <amdragon@MIT.EDU>, David Edmondson <dme@dme.org>,\r
42         Tomi Ollila <tomi.ollila@iki.fi>, David Bremner <david@tethera.net>\r
43 Subject: Re: [PATCH] test: add tests wrt ignoring user-specified files and\r
44         directories\r
45 In-Reply-To: <874nv7wn88.fsf@awakening.csail.mit.edu>\r
46 References: <cunr4yonvn4.fsf@hotblack-desiato.hh.sledj.net>\r
47         <1328105573-4626-1-git-send-email-pieter@praet.org>\r
48         <874nv7wn88.fsf@awakening.csail.mit.edu>\r
49 User-Agent: Notmuch/0.11.1+210~g6afc43e (http://notmuchmail.org) Emacs/23.3.1\r
50         (x86_64-unknown-linux-gnu)\r
51 Date: Sun, 19 Feb 2012 21:43:56 +0100\r
52 Message-ID: <87linysgdv.fsf@praet.org>\r
53 MIME-Version: 1.0\r
54 Content-Type: text/plain; charset=us-ascii\r
55 X-Gm-Message-State:\r
56  ALoCoQnZbiN+ML5alp2ubiMs57AJpRleKM6aW+6YzauYVpfpgy1TI+Eh+xE8uv+ZBaypQq2gwy+1\r
57 Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
58 X-BeenThere: notmuch@notmuchmail.org\r
59 X-Mailman-Version: 2.1.13\r
60 Precedence: list\r
61 List-Id: "Use and development of the notmuch mail system."\r
62         <notmuch.notmuchmail.org>\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
66 List-Post: <mailto:notmuch@notmuchmail.org>\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
70 X-List-Received-Date: Sun, 19 Feb 2012 20:46:17 -0000\r
71 \r
72 On Fri, 03 Feb 2012 17:44:55 -0500, Austin Clements <amdragon@MIT.EDU> wrote:\r
73 > On Wed,  1 Feb 2012 15:12:53 +0100, Pieter Praet <pieter@praet.org> wrote:\r
74 > > Files and directories which are specified in 'new.ignore' in the\r
75 > > config file shouldn't be indexed nor reported by `notmuch new'.\r
76 > > \r
77 > > ---\r
78 > >  test/new |   23 +++++++++++++++++++++++\r
79 > >  1 files changed, 23 insertions(+), 0 deletions(-)\r
80 > > \r
81 > > diff --git a/test/new b/test/new\r
82 > > index 49f390d..740ba05 100755\r
83 > > --- a/test/new\r
84 > > +++ b/test/new\r
85 > > @@ -153,4 +153,27 @@ rm -rf "${MAIL_DIR}"/two\r
86 > >  output=$(NOTMUCH_NEW)\r
87 > >  test_expect_equal "$output" "No new mail. Removed 3 messages."\r
88 > >  \r
89 > > +test_begin_subtest "Skip and report non-mail files"\r
90 > > +generate_message\r
91 > > +mkdir -p "${MAIL_DIR}"/.git && touch "${MAIL_DIR}"/.git/config\r
92 > > +touch "${MAIL_DIR}"/ignored_file\r
93 > > +touch "${MAIL_DIR}"/.ignored_hidden_file\r
94 > > +output=$(NOTMUCH_NEW 2>&1)\r
95 > > +test_expect_equal "$output" \\r
96 > > +"Note: Ignoring non-mail file: ${MAIL_DIR}/.git/config\r
97 > > +Note: Ignoring non-mail file: ${MAIL_DIR}/.ignored_hidden_file\r
98 > > +Note: Ignoring non-mail file: ${MAIL_DIR}/ignored_file\r
99 > > +Added 1 new message to the database."\r
100 > > +\r
101 > > +test_begin_subtest "Ignore files and directories specified in new.ignore"\r
102 > > +test_subtest_known_broken\r
103 > > +generate_message\r
104 > > +notmuch config set new.ignore .git ignored_file .ignored_hidden_file\r
105 > > +mkdir -p "${MAIL_DIR}"/.git && touch "${MAIL_DIR}"/.git/config\r
106\r
107 > This doesn't change .git's mtime, so notmuch new may not scan it (*may*\r
108 > not because it's possible/likely notmuch refused to record the mtime in\r
109 > the above test on account of lack of granularity).  Probably you should\r
110 > just touch "${MAIL_DIR}"/.git.  Or maybe touch a new file under it.\r
111 >\r
112 \r
113 Good point.\r
114 \r
115 \r
116 > > +touch "${MAIL_DIR}"/ignored_file\r
117 > > +touch "${MAIL_DIR}"/.ignored_hidden_file\r
118\r
119 > These aren't necessary since these files already exist and they won't\r
120 > touch the directory's mtime (though the generate_message will).\r
121 >\r
122 \r
123 Those are/were intended to keep the test self-contained (i.e.\r
124 independent of the previous one).  Probably should've added a\r
125 comment about that.\r
126 \r
127 \r
128 > > +output=$(NOTMUCH_NEW 2>&1)\r
129 > > +test_expect_equal "$output" "Added 1 new message to the database."\r
130 > > +\r
131 > > +\r
132 > >  test_done\r
133 > > -- \r
134 > > 1.7.8.1\r
135 > > \r
136 > > _______________________________________________\r
137 > > notmuch mailing list\r
138 > > notmuch@notmuchmail.org\r
139 > > http://notmuchmail.org/mailman/listinfo/notmuch\r
140 > > \r
141 \r
142 Thanks for reviewing!\r
143 \r
144 Peace\r
145 \r
146 \r
147 -- \r
148 Pieter\r