get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/812351/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 812351,
    "url": "http://patchwork.ozlabs.org/api/patches/812351/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170911110623.24981-38-marcandre.lureau@redhat.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170911110623.24981-38-marcandre.lureau@redhat.com>",
    "list_archive_url": null,
    "date": "2017-09-11T11:06:10",
    "name": "[v3,37/50] qapi: add conditions to SPICE type/commands/events on the schema",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "ca842a232030968c71ed9dd1f7161b667716675a",
    "submitter": {
        "id": 66774,
        "url": "http://patchwork.ozlabs.org/api/people/66774/?format=api",
        "name": "Marc-André Lureau",
        "email": "marcandre.lureau@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170911110623.24981-38-marcandre.lureau@redhat.com/mbox/",
    "series": [
        {
            "id": 2480,
            "url": "http://patchwork.ozlabs.org/api/series/2480/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2480",
            "date": "2017-09-11T11:05:33",
            "name": "Hi,",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/2480/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/812351/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/812351/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)",
            "ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com",
            "ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=marcandre.lureau@redhat.com"
        ],
        "Received": [
            "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrQpd5W71z9sBd\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 21:35:37 +1000 (AEST)",
            "from localhost ([::1]:56864 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1drN03-0004re-KV\n\tfor incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 07:35:35 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:43592)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <marcandre.lureau@redhat.com>) id 1drMZc-0006So-5D\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 07:08:20 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <marcandre.lureau@redhat.com>) id 1drMZV-00076G-UB\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 07:08:16 -0400",
            "from mx1.redhat.com ([209.132.183.28]:34248)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <marcandre.lureau@redhat.com>)\n\tid 1drMZV-00075q-LT\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 07:08:09 -0400",
            "from smtp.corp.redhat.com\n\t(int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id CAD6CB98F5\n\tfor <qemu-devel@nongnu.org>; Mon, 11 Sep 2017 11:08:08 +0000 (UTC)",
            "from localhost (ovpn-112-47.ams2.redhat.com [10.36.112.47])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id CC0B077E55;\n\tMon, 11 Sep 2017 11:08:03 +0000 (UTC)"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com CAD6CB98F5",
        "From": "=?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Date": "Mon, 11 Sep 2017 13:06:10 +0200",
        "Message-Id": "<20170911110623.24981-38-marcandre.lureau@redhat.com>",
        "In-Reply-To": "<20170911110623.24981-1-marcandre.lureau@redhat.com>",
        "References": "<20170911110623.24981-1-marcandre.lureau@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.16",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.28]);\n\tMon, 11 Sep 2017 11:08:08 +0000 (UTC)",
        "Content-Transfer-Encoding": "quoted-printable",
        "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]",
        "X-Received-From": "209.132.183.28",
        "Subject": "[Qemu-devel] [PATCH v3 37/50] qapi: add conditions to SPICE\n\ttype/commands/events on the schema",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.21",
        "Precedence": "list",
        "List-Id": "<qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Cc": "armbru@redhat.com, \"Dr. David Alan Gilbert\" <dgilbert@redhat.com>, Gerd\n\tHoffmann <kraxel@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, \n\t=?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"
    },
    "content": "Add #if defined(CONFIG_SPICE) in generated code, and adjust the\nqmp/hmp code accordingly.\n\nSigned-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>\n---\n qapi/char.json | 10 ++++++----\n qapi/ui.json   | 30 ++++++++++++++++++++----------\n monitor.c      |  3 ---\n qmp.c          | 16 ----------------\n 4 files changed, 26 insertions(+), 33 deletions(-)",
    "diff": "diff --git a/qapi/char.json b/qapi/char.json\nindex ae19dcd1ed..7fa1762ae5 100644\n--- a/qapi/char.json\n+++ b/qapi/char.json\n@@ -318,7 +318,8 @@\n # Since: 1.5\n ##\n { 'struct': 'ChardevSpiceChannel', 'data': { 'type'  : 'str' },\n-  'base': 'ChardevCommon' }\n+  'base': 'ChardevCommon',\n+  'if': 'defined(CONFIG_SPICE)' }\n \n ##\n # @ChardevSpicePort:\n@@ -330,7 +331,8 @@\n # Since: 1.5\n ##\n { 'struct': 'ChardevSpicePort', 'data': { 'fqdn'  : 'str' },\n-  'base': 'ChardevCommon' }\n+  'base': 'ChardevCommon',\n+  'if': 'defined(CONFIG_SPICE)' }\n \n ##\n # @ChardevVC:\n@@ -384,8 +386,8 @@\n                                        'testdev': 'ChardevCommon',\n                                        'stdio'  : 'ChardevStdio',\n                                        'console': 'ChardevCommon',\n-                                       'spicevmc' : 'ChardevSpiceChannel',\n-                                       'spiceport' : 'ChardevSpicePort',\n+                                       'spicevmc' : { 'type': 'ChardevSpiceChannel', 'if': 'defined(CONFIG_SPICE)' },\n+                                       'spiceport' : { 'type': 'ChardevSpicePort', 'if': 'defined(CONFIG_SPICE)' },\n                                        'vc'     : 'ChardevVC',\n                                        'ringbuf': 'ChardevRingbuf',\n                                        # next one is just for compatibility\ndiff --git a/qapi/ui.json b/qapi/ui.json\nindex 4b573d214b..daa4168c14 100644\n--- a/qapi/ui.json\n+++ b/qapi/ui.json\n@@ -110,7 +110,8 @@\n { 'struct': 'SpiceBasicInfo',\n   'data': { 'host': 'str',\n             'port': 'str',\n-            'family': 'NetworkAddressFamily' } }\n+            'family': 'NetworkAddressFamily' },\n+  'if': 'defined(CONFIG_SPICE)' }\n \n ##\n # @SpiceServerInfo:\n@@ -123,7 +124,8 @@\n ##\n { 'struct': 'SpiceServerInfo',\n   'base': 'SpiceBasicInfo',\n-  'data': { '*auth': 'str' } }\n+  'data': { '*auth': 'str' },\n+  'if': 'defined(CONFIG_SPICE)' }\n \n ##\n # @SpiceChannel:\n@@ -148,7 +150,8 @@\n { 'struct': 'SpiceChannel',\n   'base': 'SpiceBasicInfo',\n   'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',\n-           'tls': 'bool'} }\n+           'tls': 'bool'},\n+  'if': 'defined(CONFIG_SPICE)' }\n \n ##\n # @SpiceQueryMouseMode:\n@@ -167,7 +170,8 @@\n # Since: 1.1\n ##\n { 'enum': 'SpiceQueryMouseMode',\n-  'data': [ 'client', 'server', 'unknown' ] }\n+  'data': [ 'client', 'server', 'unknown' ],\n+  'if': 'defined(CONFIG_SPICE)' }\n \n ##\n # @SpiceInfo:\n@@ -204,7 +208,8 @@\n { 'struct': 'SpiceInfo',\n   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',\n            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',\n-           'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }\n+           'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},\n+  'if': 'defined(CONFIG_SPICE)' }\n \n ##\n # @query-spice:\n@@ -249,7 +254,8 @@\n #    }\n #\n ##\n-{ 'command': 'query-spice', 'returns': 'SpiceInfo' }\n+{ 'command': 'query-spice', 'returns': 'SpiceInfo',\n+  'if': 'defined(CONFIG_SPICE)' }\n \n ##\n # @SPICE_CONNECTED:\n@@ -274,7 +280,8 @@\n ##\n { 'event': 'SPICE_CONNECTED',\n   'data': { 'server': 'SpiceBasicInfo',\n-            'client': 'SpiceBasicInfo' } }\n+            'client': 'SpiceBasicInfo' },\n+  'if': 'defined(CONFIG_SPICE)' }\n \n ##\n # @SPICE_INITIALIZED:\n@@ -302,7 +309,8 @@\n ##\n { 'event': 'SPICE_INITIALIZED',\n   'data': { 'server': 'SpiceServerInfo',\n-            'client': 'SpiceChannel' } }\n+            'client': 'SpiceChannel' },\n+  'if': 'defined(CONFIG_SPICE)' }\n \n ##\n # @SPICE_DISCONNECTED:\n@@ -327,7 +335,8 @@\n ##\n { 'event': 'SPICE_DISCONNECTED',\n   'data': { 'server': 'SpiceBasicInfo',\n-            'client': 'SpiceBasicInfo' } }\n+            'client': 'SpiceBasicInfo' },\n+  'if': 'defined(CONFIG_SPICE)' }\n \n ##\n # @SPICE_MIGRATE_COMPLETED:\n@@ -342,7 +351,8 @@\n #      \"event\": \"SPICE_MIGRATE_COMPLETED\" }\n #\n ##\n-{ 'event': 'SPICE_MIGRATE_COMPLETED' }\n+{ 'event': 'SPICE_MIGRATE_COMPLETED',\n+  'if': 'defined(CONFIG_SPICE)' }\n \n ##\n # == VNC\ndiff --git a/monitor.c b/monitor.c\nindex 5685697f59..135a1e0821 100644\n--- a/monitor.c\n+++ b/monitor.c\n@@ -970,9 +970,6 @@ static void qmp_query_qmp_schema(QDict *qdict, QObject **ret_data,\n  */\n static void qmp_unregister_commands_hack(void)\n {\n-#ifndef CONFIG_SPICE\n-    qmp_unregister_command(&qmp_commands, \"query-spice\");\n-#endif\n #ifndef CONFIG_REPLICATION\n     qmp_unregister_command(&qmp_commands, \"xen-set-replication\");\n     qmp_unregister_command(&qmp_commands, \"query-xen-replication-status\");\ndiff --git a/qmp.c b/qmp.c\nindex 2c90dacb56..90816ba283 100644\n--- a/qmp.c\n+++ b/qmp.c\n@@ -130,22 +130,6 @@ void qmp_cpu_add(int64_t id, Error **errp)\n     }\n }\n \n-#ifndef CONFIG_SPICE\n-/*\n- * qmp-commands.hx ensures that QMP command query-spice exists only\n- * #ifdef CONFIG_SPICE.  Necessary for an accurate query-commands\n- * result.  However, the QAPI schema is blissfully unaware of that,\n- * and the QAPI code generator happily generates a dead\n- * qmp_marshal_query_spice() that calls qmp_query_spice().  Provide it\n- * one, or else linking fails.  FIXME Educate the QAPI schema on\n- * CONFIG_SPICE.\n- */\n-SpiceInfo *qmp_query_spice(Error **errp)\n-{\n-    abort();\n-};\n-#endif\n-\n void qmp_cont(Error **errp)\n {\n     BlockBackend *blk;\n",
    "prefixes": [
        "v3",
        "37/50"
    ]
}