[PATCH v3 13/13] lib: Update doc of notmuch_database_{needs_upgrade, upgrade}
authorAustin Clements <amdragon@MIT.EDU>
Fri, 1 Aug 2014 02:10:03 +0000 (22:10 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:04:02 +0000 (10:04 -0800)
bf/07cafc549f169346b99e7da939672196d88e9a [new file with mode: 0644]

diff --git a/bf/07cafc549f169346b99e7da939672196d88e9a b/bf/07cafc549f169346b99e7da939672196d88e9a
new file mode 100644 (file)
index 0000000..c81edf8
--- /dev/null
@@ -0,0 +1,124 @@
+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 7706B431FD5\r
+       for <notmuch@notmuchmail.org>; Thu, 31 Jul 2014 19:11:01 -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 taErLlEpHcjI for <notmuch@notmuchmail.org>;\r
+       Thu, 31 Jul 2014 19:10:57 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-5.mit.edu (dmz-mailsec-scanner-5.mit.edu\r
+       [18.7.68.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 6EC8D431FD7\r
+       for <notmuch@notmuchmail.org>; Thu, 31 Jul 2014 19:10:20 -0700 (PDT)\r
+X-AuditID: 12074422-f79be6d000007518-94-53daf70b24de\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-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 8B.05.29976.C07FAD35; Thu, 31 Jul 2014 22:10:20 -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 s712A8fe014706; \r
+       Thu, 31 Jul 2014 22:10:09 -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 s712A7Ze029995\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Thu, 31 Jul 2014 22:10:08 -0400\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1XD2II-000341-9v; Thu, 31 Jul 2014 22:10:06 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v3 13/13] lib: Update doc of notmuch_database_{needs_upgrade,\r
+       upgrade}\r
+Date: Thu, 31 Jul 2014 22:10:03 -0400\r
+Message-Id: <1406859003-11561-14-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 2.0.0\r
+In-Reply-To: <1406859003-11561-1-git-send-email-amdragon@mit.edu>\r
+References: <1406859003-11561-1-git-send-email-amdragon@mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsUixCmqrMvz/VawwfIJzBar5/JYXL85k9mB\r
+       yWPnrLvsHs9W3WIOYIrisklJzcksSy3St0vgyrj6/xdbwX6BisvNt1kaGA/wdjFyckgImEhc\r
+       +7GZEcIWk7hwbz1bFyMXh5DAbCaJ2bd7GSGcjYwSu84uhHLuMEmsnvOTCcKZyyjReGciM0g/\r
+       m4CGxLb9y8FmiQhIS+y8O5sVxGYWcJT4vH8RG4gtLBAqsX/WNCYQm0VAVeLqlNVgNi9QzdtV\r
+       nSwQd8hJNNz4BFbPCRT//28B2BwhAQeJ1tNbmScw8i9gZFjFKJuSW6Wbm5iZU5yarFucnJiX\r
+       l1qka6qXm1mil5pSuokRFErsLko7GH8eVDrEKMDBqMTD6xB6K1iINbGsuDL3EKMkB5OSKK/N\r
+       R6AQX1J+SmVGYnFGfFFpTmrxIUYJDmYlEd6XH4ByvCmJlVWpRfkwKWkOFiVx3rfWVsFCAumJ\r
+       JanZqakFqUUwWRkODiUJ3jNfgRoFi1LTUyvSMnNKENJMHJwgw3mAhl8DqeEtLkjMLc5Mh8if\r
+       YlSUEufdA5IQAElklObB9cJi/RWjONArwrwPQap4gGkCrvsV0GAmoMHPb10HGVySiJCSamBk\r
+       YjdvWmTGzyLlNPXhzOplVzfVCfftvfDSfMYpkYgTM9am9KRdV/g2W6jV+eHOtW6Jn+KS1rY1\r
+       iXKUrp+71jmmV7fcWzS70k17tXfIuSNMMoFvQ83PXfitGLz888NzYdXt7dn3eX5kaBceu1fP\r
+       b/VhimPcJQO/J11B99YtLJx2+P09Tgnt0ENKLMUZiYZazEXFiQAa6VQJ0AIAAA==\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: Fri, 01 Aug 2014 02:11:02 -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