From: David Bremner <david@tethera.net>
To: David Bremner <david@tethera.net>
Cc: notmuch@notmuchmail.org
Subject: [PATCH v2] cli/new: add more debugging output
Date: Sun, 2 Aug 2015 11:04:38 +0200 [thread overview]
Message-ID: <1438506278-18880-1-git-send-email-david@tethera.net> (raw)
In-Reply-To: <87k2wybgjk.fsf@maritornes.cs.unb.ca>
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
next prev parent reply other threads:[~2015-08-02 9:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 16:09 Notmuch removing messages from the index, when calling `new` two times in a row Mayeu
2015-04-23 3:49 ` David Bremner
2015-04-23 12:04 ` Mayeu
2015-04-23 22:25 ` David Bremner
2015-04-24 9:29 ` Mayeu
2015-04-26 23:45 ` David Bremner
2015-08-02 9:04 ` David Bremner [this message]
2015-08-02 9:18 ` [PATCH v2] cli/new: add more debugging output Tomi Ollila
2015-08-04 6:48 ` test suite: add more debugging output for notmuch-new David Bremner
2015-08-04 6:48 ` [PATCH 1/3] test: don't claim single message mbox support is going away David Bremner
2015-08-04 6:48 ` [PATCH 2/3] cli/new: add more debugging output David Bremner
2015-08-04 6:48 ` [PATCH 3/3] test: add debugging output to notmuch-new tests, mark 5 as broken David Bremner
2015-08-04 8:25 ` test suite: add more debugging output for notmuch-new Tomi Ollila
2015-08-04 19:12 ` David Bremner
2015-09-25 18:19 ` Notmuch removing messages from the index, when calling `new` two times in a row Jani Nikula
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=1438506278-18880-1-git-send-email-david@tethera.net \
--to=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).