From: David Bremner Date: Sun, 2 Aug 2015 09:04:38 +0000 (+0200) Subject: [PATCH v2] cli/new: add more debugging output X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f87bf866c714a356f44038969036f72c649bb107;p=notmuch-archives.git [PATCH v2] cli/new: add more debugging output --- diff --git a/7f/ba926e052716e29e771d8b2fd777aff5e83435 b/7f/ba926e052716e29e771d8b2fd777aff5e83435 new file mode 100644 index 000000000..9ea275e58 --- /dev/null +++ b/7f/ba926e052716e29e771d8b2fd777aff5e83435 @@ -0,0 +1,106 @@ +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 CDC246DE1789 + for ; Sun, 2 Aug 2015 02:06:20 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.151 +X-Spam-Level: +X-Spam-Status: No, score=0.151 tagged_above=-999 required=5 tests=[AWL=0.141, + T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] 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 lkw_mofWh0xG for ; + Sun, 2 Aug 2015 02:06:18 -0700 (PDT) +Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224]) + by arlo.cworth.org (Postfix) with ESMTPS id 277BE6DE1785 + for ; Sun, 2 Aug 2015 02:06:17 -0700 (PDT) +Received: from remotemail by gitolite.debian.net with local (Exim 4.80) + (envelope-from ) + id 1ZLpD5-0000a2-CY; Sun, 02 Aug 2015 09:05:35 +0000 +Received: (nullmailer pid 19069 invoked by uid 1000); Sun, 02 Aug 2015 + 09:05:18 -0000 +From: David Bremner +To: David Bremner +Subject: [PATCH v2] cli/new: add more debugging output +Date: Sun, 2 Aug 2015 11:04:38 +0200 +Message-Id: <1438506278-18880-1-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.1.4 +In-Reply-To: <87k2wybgjk.fsf@maritornes.cs.unb.ca> +References: <87k2wybgjk.fsf@maritornes.cs.unb.ca> +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:06:20 -0000 + +Try to narrow down what part of the code adds files and directories to +the queue(s) to be deleted. +--- + + - 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 +