1 Return-Path: <bgamari.foss@gmail.com>
\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 olra.theworths.org (Postfix) with ESMTP id 26370431FC4
\r
6 for <notmuch@notmuchmail.org>; Wed, 17 Oct 2012 08:29:40 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id bfShYsbAkPOn for <notmuch@notmuchmail.org>;
\r
17 Wed, 17 Oct 2012 08:29:39 -0700 (PDT)
\r
18 Received: from mail-qa0-f46.google.com (mail-qa0-f46.google.com
\r
19 [209.85.216.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 881F4431FB6
\r
22 for <notmuch@notmuchmail.org>; Wed, 17 Oct 2012 08:29:39 -0700 (PDT)
\r
23 Received: by mail-qa0-f46.google.com with SMTP id c26so637242qad.5
\r
24 for <notmuch@notmuchmail.org>; Wed, 17 Oct 2012 08:29:39 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
27 bh=D1KJeMANvVeI1envwO2kMhZeS29daCLoE2IYrWHYoSg=;
\r
28 b=ARr7rQC6h7dpsgfD2NI6ZHD+V3WD1H4fvg2wyOo3esJmd80Mimbp7vCnqLFb9nLzxY
\r
29 jym1aLkk4gd1oL3LjPAx48YtKJQ63FB/8l9fztJCJs7BU6/hTs9SjMOtBmtNs1yq3tg0
\r
30 S0o6Bvaqdd/wx79pE+CFFfn6XBLAWNGY6/r4d55IdzKOax/p6IbFMXzcPLr6V4Aas64i
\r
31 fzafwBAiS9ZYwvOBuOnCRtbLJihcqfjnPvXynJ5Jg8ThZhDrnZw8kkxddkDPl24TlOQR
\r
32 PwyOQj44LiJ8YQZvwXYQ3TANaAAPq0VDA9oxA3GqQt/iKHZNQ5NJyfsTLlH4xuNbqxMw
\r
34 Received: by 10.49.85.194 with SMTP id j2mr43115507qez.54.1350487778961;
\r
35 Wed, 17 Oct 2012 08:29:38 -0700 (PDT)
\r
36 Received: from ben-laptop.hasb.physics.cns (physicsnat56.physics.umass.edu.
\r
38 by mx.google.com with ESMTPS id eq10sm13366039qab.0.2012.10.17.08.29.38
\r
39 (version=SSLv3 cipher=OTHER); Wed, 17 Oct 2012 08:29:38 -0700 (PDT)
\r
40 From: Ben Gamari <bgamari.foss@gmail.com>
\r
41 To: notmuch@notmuchmail.org
\r
42 Subject: [PATCH 2/3] Produce status messages during compacting
\r
43 Date: Wed, 17 Oct 2012 11:28:56 -0400
\r
44 Message-Id: <1350487737-32058-3-git-send-email-bgamari.foss@gmail.com>
\r
45 X-Mailer: git-send-email 1.7.10.4
\r
46 In-Reply-To: <1350487737-32058-1-git-send-email-bgamari.foss@gmail.com>
\r
47 References: <1350487737-32058-1-git-send-email-bgamari.foss@gmail.com>
\r
48 X-BeenThere: notmuch@notmuchmail.org
\r
49 X-Mailman-Version: 2.1.13
\r
51 List-Id: "Use and development of the notmuch mail system."
\r
52 <notmuch.notmuchmail.org>
\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
56 List-Post: <mailto:notmuch@notmuchmail.org>
\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
60 X-List-Received-Date: Wed, 17 Oct 2012 15:29:40 -0000
\r
63 lib/database.cc | 15 ++++++++++++++-
\r
64 1 file changed, 14 insertions(+), 1 deletion(-)
\r
66 diff --git a/lib/database.cc b/lib/database.cc
\r
67 index 6e83a61..49aa36d 100644
\r
68 --- a/lib/database.cc
\r
69 +++ b/lib/database.cc
\r
70 @@ -780,11 +780,24 @@ notmuch_database_close (notmuch_database_t *notmuch)
\r
71 notmuch->value_range_processor = NULL;
\r
74 +class NotmuchCompactor : public Xapian::Compactor
\r
78 + set_status (const std::string &table, const std::string &status)
\r
80 + if (status.length() == 0)
\r
81 + fprintf (stderr, "compacting table %s:\n", table.c_str());
\r
83 + fprintf (stderr, " %s\n", status.c_str());
\r
88 notmuch_database_close_compact (notmuch_database_t *notmuch)
\r
90 void *local = talloc_new (NULL);
\r
91 - Xapian::Compactor compactor;
\r
92 + NotmuchCompactor compactor;
\r
93 char *notmuch_path, *xapian_path, *compact_xapian_path, *old_xapian_path;
\r
95 #if HAVE_XAPIAN_COMPACT
\r