From: Tomi Ollila Date: Sun, 2 Aug 2015 09:18:22 +0000 (+0300) Subject: Re: [PATCH v2] cli/new: add more debugging output X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=74a416d7b2ad02ceac8567e429fae60f0bbfe77a;p=notmuch-archives.git Re: [PATCH v2] cli/new: add more debugging output --- diff --git a/fb/c8a3b8e59eefec802b7b1d4e36c04e07328f38 b/fb/c8a3b8e59eefec802b7b1d4e36c04e07328f38 new file mode 100644 index 000000000..afe5e2384 --- /dev/null +++ b/fb/c8a3b8e59eefec802b7b1d4e36c04e07328f38 @@ -0,0 +1,123 @@ +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 EB3EF6DE17E5 + for ; Sun, 2 Aug 2015 02:18:39 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.921 +X-Spam-Level: +X-Spam-Status: No, score=0.921 tagged_above=-999 required=5 tests=[AWL=0.269, + SPF_NEUTRAL=0.652] 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 BYeTw2olNBDZ for ; + Sun, 2 Aug 2015 02:18:37 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by arlo.cworth.org (Postfix) with ESMTP id 81CDF6DE17A7 + for ; Sun, 2 Aug 2015 02:18:37 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 91F31100046; + Sun, 2 Aug 2015 12:18:22 +0300 (EEST) +From: Tomi Ollila +To: David Bremner +Subject: Re: [PATCH v2] cli/new: add more debugging output +In-Reply-To: <1438506278-18880-1-git-send-email-david@tethera.net> +References: <87k2wybgjk.fsf@maritornes.cs.unb.ca> + <1438506278-18880-1-git-send-email-david@tethera.net> +User-Agent: Notmuch/0.20.2+31~g967a7a3 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +Cc: notmuch@notmuchmail.org +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: Sun, 02 Aug 2015 09:18:40 -0000 + +On Sun, Aug 02 2015, David Bremner wrote: + +> Try to narrow down what part of the code adds files and directories to +> the queue(s) to be deleted. +> --- + +Looks trivial enough to me. +1 + +Tomi + + +> +> - print slightly less scary messages +> - use git-send-email to send +> +> notmuch-new.c | 14 ++++++++++++++ +> 1 file changed, 14 insertions(+) +> +> diff --git a/notmuch-new.c b/notmuch-new.c +> index 8ff1ade..ee786a3 100644 +> --- a/notmuch-new.c +> +++ b/notmuch-new.c +> @@ -528,6 +528,10 @@ add_files (notmuch_database_t *notmuch, +> "%s/%s", path, +> notmuch_filenames_get (db_files)); +> +> + if (state->debug) +> + printf ("(D) add_files_recursive, pass 2: queuing passed file %s for deletion from database\n", +> + absolute); +> + +> _filename_list_add (state->removed_files, absolute); +> +> notmuch_filenames_move_to_next (db_files); +> @@ -542,6 +546,9 @@ add_files (notmuch_database_t *notmuch, +> { +> char *absolute = talloc_asprintf (state->removed_directories, +> "%s/%s", path, filename); +> + if (state->debug) +> + printf ("(D) add_files_recursive, pass 2: queuing passed directory %s for deletion from database\n", +> + absolute); +> +> _filename_list_add (state->removed_directories, absolute); +> } +> @@ -610,6 +617,9 @@ add_files (notmuch_database_t *notmuch, +> char *absolute = talloc_asprintf (state->removed_files, +> "%s/%s", path, +> notmuch_filenames_get (db_files)); +> + if (state->debug) +> + printf ("(D) add_files_recursive, pass 3: queuing leftover file %s for deletion from database\n", +> + absolute); +> +> _filename_list_add (state->removed_files, absolute); +> +> @@ -622,6 +632,10 @@ add_files (notmuch_database_t *notmuch, +> "%s/%s", path, +> notmuch_filenames_get (db_subdirs)); +> +> + if (state->debug) +> + printf ("(D) add_files_recursive, pass 3: queuing leftover directory %s for deletion from database\n", +> + absolute); +> + +> _filename_list_add (state->removed_directories, absolute); +> +> notmuch_filenames_move_to_next (db_subdirs); +> -- +> 2.1.4 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch