Re: Hi all
[notmuch-archives.git] / 7f / ba926e052716e29e771d8b2fd777aff5e83435
1 Return-Path: <bremner@tesseract.cs.unb.ca>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5  by arlo.cworth.org (Postfix) with ESMTP id CDC246DE1789\r
6  for <notmuch@notmuchmail.org>; Sun,  2 Aug 2015 02:06:20 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.151\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.151 tagged_above=-999 required=5 tests=[AWL=0.141, \r
12  T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id lkw_mofWh0xG for <notmuch@notmuchmail.org>;\r
16  Sun,  2 Aug 2015 02:06:18 -0700 (PDT)\r
17 Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224])\r
18  by arlo.cworth.org (Postfix) with ESMTPS id 277BE6DE1785\r
19  for <notmuch@notmuchmail.org>; Sun,  2 Aug 2015 02:06:17 -0700 (PDT)\r
20 Received: from remotemail by gitolite.debian.net with local (Exim 4.80)\r
21  (envelope-from <bremner@tesseract.cs.unb.ca>)\r
22  id 1ZLpD5-0000a2-CY; Sun, 02 Aug 2015 09:05:35 +0000\r
23 Received: (nullmailer pid 19069 invoked by uid 1000); Sun, 02 Aug 2015\r
24  09:05:18 -0000\r
25 From: David Bremner <david@tethera.net>\r
26 To: David Bremner <david@tethera.net>\r
27 Subject: [PATCH v2] cli/new: add more debugging output\r
28 Date: Sun,  2 Aug 2015 11:04:38 +0200\r
29 Message-Id: <1438506278-18880-1-git-send-email-david@tethera.net>\r
30 X-Mailer: git-send-email 2.1.4\r
31 In-Reply-To: <87k2wybgjk.fsf@maritornes.cs.unb.ca>\r
32 References: <87k2wybgjk.fsf@maritornes.cs.unb.ca>\r
33 Cc: notmuch@notmuchmail.org\r
34 X-BeenThere: notmuch@notmuchmail.org\r
35 X-Mailman-Version: 2.1.18\r
36 Precedence: list\r
37 List-Id: "Use and development of the notmuch mail system."\r
38  <notmuch.notmuchmail.org>\r
39 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
40  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
41 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
42 List-Post: <mailto:notmuch@notmuchmail.org>\r
43 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
44 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
45  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
46 X-List-Received-Date: Sun, 02 Aug 2015 09:06:20 -0000\r
47 \r
48 Try to narrow down what part of the code adds files and directories to\r
49 the queue(s) to be deleted.\r
50 ---\r
51 \r
52  - print slightly less scary messages\r
53  - use git-send-email to send\r
54 \r
55  notmuch-new.c | 14 ++++++++++++++\r
56  1 file changed, 14 insertions(+)\r
57 \r
58 diff --git a/notmuch-new.c b/notmuch-new.c\r
59 index 8ff1ade..ee786a3 100644\r
60 --- a/notmuch-new.c\r
61 +++ b/notmuch-new.c\r
62 @@ -528,6 +528,10 @@ add_files (notmuch_database_t *notmuch,\r
63                                               "%s/%s", path,\r
64                                               notmuch_filenames_get (db_files));\r
65  \r
66 +           if (state->debug)\r
67 +               printf ("(D) add_files_recursive, pass 2: queuing passed file %s for deletion from database\n",\r
68 +                       absolute);\r
69 +\r
70             _filename_list_add (state->removed_files, absolute);\r
71  \r
72             notmuch_filenames_move_to_next (db_files);\r
73 @@ -542,6 +546,9 @@ add_files (notmuch_database_t *notmuch,\r
74             {\r
75                 char *absolute = talloc_asprintf (state->removed_directories,\r
76                                                   "%s/%s", path, filename);\r
77 +               if (state->debug)\r
78 +                   printf ("(D) add_files_recursive, pass 2: queuing passed directory %s for deletion from database\n",\r
79 +                       absolute);\r
80  \r
81                 _filename_list_add (state->removed_directories, absolute);\r
82             }\r
83 @@ -610,6 +617,9 @@ add_files (notmuch_database_t *notmuch,\r
84         char *absolute = talloc_asprintf (state->removed_files,\r
85                                           "%s/%s", path,\r
86                                           notmuch_filenames_get (db_files));\r
87 +       if (state->debug)\r
88 +           printf ("(D) add_files_recursive, pass 3: queuing leftover file %s for deletion from database\n",\r
89 +                   absolute);\r
90  \r
91         _filename_list_add (state->removed_files, absolute);\r
92  \r
93 @@ -622,6 +632,10 @@ add_files (notmuch_database_t *notmuch,\r
94                                           "%s/%s", path,\r
95                                           notmuch_filenames_get (db_subdirs));\r
96  \r
97 +       if (state->debug)\r
98 +           printf ("(D) add_files_recursive, pass 3: queuing leftover directory %s for deletion from database\n",\r
99 +                   absolute);\r
100 +\r
101         _filename_list_add (state->removed_directories, absolute);\r
102  \r
103         notmuch_filenames_move_to_next (db_subdirs);\r
104 -- \r
105 2.1.4\r
106 \r