get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 453146,
    "url": "http://patchwork.ozlabs.org/api/patches/453146/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/buildroot/patch/b74adb73680d401a14a0841f4e09aa8a0b888116.1427037564.git.yann.morin.1998@free.fr/",
    "project": {
        "id": 27,
        "url": "http://patchwork.ozlabs.org/api/projects/27/?format=api",
        "name": "Buildroot development",
        "link_name": "buildroot",
        "list_id": "buildroot.buildroot.org",
        "list_email": "buildroot@buildroot.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<b74adb73680d401a14a0841f4e09aa8a0b888116.1427037564.git.yann.morin.1998@free.fr>",
    "list_archive_url": null,
    "date": "2015-03-22T15:21:03",
    "name": "[4/7,v3] support/download: return different exit codes for different failures",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "a6edc8699921eccd6731189a390fc2e592b31962",
    "submitter": {
        "id": 13903,
        "url": "http://patchwork.ozlabs.org/api/people/13903/?format=api",
        "name": "Yann E. MORIN",
        "email": "yann.morin.1998@free.fr"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/buildroot/patch/b74adb73680d401a14a0841f4e09aa8a0b888116.1427037564.git.yann.morin.1998@free.fr/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/453146/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/453146/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<buildroot-bounces@busybox.net>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "buildroot@lists.busybox.net"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "buildroot@osuosl.org"
        ],
        "Received": [
            "from silver.osuosl.org (silver.osuosl.org [140.211.166.136])\n\tby ozlabs.org (Postfix) with ESMTP id BF970140146\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 23 Mar 2015 02:21:30 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 0B2D432912;\n\tSun, 22 Mar 2015 15:21:30 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id hpAuK5dMGTuu; Sun, 22 Mar 2015 15:21:25 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 2290F2FBF5;\n\tSun, 22 Mar 2015 15:21:22 +0000 (UTC)",
            "from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id C0A431C2097\n\tfor <buildroot@lists.busybox.net>;\n\tSun, 22 Mar 2015 15:21:16 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id BC63EA29EA\n\tfor <buildroot@lists.busybox.net>;\n\tSun, 22 Mar 2015 15:21:16 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id N7RqTtlGTWKP for <buildroot@lists.busybox.net>;\n\tSun, 22 Mar 2015 15:21:14 +0000 (UTC)",
            "from mail-wi0-f181.google.com (mail-wi0-f181.google.com\n\t[209.85.212.181])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 8E739A2991\n\tfor <buildroot@buildroot.org>; Sun, 22 Mar 2015 15:21:14 +0000 (UTC)",
            "by wibgn9 with SMTP id gn9so37115823wib.1\n\tfor <buildroot@buildroot.org>; Sun, 22 Mar 2015 08:21:13 -0700 (PDT)",
            "from gourin.bzh.lan (ns304657.ip-46-105-103.eu. [46.105.103.66])\n\tby mx.google.com with ESMTPSA id\n\t14sm15244710wjv.29.2015.03.22.08.21.11\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tSun, 22 Mar 2015 08:21:12 -0700 (PDT)"
        ],
        "Authentication-Results": "ozlabs.org; dkim=fail\n\treason=\"verification failed; unprotected key\"\n\theader.d=gmail.com header.i=@gmail.com header.b=kdDz1B7Q;\n\tdkim-adsp=none (unprotected policy); dkim-atps=neutral",
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=lynzbwX85zbrpb6ra26h4OlCg+p47cp4qR16f5q8ihY=;\n\tb=kdDz1B7QbOkPKhQYSHSXElnXvCnUv2TgG8yIdYZvz47uiw4L7rDks4fKmxlNnpUOn3\n\tjyVGWGrzhAO2CSPjSNrqujGrCtUQ4Ur6n2z0xgFar5oITTZoDy0fcagV3SmUGJ7tYlz4\n\t2V/T5fG702QpiqytdjZ/Y22llNUqYIiL06hO2bkcLo9Un1SdmyQdLR1EF1NWHwHbnhxO\n\tgZbQ+5CmHAW0bbun3NpDht57/PMrSjrQFWpBuHQeyYg9Qgiior8PGQ0si4ApgNTYfGIx\n\twkvIK19QRyDWqryw/7SexPO5rJikoTXT3SjzPrmD3PWQnphqq0t4nPFFCEEZAqQS8Tbc\n\tBbxw==",
        "X-Received": "by 10.194.156.202 with SMTP id\n\twg10mr180518823wjb.70.1427037673046; \n\tSun, 22 Mar 2015 08:21:13 -0700 (PDT)",
        "From": "\"Yann E. MORIN\" <yann.morin.1998@free.fr>",
        "To": "buildroot@buildroot.org",
        "Date": "Sun, 22 Mar 2015 16:21:03 +0100",
        "Message-Id": "<b74adb73680d401a14a0841f4e09aa8a0b888116.1427037564.git.yann.morin.1998@free.fr>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<cover.1427037564.git.yann.morin.1998@free.fr>",
        "References": "<cover.1427037564.git.yann.morin.1998@free.fr>",
        "Cc": "Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\t\"Yann E. MORIN\" <yann.morin.1998@free.fr>",
        "Subject": "[Buildroot] [PATCH 4/7 v3] support/download: return different exit\n\tcodes for different failures",
        "X-BeenThere": "buildroot@busybox.net",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Discussion and development of buildroot <buildroot.busybox.net>",
        "List-Unsubscribe": "<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>",
        "List-Archive": "<http://lists.busybox.net/pipermail/buildroot/>",
        "List-Post": "<mailto:buildroot@busybox.net>",
        "List-Help": "<mailto:buildroot-request@busybox.net?subject=help>",
        "List-Subscribe": "<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "buildroot-bounces@busybox.net",
        "Sender": "\"buildroot\" <buildroot-bounces@busybox.net>"
    },
    "content": "Return different exit codes depending on the error that occured:\n\n  0: no error (hash file missing, or all hashes match)\n  1: unknown option\n  2: hash file exists, but at least one hash in error\n  3: hash file exists, but no hash for file to check\n  4: hash file exists, but at least one hash type unknown\n\nThis will be used in a later patch to decide whether the downloaded file\nshould be kept or removed.\n\nSigned-off-by: \"Yann E. MORIN\" <yann.morin.1998@free.fr>\nCc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nCc: Samuel Martin <s.martin49@gmail.com>\nCc: Arnout Vandecappelle <arnout@mind.be>\n\n---\nChanges v2 -> v3:\n  - further differentiate errors for unknown hashes and unknown\n    command-line options  (Arnout)\n\nChanges v1 -> v2:\n  - typoes in script and commit  (Samuel)\n---\n support/download/check-hash | 15 ++++++++++++---\n 1 file changed, 12 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/support/download/check-hash b/support/download/check-hash\nindex d0a4ab9..0234ab0 100755\n--- a/support/download/check-hash\n+++ b/support/download/check-hash\n@@ -9,6 +9,15 @@ set -e\n #   $3: the final basename of the file, to which it will be ultimately\n #       saved as, to be able to match it to the corresponding hashes\n #       in the .hash file\n+#\n+# Exit codes:\n+#   0:  the hash file exists and the file to check matches all its hashes,\n+#       or the hash file does not exist\n+#   1:  unknown command-line option\n+#   2:  the hash file exists and the file to check does not match at least\n+#       of its hashes\n+#   3:  the hash file exists and there was no hash to check the file against\n+#   4:  the hash file exists and at least one hash type is unknown\n \n while getopts :q OPT; do\n     case \"${OPT}\" in\n@@ -46,7 +55,7 @@ check_one_hash() {\n         *) # Unknown hash, exit with error\n             printf \"ERROR: unknown hash '%s' for '%s'\\n\"  \\\n                    \"${_h}\" \"${base}\" >&2\n-            exit 1\n+            exit 4\n             ;;\n     esac\n \n@@ -62,7 +71,7 @@ check_one_hash() {\n     printf \"ERROR: got     : %s\\n\" \"${_hash}\" >&2\n     printf \"ERROR: Incomplete download, or man-in-the-middle (MITM) attack\\n\" >&2\n \n-    exit 1\n+    exit 2\n }\n \n # Do we know one or more hashes for that file?\n@@ -85,7 +94,7 @@ done <\"${h_file}\"\n if [ ${nb_checks} -eq 0 ]; then\n     if [ -n \"${BR2_ENFORCE_CHECK_HASH}\" ]; then\n         printf \"ERROR: No hash found for %s\\n\" \"${base}\" >&2\n-        exit 1\n+        exit 3\n     else\n         printf \"WARNING: No hash found for %s\\n\" \"${base}\" >&2\n     fi\n",
    "prefixes": [
        "4/7",
        "v3"
    ]
}