unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Austin Clements <aclements@csail.mit.edu>
To: David Bremner <david@tethera.net>
Cc: notmuch <notmuch@notmuchmail.org>
Subject: Re: [PATCH 2/6] lib: Add per-message last modification tracking
Date: Sat, 8 Aug 2015 09:05:31 -0400	[thread overview]
Message-ID: <CAH-f9WszEhzuSie05+R88kk1kFvHgktCcf3JYbk1+MPEzU6Mjw@mail.gmail.com> (raw)
In-Reply-To: <87r3ne96li.fsf@maritornes.cs.unb.ca>

[-- Attachment #1: Type: text/plain, Size: 1602 bytes --]

Hi David. I haven't had a chance to look back at the original code, but
your follow-up expanded comment agrees with how I remember this code
working.
On Aug 7, 2015 4:41 PM, "David Bremner" <david@tethera.net> wrote:

> Daniel Schoepe <daniel@schoepe.org> writes:
>
>
> > 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.
>
> I think the behaviour is OK, but you're correct the comment is
> wrong. I'll see if Austin has any comment on that. I guess it would be
> harmless to initialize upgraded messages to some low revision number,
> but I don't see the benefit.
>

[-- Attachment #2: Type: text/html, Size: 2179 bytes --]

  reply	other threads:[~2015-08-08 13:27 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-05 22:59 Revision tracking, round 2 David Bremner
2015-04-05 22:59 ` [WIP2 01/12] lib: Only sync modified message documents David Bremner
2015-04-05 22:59 ` [WIP2 02/12] lib: Add per-message last modification tracking David Bremner
2015-04-05 22:59 ` [WIP2 03/12] lib: API to retrieve database revision and UUID David Bremner
2015-04-05 22:59 ` [WIP2 04/12] cli: add type introspection to sprinter type David Bremner
2015-04-05 22:59 ` [WIP2 05/12] cli: add two sprinter utility functions David Bremner
2015-04-05 22:59 ` [WIP2 06/12] cli/show: add extra element to structured output for metadata David Bremner
2015-04-05 22:59 ` [WIP2 07/12] lib: Add "lastmod:" queries for filtering by last modification David Bremner
2015-04-05 22:59 ` [WIP2 08/12] cli/show: add lastmod to structured output David Bremner
2015-04-05 22:59 ` [WIP2 09/12] cli/search: add metadata element " David Bremner
2015-04-05 22:59 ` [WIP2 10/12] emacs: convert notmuch-search to format-version 3 David Bremner
2015-04-05 22:59 ` [WIP2 11/12] emacs: convert notmuch-tree " David Bremner
2015-04-05 22:59 ` [WIP2 12/12] cli: add global option "--db-revision" David Bremner
2015-05-29 21:56 ` Revision tracking, round 2 Gaute Hope
2015-06-05 17:28   ` revision tracking patches, round 1 David Bremner
2015-06-05 17:28     ` [PATCH 1/6] lib: Only sync modified message documents David Bremner
2015-08-04  7:07       ` David Bremner
2015-06-05 17:28     ` [PATCH 2/6] lib: Add per-message last modification tracking David Bremner
2015-08-07  7:36       ` Daniel Schoepe
2015-08-07 20:38         ` David Bremner
2015-08-08 13:05           ` Austin Clements [this message]
2015-08-08  5:33         ` [PATCH] fixup! " David Bremner
2015-06-05 17:28     ` [PATCH 3/6] lib: API to retrieve database revision and UUID David Bremner
2015-08-06 10:26       ` Tomi Ollila
2015-06-05 17:28     ` [PATCH 4/6] cli/count: add --output=modifications David Bremner
2015-06-05 17:28     ` [PATCH 5/6] cli: add global option "--db-revision" David Bremner
2015-08-07  8:05       ` Daniel Schoepe
2015-08-07 20:47         ` David Bremner
2015-06-05 17:28     ` [PATCH 6/6] lib: Add "lastmod:" queries for filtering by last modification David Bremner
2015-08-07  8:16       ` Daniel Schoepe
2015-08-07 20:22         ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAH-f9WszEhzuSie05+R88kk1kFvHgktCcf3JYbk1+MPEzU6Mjw@mail.gmail.com \
    --to=aclements@csail.mit.edu \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).