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 arlo.cworth.org (Postfix) with ESMTP id 7A4686DE0924
\r
6 for <notmuch@notmuchmail.org>; Sat, 8 Aug 2015 06:27:19 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=-2.126 tagged_above=-999 required=5
\r
12 tests=[HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3,
\r
13 RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,
\r
14 RP_MATCHES_RCVD=-0.55, SPF_PASS=-0.001, URIBL_SBL=0.644,
\r
15 URIBL_SBL_A=0.1] autolearn=disabled
\r
16 Received: from arlo.cworth.org ([127.0.0.1])
\r
17 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
18 with ESMTP id ugghzyetOPjk for <notmuch@notmuchmail.org>;
\r
19 Sat, 8 Aug 2015 06:27:17 -0700 (PDT)
\r
20 X-Greylist: delayed 1302 seconds by postgrey-1.35 at arlo;
\r
21 Sat, 08 Aug 2015 06:27:17 PDT
\r
22 Received: from outgoing.csail.mit.edu (outgoing.csail.mit.edu [128.30.2.149])
\r
23 by arlo.cworth.org (Postfix) with ESMTP id 2742C6DE02D2
\r
24 for <notmuch@notmuchmail.org>; Sat, 8 Aug 2015 06:27:17 -0700 (PDT)
\r
25 Received: from mail-qk0-f174.google.com ([209.85.220.174])
\r
26 by outgoing.csail.mit.edu with esmtpsa (TLS1.0:RSA_ARCFOUR_SHA1:16)
\r
27 (Exim 4.72) (envelope-from <aclements@csail.mit.edu>)
\r
29 for notmuch@notmuchmail.org; Sat, 08 Aug 2015 09:05:33 -0400
\r
30 Received: by qkdv3 with SMTP id v3so45472883qkd.3
\r
31 for <notmuch@notmuchmail.org>; Sat, 08 Aug 2015 06:05:32 -0700 (PDT)
\r
33 X-Received: by 10.55.26.93 with SMTP id a90mr23194257qka.63.1439039132115;
\r
34 Sat, 08 Aug 2015 06:05:32 -0700 (PDT)
\r
35 Received: by 10.96.197.42 with HTTP; Sat, 8 Aug 2015 06:05:31 -0700 (PDT)
\r
36 Received: by 10.96.197.42 with HTTP; Sat, 8 Aug 2015 06:05:31 -0700 (PDT)
\r
37 In-Reply-To: <87r3ne96li.fsf@maritornes.cs.unb.ca>
\r
38 References: <1432936375-astroid-4-0i1n6yczs2-1520@strange>
\r
39 <1433525318-23756-1-git-send-email-david@tethera.net>
\r
40 <1433525318-23756-3-git-send-email-david@tethera.net>
\r
41 <878u9nk0st.fsf@schoepe.localhost>
\r
42 <87r3ne96li.fsf@maritornes.cs.unb.ca>
\r
43 Date: Sat, 8 Aug 2015 09:05:31 -0400
\r
45 <CAH-f9WszEhzuSie05+R88kk1kFvHgktCcf3JYbk1+MPEzU6Mjw@mail.gmail.com>
\r
46 Subject: Re: [PATCH 2/6] lib: Add per-message last modification tracking
\r
47 From: Austin Clements <aclements@csail.mit.edu>
\r
48 To: David Bremner <david@tethera.net>
\r
49 Content-Type: multipart/alternative; boundary=001a1146cb2a49acdd051ccc688b
\r
50 Cc: notmuch <notmuch@notmuchmail.org>
\r
51 X-BeenThere: notmuch@notmuchmail.org
\r
52 X-Mailman-Version: 2.1.18
\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: Sat, 08 Aug 2015 13:27:19 -0000
\r
65 --001a1146cb2a49acdd051ccc688b
\r
66 Content-Type: text/plain; charset=UTF-8
\r
68 Hi David. I haven't had a chance to look back at the original code, but
\r
69 your follow-up expanded comment agrees with how I remember this code
\r
71 On Aug 7, 2015 4:41 PM, "David Bremner" <david@tethera.net> wrote:
\r
73 > Daniel Schoepe <daniel@schoepe.org> writes:
\r
76 > > On Fri, 05 Jun 2015 19:28 +0200, David Bremner wrote:
\r
77 > >> + /* Prior to NOTMUCH_FEATURE_LAST_MOD, messages did not
\r
78 > >> + * track modification revisions. Give all messages a
\r
79 > >> + * revision of 1.
\r
81 > >> + if (new_features & NOTMUCH_FEATURE_LAST_MOD)
\r
82 > >> + _notmuch_message_upgrade_last_mod (message);
\r
84 > >> +/* Upgrade a message to support NOTMUCH_FEATURE_LAST_MOD. The caller
\r
85 > >> + * must call _notmuch_message_sync. */
\r
87 > >> +_notmuch_message_upgrade_last_mod (notmuch_message_t *message)
\r
89 > >> + /* _notmuch_message_sync will update the last modification
\r
90 > >> + * revision; we just have to ask it to. */
\r
91 > >> + message->modified = TRUE;
\r
95 > > The comment in the first part says that message without LAST_MOD get a
\r
96 > > revision of 1, but as far as I can tell, _notmuch_message_sync will
\r
97 > > actually put the next revision number on the message. If this is what's
\r
98 > > happening, either the comment or the behavior should be changed,
\r
99 > > depending on what's intended.
\r
101 > I think the behaviour is OK, but you're correct the comment is
\r
102 > wrong. I'll see if Austin has any comment on that. I guess it would be
\r
103 > harmless to initialize upgraded messages to some low revision number,
\r
104 > but I don't see the benefit.
\r
107 --001a1146cb2a49acdd051ccc688b
\r
108 Content-Type: text/html; charset=UTF-8
\r
109 Content-Transfer-Encoding: quoted-printable
\r
111 <p dir=3D"ltr">Hi David. I haven't had a chance to look back at the ori=
\r
112 ginal code, but your follow-up expanded comment agrees with how I remember =
\r
113 this code working.</p>
\r
114 <div class=3D"gmail_quote">On Aug 7, 2015 4:41 PM, "David Bremner"=
\r
115 ; <<a href=3D"mailto:david@tethera.net">david@tethera.net</a>> wrote:=
\r
116 <br type=3D"attribution"><blockquote class=3D"gmail_quote" style=3D"margin:=
\r
117 0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Daniel Schoepe <=
\r
118 <a href=3D"mailto:daniel@schoepe.org">daniel@schoepe.org</a>> writes:<br=
\r
122 > On Fri, 05 Jun 2015 19:28 +0200, David Bremner wrote:<br>
\r
123 >> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Prior to NOTMUCH_FEATURE_LAST_MOD,=
\r
124 messages did not<br>
\r
125 >> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* track modification revisions.=
\r
126 =C2=A0 Give all messages a<br>
\r
127 >> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* revision of 1.<br>
\r
128 >> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*/<br>
\r
129 >> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (new_features & NOTMUCH_FEATUR=
\r
131 >> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 _notmuch_message_upgrad=
\r
132 e_last_mod (message);<br>
\r
134 >> +/* Upgrade a message to support NOTMUCH_FEATURE_LAST_MOD.=C2=A0 T=
\r
136 >> + * must call _notmuch_message_sync. */<br>
\r
138 >> +_notmuch_message_upgrade_last_mod (notmuch_message_t *message)<br=
\r
141 >> +=C2=A0 =C2=A0 /* _notmuch_message_sync will update the last modif=
\r
143 >> +=C2=A0 =C2=A0 =C2=A0* revision; we just have to ask it to. */<br>
\r
144 >> +=C2=A0 =C2=A0 message->modified =3D TRUE;<br>
\r
148 > The comment in the first part says that message without LAST_MOD get a=
\r
150 > revision of 1, but as far as I can tell, _notmuch_message_sync will<br=
\r
152 > actually put the next revision number on the message. If this is what&=
\r
154 > happening, either the comment or the behavior should be changed,<br>
\r
155 > depending on what's intended.<br>
\r
157 I think the behaviour is OK, but you're correct the comment is<br>
\r
158 wrong. I'll see if Austin has any comment on that. I guess it would be<=
\r
160 harmless to initialize upgraded messages to some low revision number,<br>
\r
161 but I don't see the benefit.<br>
\r
162 </blockquote></div>
\r
164 --001a1146cb2a49acdd051ccc688b--
\r