From: Daniel Schoepe Date: Fri, 7 Aug 2015 07:36:18 +0000 (+0200) Subject: Re: [PATCH 2/6] lib: Add per-message last modification tracking X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ce38bbf5e44fd14a042dea5b8d27bae9abd75ae6;p=notmuch-archives.git Re: [PATCH 2/6] lib: Add per-message last modification tracking --- diff --git a/d0/eb35281a41475ccdf46bd7997eff8893872a55 b/d0/eb35281a41475ccdf46bd7997eff8893872a55 new file mode 100644 index 000000000..0a08e7b11 --- /dev/null +++ b/d0/eb35281a41475ccdf46bd7997eff8893872a55 @@ -0,0 +1,107 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 946D26DE13F4 + for ; Fri, 7 Aug 2015 00:36:28 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.207 +X-Spam-Level: +X-Spam-Status: No, score=-0.207 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, + RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_WEB=0.614, SPF_PASS=-0.001] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id oBBjEt9tRNqq for ; + Fri, 7 Aug 2015 00:36:26 -0700 (PDT) +Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com + [209.85.212.172]) + by arlo.cworth.org (Postfix) with ESMTPS id CABB16DE13E7 + for ; Fri, 7 Aug 2015 00:36:25 -0700 (PDT) +Received: by wibhh20 with SMTP id hh20so54251705wib.0 + for ; Fri, 07 Aug 2015 00:36:24 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schoepe.org; s=google; + h=from:to:subject:in-reply-to:references:user-agent:date:message-id + :mime-version:content-type; + bh=Fd+divPZykzAv+3krtzugtjX+s+SYsjERjJteU15k/w=; + b=e9Uvpm4TmXeRH7zy+U432IOMP1DLFiR6nJWIW2zhODEfAQ7nVG+8yWmYgnq9vnEVLk + yWh0HM9fOEALK1bswkdZBU8R4f7tABVULt4/LChWJnk0VsH7s3VC4X3Lz9jXWyrxVIYt + pFSe3jEraotZx5GLhO75NyolBXOc16tutNMTY= +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:subject:in-reply-to:references + :user-agent:date:message-id:mime-version:content-type; + bh=Fd+divPZykzAv+3krtzugtjX+s+SYsjERjJteU15k/w=; + b=bwy5UQI+djX7l2H64Z0VbQVHaTFown1nXr+P7cPK5bW5Pe4RxQdNfggzQvHDdBKaiP + 7iVPus7SfwAkq8WYQDDttFGQXpM51tJhtykzUx770UwqxMM9140dpwcdgFloCKqIhwRQ + q28Iak2W5+aEcIXeh5dhWJZCVbOX3Vdhms2zxnhss6Wnsp9L8rDRBEC6S1v1MSzOAa+0 + 10Z0S04VMev4Wd07mo71aPzPGhIm14gkVhiZToDYl2w9brKc0dynlosO72dS/Lzw4c9k + ZJkG62RHtm4H/1D6Lu2KBh/a9SEp4/b1aHDI2ZCWXy/QJioKIGfXBu2TQrMsv7h5q1Bk + DA8w== +X-Gm-Message-State: + ALoCoQmUWrzV6ilrONfdwPd+N/Wj1MKc8T5BwhkSMyosFZc6jVnIjWbTlCXaLmLSkn330caS7/E5 +X-Received: by 10.180.19.65 with SMTP id c1mr3462238wie.15.1438932983582; + Fri, 07 Aug 2015 00:36:23 -0700 (PDT) +Received: from localhost (ip-80-226-24-9.vodafone-net.de. [80.226.24.9]) + by smtp.gmail.com with ESMTPSA id o9sm13269327wja.29.2015.08.07.00.36.20 + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Fri, 07 Aug 2015 00:36:22 -0700 (PDT) +From: Daniel Schoepe +To: David Bremner , notmuch@notmuchmail.org +Subject: Re: [PATCH 2/6] lib: Add per-message last modification tracking +In-Reply-To: <1433525318-23756-3-git-send-email-david@tethera.net> +References: <1432936375-astroid-4-0i1n6yczs2-1520@strange> + <1433525318-23756-1-git-send-email-david@tethera.net> + <1433525318-23756-3-git-send-email-david@tethera.net> +User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-unknown-linux-gnu) +Date: Fri, 07 Aug 2015 09:36:18 +0200 +Message-ID: <878u9nk0st.fsf@schoepe.localhost> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 07 Aug 2015 07:36:28 -0000 + +Hi, + +On Fri, 05 Jun 2015 19:28 +0200, David Bremner wrote: +> + /* Prior to NOTMUCH_FEATURE_LAST_MOD, messages did not +> + * track modification revisions. Give all messages a +> + * revision of 1. +> + */ +> + if (new_features & NOTMUCH_FEATURE_LAST_MOD) +> + _notmuch_message_upgrade_last_mod (message); +> [..] +> +/* Upgrade a message to support NOTMUCH_FEATURE_LAST_MOD. The caller +> + * must call _notmuch_message_sync. */ +> +void +> +_notmuch_message_upgrade_last_mod (notmuch_message_t *message) +> +{ +> + /* _notmuch_message_sync will update the last modification +> + * revision; we just have to ask it to. */ +> + message->modified = TRUE; +> +} +> + + +The comment in the first part says that message without LAST_MOD get a +revision of 1, but as far as I can tell, _notmuch_message_sync will +actually put the next revision number on the message. If this is what's +happening, either the comment or the behavior should be changed, +depending on what's intended. + +Best regards, +Daniel