From: Jani Nikula Date: Fri, 29 Mar 2013 22:15:04 +0000 (+0200) Subject: Re: Strange behavior on manually files moving X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=328cdadf5c6e920638d13db475e0e9f60cb4b4c4;p=notmuch-archives.git Re: Strange behavior on manually files moving --- diff --git a/47/e8cf13707558fd4c235f03a910499dc7077f42 b/47/e8cf13707558fd4c235f03a910499dc7077f42 new file mode 100644 index 000000000..027206b13 --- /dev/null +++ b/47/e8cf13707558fd4c235f03a910499dc7077f42 @@ -0,0 +1,144 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 14A9D431FC0 + for ; Fri, 29 Mar 2013 15:15:12 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id eeI5IpMfy32n for ; + Fri, 29 Mar 2013 15:15:10 -0700 (PDT) +Received: from mail-la0-f45.google.com (mail-la0-f45.google.com + [209.85.215.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 5DE81431FAE + for ; Fri, 29 Mar 2013 15:15:10 -0700 (PDT) +Received: by mail-la0-f45.google.com with SMTP id er20so817669lab.32 + for ; Fri, 29 Mar 2013 15:15:07 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=x-received:from:to:subject:in-reply-to:references:user-agent:date + :message-id:mime-version:content-type:content-transfer-encoding + :x-gm-message-state; + bh=hrD4F1jdX5zjhW5kmFgJooPT/g+pzRC2t7pHQQmAswY=; + b=e/N3Nthn3gNxZRMRs4GZ+TXlEL7xRlZI76+ivHsUN+WRA7X9ZJFGJWg2cU01fFFZd5 + Hb2Kn01Ax2onhaAN0LfLc5zoPloAiHsI7hv4WcEY7GhWRXdc8KiyGdHlTHfSy09hgo2G + aI631M8/cqa9YUHZ1oRVmjdLS7SJ6rQo6OScAmRXKUjWXyhCvsUPkQH8h2OSmtlNlw2Y + 3wQCJlxyF1cdkRKlUuVhdVe3tCOWV6F0kU63Dx4vyOUSTNz3Pri5bJEzVG3+sH3doHIh + klBiR20bLy57Ox7NGEJuZX3kJ0R93ZzQ0a0U+FOct9Oj+gxvqRaz1CBJ/Hc1tGKwl/M7 + POWA== +X-Received: by 10.152.113.164 with SMTP id iz4mr1795160lab.50.1364595307507; + Fri, 29 Mar 2013 15:15:07 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw4-50df51-27.dhcp.inet.fi. + [80.223.81.27]) + by mx.google.com with ESMTPS id z1sm1814128lbk.2.2013.03.29.15.15.05 + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Fri, 29 Mar 2013 15:15:06 -0700 (PDT) +From: Jani Nikula +To: kedals0@gmail.com, notmuch@notmuchmail.org +Subject: Re: Strange behavior on manually files moving +In-Reply-To: <87vc8me95v.fsf@compaq.home> +References: <87vc8me95v.fsf@compaq.home> +User-Agent: Notmuch/0.15.2+48~gc5630bf (http://notmuchmail.org) Emacs/24.2.1 + (x86_64-pc-linux-gnu) +Date: Sat, 30 Mar 2013 00:15:04 +0200 +Message-ID: <87ppyhg8ev.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +X-Gm-Message-State: + ALoCoQkFj2jCsgQzRRuef7U+TQ6gzJQtG2YKmuk2909dRWbSxXvCkGvC7uPOGCrNebYmY/6tYyer +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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, 29 Mar 2013 22:15:12 -0000 + +On Wed, 20 Mar 2013, kedals0@gmail.com wrote: +> Hello, +> +> When I manually move some messages, these changes are detected by +> notmuch but it doesn't remove these files of its database. +> I think, it's more clear to show you an example: +> +> 1) Initialisation +> toto@compaq:~$ notmuch new +> No new mail. +> +> 2) I show you the initial location of the message that we will move +> toto@compaq:~$ ls /home/toto/mail/drafts/cur/#*message*-20130312-16313= +1#:2,DS +> /home/toto/mail/drafts/cur/#*message*-20130312-163131#:2,DS +> +> 3) we move this message +> toto@compaq:~$ mv /home/toto/mail/drafts/cur/#*message*-20130312-16313= +1#:2,DS /home/toto/mail/local/trash/cur/ +> +> 4) we update notmuch database +> toto@compaq:~$ notmuch new +> Processed 1 file in almost no time. +> No new mail. Removed 1 message. +> +> 5) we can observe that old message location still exist in the db +> toto@compaq:~$ notmuch search --output=3Dfiles tag:draft folder:local/= +trash/ +> /home/toto/mail/local/trash/cur/#*message*-20130312-163131#:2,DS +> /home/toto/mail/drafts/cur/#*message*-20130312-163131#:2,DS +> +> 6) but no file exist at this location. +> toto@compaq:~$ ls /home/toto/mail/drafts/cur/#*message*-20130312-16313= +1#:2,DS +> ls: impossible d'acc=C3=A9der =C3=A0 /home/toto/mail/drafts/cur/#*mess= +age*-20130312-163131#:2,DS: Aucun fichier ou dossier de ce type +> +> +> I don't understand this problem because this usecase is close from a +> file deletion which works. +> +> Would anyone have an idea ? + +What do you have in 'notmuch config get new.ignore'? Have you changed +this setting recently? + +I could reproduce something similar by adding an ignore on a folder that +had files indexed by notmuch: + +$ cd /path/to/maildir +$ mkdir foo +$ mkdir bar +$ # deliver a message to foo/baz +$ notmuch new +Processed 1 file in almost no time. +Added 1 new message to the database. +$ notmuch config set new.ignore foo +$ mv foo/baz bar +$ notmuch new --debug +(D) add_files_recursive, pass 1: explicitly ignoring /path/to/maildir/foo +Processed 1 file in almost no time. +No new mail. +$ notmuch search --output=3Dfiles folder:bar +/path/to/maildir/foo/baz +/path/to/maildir/bar/baz + +Note that the last search finds messages that have at least one +associated file in a folder matching bar, and then outputs *all* the +associated files for the messages. Here, the ignore has caused notmuch +to not notice the file in foo has been deleted. + + +BR, +Jani.