Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / d2 / d42054a23d2a31adf1b245dcc58719cbf56ce2
1 Return-Path: <ethan.glasser.camp@gmail.com>\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 121AD431FB6\r
6         for <notmuch@notmuchmail.org>; Mon, 25 Jun 2012 13:53:23 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 1.061\r
10 X-Spam-Level: *\r
11 X-Spam-Status: No, score=1.061 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_BL_SPAMCOP_NET=1.246,\r
14         RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_SORBS_WEB=0.614] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id C2rviQ85wJK1 for <notmuch@notmuchmail.org>;\r
18         Mon, 25 Jun 2012 13:53:22 -0700 (PDT)\r
19 Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com\r
20         [209.85.212.179]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id 27178431FAF\r
23         for <notmuch@notmuchmail.org>; Mon, 25 Jun 2012 13:53:22 -0700 (PDT)\r
24 Received: by wibhq4 with SMTP id hq4so1725340wib.2\r
25         for <notmuch@notmuchmail.org>; Mon, 25 Jun 2012 13:53:21 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
28         bh=a6vjekbSfsjNdw++Q8neMKznNl7AUCOjhsmZTB7+e84=;\r
29         b=tvA/kOUU3XwHBLfX6yo6Nly5+g6/K6WZ0i/00ZNm0Rp6RitlTc7WPZ46b0osfl9PQW\r
30         wwXuM4z3crA4KQZmp4e+aXrPUns9eeAYZbgYouFv1dPalXN7bDJJUV7gH/w9TNNk4y0C\r
31         IDoTOZdzwYLrVHr0dxlJF/LMrvDVn4MMw7zhTJSkOwOS58UM90cys9Dh3VtG+6hfEblY\r
32         PAUkFYBIrpFLOtQn9GftZ5cjZ3UUTa6hsfv/Y8/RWiUDXdKjqQUipQsz7U7XkwaOX01A\r
33         SXLYA9z7L8xg4Vj0+Darj25sikxBV0tpKOu/qqh5YuAGC/1q+dWnB4oy+NaTZzr8DzQq\r
34         nO9Q==\r
35 Received: by 10.180.98.69 with SMTP id eg5mr27657338wib.3.1340657600933;\r
36         Mon, 25 Jun 2012 13:53:20 -0700 (PDT)\r
37 Received: from localhost ([195.24.209.21])\r
38         by mx.google.com with ESMTPS id z8sm91329wiy.1.2012.06.25.13.53.16\r
39         (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Mon, 25 Jun 2012 13:53:20 -0700 (PDT)\r
41 From: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [RFC PATCH 09/14] Fix atomicity test to work without relocatable\r
44         mailstores\r
45 Date: Mon, 25 Jun 2012 16:51:52 -0400\r
46 Message-Id: <1340657517-6539-5-git-send-email-ethan@betacantrips.com>\r
47 X-Mailer: git-send-email 1.7.9.5\r
48 In-Reply-To: <1340657517-6539-1-git-send-email-ethan@betacantrips.com>\r
49 References: <1340657517-6539-1-git-send-email-ethan@betacantrips.com>\r
50 X-Mailman-Approved-At: Tue, 26 Jun 2012 03:51:54 -0700\r
51 X-BeenThere: notmuch@notmuchmail.org\r
52 X-Mailman-Version: 2.1.13\r
53 Precedence: list\r
54 List-Id: "Use and development of the notmuch mail system."\r
55         <notmuch.notmuchmail.org>\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
59 List-Post: <mailto:notmuch@notmuchmail.org>\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
63 X-List-Received-Date: Mon, 25 Jun 2012 20:53:23 -0000\r
64 \r
65 Instead of assuming that the mailstore doesn't store its absolute\r
66 filenames, we use a symlink that can change back and forth. As long as\r
67 filenames contain this symlink, they can work in either the real\r
68 database, or the current snapshot.\r
69 \r
70 Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>\r
71 ---\r
72  test/atomicity     |   10 +++++-----\r
73  test/atomicity.gdb |   11 ++++++++---\r
74  2 files changed, 13 insertions(+), 8 deletions(-)\r
75 \r
76 diff --git a/test/atomicity b/test/atomicity\r
77 index 6df0a00..7b62ec7 100755\r
78 --- a/test/atomicity\r
79 +++ b/test/atomicity\r
80 @@ -49,13 +49,13 @@ if test_require_external_prereq gdb; then\r
81      rm $MAIL_DIR/.remove-dir/remove-directory-duplicate:2,\r
82      rmdir $MAIL_DIR/.remove-dir\r
83  \r
84 -    # Prepare a snapshot of the updated maildir.  The gdb script will\r
85 -    # update the database in this snapshot as it goes.\r
86 +    # Copy the mail database. We will run on this database concurrently.\r
87      cp -ra $MAIL_DIR $MAIL_DIR.snap\r
88 -    cp ${NOTMUCH_CONFIG} ${NOTMUCH_CONFIG}.snap\r
89 -    NOTMUCH_CONFIG=${NOTMUCH_CONFIG}.snap notmuch config set database.path $MAIL_DIR.snap\r
90 -\r
91  \r
92 +    # Use a symlink instead of the real path. This way, we can change the symlink,\r
93 +    # without filenames having to change.\r
94 +    mv $MAIL_DIR $MAIL_DIR.real\r
95 +    ln -s $MAIL_DIR.real $MAIL_DIR\r
96  \r
97      # Execute notmuch new and, at every call to rename, snapshot the\r
98      # database, run notmuch new again on the snapshot, and capture the\r
99 diff --git a/test/atomicity.gdb b/test/atomicity.gdb\r
100 index fd67525..3d4e210 100644\r
101 --- a/test/atomicity.gdb\r
102 +++ b/test/atomicity.gdb\r
103 @@ -38,12 +38,17 @@ shell mv backtrace backtrace.`cat outcount`\r
104  # Snapshot the database\r
105  shell rm -r $MAIL_DIR.snap/.notmuch\r
106  shell cp -r $MAIL_DIR/.notmuch $MAIL_DIR.snap/.notmuch\r
107 +shell rm $MAIL_DIR\r
108 +shell ln -s $MAIL_DIR.snap $MAIL_DIR\r
109  # Restore the mtime of $MAIL_DIR.snap, which we just changed\r
110 -shell touch -r $MAIL_DIR $MAIL_DIR.snap\r
111 +shell touch -r $MAIL_DIR.real $MAIL_DIR.snap\r
112  # Run notmuch new to completion on the snapshot\r
113 -shell NOTMUCH_CONFIG=${NOTMUCH_CONFIG}.snap XAPIAN_FLUSH_THRESHOLD=1000 notmuch new > /dev/null\r
114 -shell NOTMUCH_CONFIG=${NOTMUCH_CONFIG}.snap notmuch search '*' > search.`cat outcount` 2>&1\r
115 +shell NOTMUCH_CONFIG=${NOTMUCH_CONFIG} XAPIAN_FLUSH_THRESHOLD=1000 notmuch new > /dev/null\r
116 +shell NOTMUCH_CONFIG=${NOTMUCH_CONFIG} notmuch search '*' > search.`cat outcount` 2>&1\r
117  shell echo $(expr $(cat outcount) + 1) > outcount\r
118 +# restore symlink to correct database before resuming\r
119 +shell rm $MAIL_DIR\r
120 +shell ln -s $MAIL_DIR.real $MAIL_DIR\r
121  cont\r
122  end\r
123  \r
124 -- \r
125 1.7.9.5\r
126 \r