get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 819558,
    "url": "http://patchwork.ozlabs.org/api/patches/819558/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170928120621.30288-3-berrange@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": "<20170928120621.30288-3-berrange@redhat.com>",
    "list_archive_url": null,
    "date": "2017-09-28T12:06:17",
    "name": "[v7,2/6] docker: don't rely on submodules existing in the main checkout",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "57bc3096c3bbf7ce50b1726625b6b323e8f5e3fd",
    "submitter": {
        "id": 2694,
        "url": "http://patchwork.ozlabs.org/api/people/2694/?format=api",
        "name": "Daniel P. Berrangé",
        "email": "berrange@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170928120621.30288-3-berrange@redhat.com/mbox/",
    "series": [
        {
            "id": 5547,
            "url": "http://patchwork.ozlabs.org/api/series/5547/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=5547",
            "date": "2017-09-28T12:06:16",
            "name": "Initial support for keycodemapdb GIT submodule",
            "version": 7,
            "mbox": "http://patchwork.ozlabs.org/series/5547/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/819558/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/819558/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-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com",
            "ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=berrange@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 3y2tmG2Pvqz9t5l\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 28 Sep 2017 22:09:47 +1000 (AEST)",
            "from localhost ([::1]:58968 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 1dxXdP-0002YN-QZ\n\tfor incoming@patchwork.ozlabs.org; Thu, 28 Sep 2017 08:09:43 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:44439)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <berrange@redhat.com>) id 1dxXaP-0000Ce-JX\n\tfor qemu-devel@nongnu.org; Thu, 28 Sep 2017 08:06:43 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <berrange@redhat.com>) id 1dxXaO-0007ky-G5\n\tfor qemu-devel@nongnu.org; Thu, 28 Sep 2017 08:06:37 -0400",
            "from mx1.redhat.com ([209.132.183.28]:50362)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <berrange@redhat.com>) id 1dxXaO-0007ki-9t\n\tfor qemu-devel@nongnu.org; Thu, 28 Sep 2017 08:06:36 -0400",
            "from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\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 6FC19B82C2;\n\tThu, 28 Sep 2017 12:06:35 +0000 (UTC)",
            "from t460.redhat.com (unknown [10.33.36.70])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 51EBC90C5A;\n\tThu, 28 Sep 2017 12:06:33 +0000 (UTC)"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 6FC19B82C2",
        "From": "\"Daniel P. Berrange\" <berrange@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Date": "Thu, 28 Sep 2017 13:06:17 +0100",
        "Message-Id": "<20170928120621.30288-3-berrange@redhat.com>",
        "In-Reply-To": "<20170928120621.30288-1-berrange@redhat.com>",
        "References": "<20170928120621.30288-1-berrange@redhat.com>",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.14",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tThu, 28 Sep 2017 12:06:35 +0000 (UTC)",
        "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 v7 2/6] docker: don't rely on submodules\n\texisting in the main checkout",
        "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": "Peter Maydell <peter.maydell@linaro.org>, Fam Zheng <famz@redhat.com>,\n\tGerd Hoffmann <kraxel@redhat.com>, Paolo Bonzini <pbonzini@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": "When building the tarball to pass into the docker/vm test image,\nthe code relies on the git submodules being checked out in the\nmain checkout.\n\nie if the developer has not run 'git submodule update --init dtc'\nmany of the docker tests will fail due to the libfdt package not\nbeing present in the test images. Patchew manually checks out the\ndtc submodule in the main git checkout, but this is a bad idea.\n\nWhen running tests we want to have a predictable set of submodules\nincluded in the source that's tested. The build environment is\ncompletely independant of the developers host OS, so the submodules\nthe developer has checked out should not be considered relevant for\nthe tests.\n\nThis changes the archive-source.sh script so that it clones the\ncurrent git checkout into a temporary directory, checks out a\nfixed set of submodules, builds the tarball and finally removes\nthe temporary git clone.\n\nSigned-off-by: Daniel P. Berrange <berrange@redhat.com>\n---\n scripts/archive-source.sh | 30 +++++++++++++++++++++++++++---\n 1 file changed, 27 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh\nindex c4e7d98f4d..0c06af0d00 100755\n--- a/scripts/archive-source.sh\n+++ b/scripts/archive-source.sh\n@@ -18,9 +18,15 @@ if test $# -lt 1; then\n     error \"Usage: $0 <output tarball>\"\n fi\n \n-tar_file=\"$1\"\n-list_file=\"$1.list\"\n-submodules=$(git submodule foreach --recursive --quiet 'echo $name')\n+tar_file=`realpath \"$1\"`\n+list_file=\"${tar_file}.list\"\n+vroot_dir=\"${tar_file}.vroot\"\n+\n+# We want a predictable list of submodules for builds, that is\n+# independant of what the developer currently has initialized\n+# in their checkout, because the build environment is completely\n+# different to the host OS.\n+submodules=\"dtc\"\n \n if test $? -ne 0; then\n     error \"git submodule command failed\"\n@@ -28,6 +34,21 @@ fi\n \n trap \"status=$?; rm -f \\\"$list_file\\\"; exit \\$status\" 0 1 2 3 15\n \n+if git diff-index --quiet HEAD -- &>/dev/null\n+then\n+    HEAD=HEAD\n+else\n+    HEAD=`git stash create`\n+fi\n+git clone --shared . \"$vroot_dir\"\n+here=`pwd`\n+cd \"$vroot_dir\"\n+git checkout $HEAD\n+\n+for sm in $submodules; do\n+    git submodule update --init $sm\n+done\n+\n if test -n \"$submodules\"; then\n     {\n         git ls-files || error \"git ls-files failed\"\n@@ -48,4 +69,7 @@ fi\n \n tar -cf \"$tar_file\" -T \"$list_file\" || error \"failed to create tar file\"\n \n+cd \"$here\"\n+rm -rf \"$vroot_dir\"\n+\n exit 0\n",
    "prefixes": [
        "v7",
        "2/6"
    ]
}