Re: [PATCH] test: Make gen-threads work with python3
[notmuch-archives.git] / 7b / 2236918ccc325120915462d825cb0ea200a9aa
1 Return-Path: <aclements@csail.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 AF4D1431FDF\r
6         for <notmuch@notmuchmail.org>; Thu, 23 Oct 2014 05:30:55 -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: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] 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 fhzgoL60PYuP for <notmuch@notmuchmail.org>;\r
16         Thu, 23 Oct 2014 05:30:48 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-7.mit.edu (dmz-mailsec-scanner-7.mit.edu\r
18         [18.7.68.36])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 13E9D431FD4\r
22         for <notmuch@notmuchmail.org>; Thu, 23 Oct 2014 05:30:48 -0700 (PDT)\r
23 X-AuditID: 12074424-f79346d000004923-fa-5448f4f75e6d\r
24 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
25         (using TLS with cipher AES256-SHA (256/256 bits))\r
26         (Client did not present a certificate)\r
27         by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
28         id A6.1C.18723.7F4F8445; Thu, 23 Oct 2014 08:30:47 -0400 (EDT)\r
29 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
30         by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id s9NCUk9Q001784; \r
31         Thu, 23 Oct 2014 08:30:47 -0400\r
32 Received: from drake.dyndns.org\r
33         (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
34         [216.15.114.40]) (authenticated bits=0)\r
35         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
36         by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s9NCUh6H008924\r
37         (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT);\r
38         Thu, 23 Oct 2014 08:30:46 -0400\r
39 Received: from amthrax by drake.dyndns.org with local (Exim 4.84)\r
40         (envelope-from <aclements@csail.mit.edu>)\r
41         id 1XhHXP-0007bZ-3z; Thu, 23 Oct 2014 08:30:43 -0400\r
42 From: Austin Clements <aclements@csail.mit.edu>\r
43 To: notmuch@notmuchmail.org\r
44 Subject: [PATCH v3 0/9] Add ghost messages and fix thread linking\r
45 Date: Thu, 23 Oct 2014 08:30:32 -0400\r
46 Message-Id: <1414067441-29054-1-git-send-email-aclements@csail.mit.edu>\r
47 X-Mailer: git-send-email 2.1.0\r
48 X-Brightmail-Tracker:\r
49  H4sIAAAAAAAAA+NgFlrKIsWRmVeSWpSXmKPExsUixCmqrfv9i0eIwbkN0har5/JYXL85k9mB\r
50         yWPnrLvsHs9W3WIOYIrisklJzcksSy3St0vgymi7s52p4I9QxZEj11gaGBfxdzFyckgImEjM\r
51         Ov6GCcIWk7hwbz1bFyMXh5DAbCaJ6S97mSGcjYwSb9+cZYVw7jBJLL40mx3CWcIosfvsSkaQ\r
52         fjYBfYkVayexgtgiAtISO+/OBrOZBWQlfpz/A2YLCzhK7NuyBWwfi4CqxPIHHWwgNq+Au0Tr\r
53         3WWsEHfISWzY/Z9xAiPvAkaGVYyyKblVurmJmTnFqcm6xcmJeXmpRbrmermZJXqpKaWbGEGh\r
54         we6isoOx+ZDSIUYBDkYlHt6KZI8QIdbEsuLK3EOMkhxMSqK8MQ+AQnxJ+SmVGYnFGfFFpTmp\r
55         xYcYJTiYlUR44y8A5XhTEiurUovyYVLSHCxK4rybfvCFCAmkJ5akZqemFqQWwWRlODiUJHgZ\r
56         gTEgJFiUmp5akZaZU4KQZuLgBBnOAzT81meQ4cUFibnFmekQ+VOMilLivMkgCQGQREZpHlwv\r
57         LHZfMYoDvSLMuwGkigcY93Ddr4AGM4FcvQFscEkiQkqqgTG+o0Uq/HfegmfuRecdopf9C7Xe\r
58         seKludbtB3szb7gt/Htph9jNz05bJKqf3yzSNi9OKuZeaXH1g5h2pqxJUtCyCw9uBiVqMoSq\r
59         qmxxvPVl9ecjU+fermgO7Op6tadgp5/AhZ+bMnVrjWWi9ZQ8Pn5vnZtiG2OYnb/stLLu8YzS\r
60         PuWAgJfJ5kosxRmJhlrMRcWJAANIyJC4AgAA\r
61 X-BeenThere: notmuch@notmuchmail.org\r
62 X-Mailman-Version: 2.1.13\r
63 Precedence: list\r
64 List-Id: "Use and development of the notmuch mail system."\r
65         <notmuch.notmuchmail.org>\r
66 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
67         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
68 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
69 List-Post: <mailto:notmuch@notmuchmail.org>\r
70 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
71 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
72         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
73 X-List-Received-Date: Thu, 23 Oct 2014 12:30:55 -0000\r
74 \r
75 This is v3 of\r
76 id:1412637438-4821-1-git-send-email-aclements@csail.mit.edu.\r
77 This fixes some comments, as suggested by Mark.  There are no\r
78 code changes relative to v2.  The diff from v2 is below.\r
79 \r
80 diff --git a/lib/database.cc b/lib/database.cc\r
81 index 6e51a72..3601f9d 100644\r
82 --- a/lib/database.cc\r
83 +++ b/lib/database.cc\r
84 @@ -2121,10 +2121,13 @@ _consume_metadata_thread_id (void *ctx, notmuch_database_t *notmuch,\r
85  /* Given a blank or ghost 'message' and its corresponding\r
86   * 'message_file' link it to existing threads in the database.\r
87   *\r
88 - * The first check is in the metadata of the database to see if we\r
89 - * have pre-allocated a thread_id in advance for this message, (which\r
90 - * would have happened if a message was previously added that\r
91 - * referenced this one).\r
92 + * First, if is_ghost, this retrieves the thread ID already stored in\r
93 + * the message (which will be the case if a message was previously\r
94 + * added that referenced this one).  If the message is blank\r
95 + * (!is_ghost), it doesn't have a thread ID yet (we'll generate one\r
96 + * later in this function).  If the database does not support ghost\r
97 + * messages, this checks for a thread ID stored in database metadata\r
98 + * for this message ID.\r
99   *\r
100   * Second, we look at 'message_file' and its link-relevant headers\r
101   * (References and In-Reply-To) for message IDs.\r
102 @@ -2132,12 +2135,12 @@ _consume_metadata_thread_id (void *ctx, notmuch_database_t *notmuch,\r
103   * Finally, we look in the database for existing message that\r
104   * reference 'message'.\r
105   *\r
106 - * In all cases, we assign to the current message the first thread_id\r
107 - * found (through either parent or child). We will also merge any\r
108 - * existing, distinct threads where this message belongs to both,\r
109 - * (which is not uncommon when messages are processed out of order).\r
110 + * In all cases, we assign to the current message the first thread ID\r
111 + * found. We will also merge any existing, distinct threads where this\r
112 + * message belongs to both, (which is not uncommon when messages are\r
113 + * processed out of order).\r
114   *\r
115 - * Finally, if no thread ID has been found through parent or child, we\r
116 + * Finally, if no thread ID has been found through referenced messages, we\r
117   * call _notmuch_message_generate_thread_id to generate a new thread\r
118   * ID. This should only happen for new, top-level messages, (no\r
119   * References or In-Reply-To header in this message, and no previously\r
120 \r