Re: [PATCH 2/6] lib: Add per-message last modification tracking
authorDavid Bremner <david@tethera.net>
Fri, 7 Aug 2015 20:38:49 +0000 (22:38 +0200)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:17 +0000 (14:49 -0700)
c3/39623974366d0195f883a5bea611c405408b4c [new file with mode: 0644]

diff --git a/c3/39623974366d0195f883a5bea611c405408b4c b/c3/39623974366d0195f883a5bea611c405408b4c
new file mode 100644 (file)
index 0000000..301f886
--- /dev/null
@@ -0,0 +1,85 @@
+Return-Path: <david@tethera.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 44EB06DE1635\r
+ for <notmuch@notmuchmail.org>; Fri,  7 Aug 2015 13:41:30 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.137\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.137 tagged_above=-999 required=5 tests=[AWL=0.137]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id g2--L4RalH46 for <notmuch@notmuchmail.org>;\r
+ Fri,  7 Aug 2015 13:41:28 -0700 (PDT)\r
+Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 9E29F6DE1648\r
+ for <notmuch@notmuchmail.org>; Fri,  7 Aug 2015 13:41:27 -0700 (PDT)\r
+Received: from remotemail by gitolite.debian.net with local (Exim 4.80)\r
+ (envelope-from <david@tethera.net>)\r
+ id 1ZNoPw-0007LI-81; Fri, 07 Aug 2015 20:39:04 +0000\r
+Received: (nullmailer pid 2725 invoked by uid 1000); Fri, 07 Aug 2015\r
+ 20:38:49 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Daniel Schoepe <daniel@schoepe.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 2/6] lib: Add per-message last modification tracking\r
+In-Reply-To: <878u9nk0st.fsf@schoepe.localhost>\r
+References: <1432936375-astroid-4-0i1n6yczs2-1520@strange>\r
+ <1433525318-23756-1-git-send-email-david@tethera.net>\r
+ <1433525318-23756-3-git-send-email-david@tethera.net>\r
+ <878u9nk0st.fsf@schoepe.localhost>\r
+User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Fri, 07 Aug 2015 22:38:49 +0200\r
+Message-ID: <87r3ne96li.fsf@maritornes.cs.unb.ca>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+Cc: Austin Clements <amdragon@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 07 Aug 2015 20:41:30 -0000\r
+\r
+Daniel Schoepe <daniel@schoepe.org> writes:\r
+\r
+\r
+> On Fri, 05 Jun 2015 19:28 +0200, David Bremner wrote:\r
+>> +       /* Prior to NOTMUCH_FEATURE_LAST_MOD, messages did not\r
+>> +        * track modification revisions.  Give all messages a\r
+>> +        * revision of 1.\r
+>> +        */\r
+>> +       if (new_features & NOTMUCH_FEATURE_LAST_MOD)\r
+>> +           _notmuch_message_upgrade_last_mod (message);\r
+>> [..]\r
+>> +/* Upgrade a message to support NOTMUCH_FEATURE_LAST_MOD.  The caller\r
+>> + * must call _notmuch_message_sync. */\r
+>> +void\r
+>> +_notmuch_message_upgrade_last_mod (notmuch_message_t *message)\r
+>> +{\r
+>> +    /* _notmuch_message_sync will update the last modification\r
+>> +     * revision; we just have to ask it to. */\r
+>> +    message->modified = TRUE;\r
+>> +}\r
+>> +\r
+>\r
+> The comment in the first part says that message without LAST_MOD get a\r
+> revision of 1, but as far as I can tell, _notmuch_message_sync will\r
+> actually put the next revision number on the message. If this is what's\r
+> happening, either the comment or the behavior should be changed,\r
+> depending on what's intended.\r
+\r
+I think the behaviour is OK, but you're correct the comment is\r
+wrong. I'll see if Austin has any comment on that. I guess it would be\r
+harmless to initialize upgraded messages to some low revision number,\r
+but I don't see the benefit.\r