[PATCH 14/14] lib: Update doc of notmuch_database_{needs_upgrade, upgrade}
authorAustin Clements <amdragon@MIT.EDU>
Sun, 27 Jul 2014 03:52:53 +0000 (23:52 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:03:53 +0000 (10:03 -0800)
54/3600232b002ed36077daa6ee601158054db06b [new file with mode: 0644]

diff --git a/54/3600232b002ed36077daa6ee601158054db06b b/54/3600232b002ed36077daa6ee601158054db06b
new file mode 100644 (file)
index 0000000..9b3e554
--- /dev/null
@@ -0,0 +1,126 @@
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id BE479431FC7\r
+       for <notmuch@notmuchmail.org>; Sat, 26 Jul 2014 20:53:57 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id SwhEwg-7rKcE for <notmuch@notmuchmail.org>;\r
+       Sat, 26 Jul 2014 20:53:52 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-7.mit.edu (dmz-mailsec-scanner-7.mit.edu\r
+       [18.7.68.36])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 20B63431FDA\r
+       for <notmuch@notmuchmail.org>; Sat, 26 Jul 2014 20:53:15 -0700 (PDT)\r
+X-AuditID: 12074424-f79146d00000067c-0f-53d477aab65d\r
+Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
+       (using TLS with cipher AES256-SHA (256/256 bits))\r
+       (Client did not present a certificate)\r
+       by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 54.C1.01660.AA774D35; Sat, 26 Jul 2014 23:53:14 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id s6R3r32L008824; \r
+       Sat, 26 Jul 2014 23:53:04 -0400\r
+Received: from drake.dyndns.org\r
+       (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
+       [216.15.114.40]) (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s6R3r0Hr016414\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Sat, 26 Jul 2014 23:53:03 -0400\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1XBFW8-00051j-IL; Sat, 26 Jul 2014 23:53:00 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 14/14] lib: Update doc of notmuch_database_{needs_upgrade,\r
+       upgrade}\r
+Date: Sat, 26 Jul 2014 23:52:53 -0400\r
+Message-Id: <1406433173-19169-15-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 2.0.0\r
+In-Reply-To: <1406433173-19169-1-git-send-email-amdragon@mit.edu>\r
+References: <1406433173-19169-1-git-send-email-amdragon@mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFtrAIsWRmVeSWpSXmKPExsUixCmqrLuq/Eqwwf+nihbXb85kdmD0eLbq\r
+       FnMAYxSXTUpqTmZZapG+XQJXxtX/v9gK9gtUXG6+zdLAeIC3i5GDQ0LARKJ/WVwXIyeQKSZx\r
+       4d56ti5GLg4hgdlMEq/eLmKCcDYySux78YgNpEpI4A6TxIW5sRCJuYwSP0/vZAJJsAloSGzb\r
+       v5wRxBYRkJbYeXc2K8gGZgE1iT9dKiBhYYEgiaVH5zGD2CwCqhIvWmazg9i8Ao4SH3dCxCUE\r
+       5CQabnwC28UJFD/+7AQbyBghAQeJW5cSJzDyL2BkWMUom5JbpZubmJlTnJqsW5ycmJeXWqRr\r
+       rpebWaKXmlK6iREUMOwuKjsYmw8pHWIU4GBU4uHNYLsSLMSaWFZcmXuIUZKDSUmUd78ZUIgv\r
+       KT+lMiOxOCO+qDQntfgQowQHs5IIr1AxUI43JbGyKrUoHyYlzcGiJM771toqWEggPbEkNTs1\r
+       tSC1CCYrw8GhJMF7owyoUbAoNT21Ii0zpwQhzcTBCTKcB2j4hlKQ4cUFibnFmekQ+VOMilLi\r
+       vL9AEgIgiYzSPLheWES/YhQHekWYlxVkBQ8wGcB1vwIazAQ0mMX/MsjgkkSElFQD445s69ka\r
+       q2a26kinCPwQZgmz6l62c+YvU5OPVV/Z4u5oa1uVh7/guKbiobovOY2P+dPKeT8N5q/23qtw\r
+       Y0vMnb86bO9mN8VVnsuXF//wstt2yx2vgohp19ayuWy4HPC3Vln6jZy8xcZ/dfn/b5vuULpl\r
+       7/6Pp/u684L4Nr3tNpE3X37YM/GRgBJLcUaioRZzUXEiALEtb6rDAgAA\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 27 Jul 2014 03:53:58 -0000\r
+\r
+Clients are no longer required to call these functions after opening a\r
+database in read/write mode (which is good, because almost none of\r
+them do!).\r
+---\r
+ lib/notmuch.h | 21 ++++++++++++---------\r
+ 1 file changed, 12 insertions(+), 9 deletions(-)\r
+\r
+diff --git a/lib/notmuch.h b/lib/notmuch.h\r
+index cbf2ba5..d771eb2 100644\r
+--- a/lib/notmuch.h\r
++++ b/lib/notmuch.h\r
+@@ -352,22 +352,25 @@ unsigned int\r
+ notmuch_database_get_version (notmuch_database_t *database);\r
\r
+ /**\r
+- * Does this database need to be upgraded before writing to it?\r
++ * Is the database behind the latest supported database version?\r
+  *\r
+- * If this function returns TRUE then no functions that modify the\r
+- * database (notmuch_database_add_message, notmuch_message_add_tag,\r
+- * notmuch_directory_set_mtime, etc.) will work unless the function\r
+- * notmuch_database_upgrade is called successfully first.\r
++ * If this function returns TRUE, then the caller may call\r
++ * notmuch_database_upgrade to upgrade the database.  If the caller\r
++ * does not upgrade an out-of-date database, then some functions may\r
++ * fail with NOTMUCH_STATUS_UPGRADE_REQUIRED.\r
+  */\r
+ notmuch_bool_t\r
+ notmuch_database_needs_upgrade (notmuch_database_t *database);\r
\r
+ /**\r
+- * Upgrade the current database.\r
++ * Upgrade the current database to the latest supported version.\r
+  *\r
+- * After opening a database in read-write mode, the client should\r
+- * check if an upgrade is needed (notmuch_database_needs_upgrade) and\r
+- * if so, upgrade with this function before making any modifications.\r
++ * This ensures that all current notmuch functionality will be\r
++ * available on the database.  After opening a database in read-write\r
++ * mode, it is recommended that clients check if an upgrade is needed\r
++ * (notmuch_database_needs_upgrade) and if so, upgrade with this\r
++ * function before making any modifications.  If\r
++ * notmuch_database_needs_upgrade returns FALSE, this will be a no-op.\r
+  *\r
+  * The optional progress_notify callback can be used by the caller to\r
+  * provide progress indication to the user. If non-NULL it will be\r
+-- \r
+2.0.0\r
+\r