get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 557301,
    "url": "http://patchwork.ozlabs.org/api/patches/557301/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openwrt/patch/owrt-patch-20151216-7@vittgam.net/",
    "project": {
        "id": 45,
        "url": "http://patchwork.ozlabs.org/api/projects/45/?format=api",
        "name": "OpenWrt development",
        "link_name": "openwrt",
        "list_id": "openwrt-devel.lists.openwrt.org",
        "list_email": "openwrt-devel@lists.openwrt.org",
        "web_url": "http://openwrt.org/",
        "scm_url": "git://git.openwrt.org/openwrt.git",
        "webscm_url": "https://dev.openwrt.org/browser",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<owrt-patch-20151216-7@vittgam.net>",
    "list_archive_url": null,
    "date": "2015-12-16T04:42:39",
    "name": "[OpenWrt-Devel] lantiq: Fix LED handling.",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "1a8074044f05610189b275401da609c2d51da93b",
    "submitter": {
        "id": 65409,
        "url": "http://patchwork.ozlabs.org/api/people/65409/?format=api",
        "name": "Vittorio Gambaletta",
        "email": "openwrt@vittgam.net"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/openwrt/patch/owrt-patch-20151216-7@vittgam.net/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/557301/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/557301/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<openwrt-devel-bounces@lists.openwrt.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Received": [
            "from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 102621402C4\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 16 Dec 2015 15:49:11 +1100 (AEDT)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id 6337928C12F;\n\tWed, 16 Dec 2015 05:43:54 +0100 (CET)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id 140772841E4\n\tfor <openwrt-devel@lists.openwrt.org>;\n\tWed, 16 Dec 2015 05:42:36 +0100 (CET)",
            "from mail.vittgam.net (server1.vittgam.net [213.239.197.142])\n\tby arrakis.dune.hu (Postfix) with ESMTPS\n\tfor <openwrt-devel@lists.openwrt.org>;\n\tWed, 16 Dec 2015 05:42:26 +0100 (CET)",
            "from mail2.vittgam.net (server2.tincvpn.vittgam.net [10.48.0.5])\n\tby mail.vittgam.net with ESMTP id tBG4gdLS052067\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO);\n\tWed, 16 Dec 2015 05:42:40 +0100",
            "from vl2 (vl2.r12.network.mietitrebbia.rocks [10.48.6.146])\n\tby mail2.vittgam.net with SMTP id tBG4g5Jx005523;\n\tWed, 16 Dec 2015 05:42:39 +0100"
        ],
        "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (4096-bit key;\n\tunprotected) header.d=vittgam.net header.i=@vittgam.net\n\theader.b=M0S0bvH6; dkim-atps=neutral",
        "X-Spam-Checker-Version": "SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,\n\tT_DKIM_INVALID autolearn=unavailable version=3.3.2",
        "X-policyd-weight": "using cached result; rate:hard: -7.6",
        "X-DKIM": "OpenDKIM Filter v2.4.2 mail.vittgam.net tBG4gdLS052067",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=vittgam.net;\n\ts=20150519; t=1450240960;\n\tbh=7hrjxQID6huAKcg9d8iLj2NDBEqQFjjHtBq4yn42rHA=;\n\th=Date:From:To:Subject:Content-Type:Message-ID;\n\tb=M0S0bvH61k2CbcxWoBzW1H1EREcXSqRRcsDl016slRgc6eYKKEhSKEbp5lMjYBjdT\n\teXMvl2IV6pG6dj+pX45TBE5ifW1xKP3w1c/BKsnuCe0HF4e91rDfLaiSoVI43hkqmC\n\tQbmU1f8+mRT/eB9KrOVyrM6dhYKUZCuCDJwHWkkgwDTZ+TCzxJGjzlHR82bJcgG8mj\n\tjhfXXUZc9X1XCRbippbcTkRWYE2ff7vP4uZc3gIZg9H0Uo1klrh3st3hby/WzrlYgf\n\tI9fqIMxzCad3dtmFx2McE6jf72iZhMRdhqHiDbQF5tlWqrBgVNSQ6vBVTcEjsGGbLm\n\tKpUZr4cY9b6M+Gco93ebGafNOvDH5AXpR+Pb1tV+JFg2MDGoO0TwOsXodPKrK7mawu\n\tIUxUOip+ZQH0OAUjkkzWeHx3Hlp3m41373AFGb+1zbZp4k+PWH6GA1O2nbrrmhSn8j\n\tUbPBJ4f30zV3j75WDm3gth82w0eplOFmnj+sbiiQWUs84skFb3PSPVTDr1jFeu5qlv\n\tkaNzd/TPOUPYqALrFnNuXVK7+1Z97rWtqLzbNHo4BdfAFgHUxEQQP7AFjULRwO9YG0\n\tqOs6tNyNWC9e3J3OmDIlc05wwef/CBE7nfngmB124K199VWSERKt8XN5ItqJayxyL2\n\tqxyjfwIrTHyPa9PqRSr106Ds=",
        "Date": "Wed, 16 Dec 2015 05:42:39 +0100",
        "From": "\"Vittorio G (VittGam)\" <openwrt@vittgam.net>",
        "To": "<openwrt-devel@lists.openwrt.org>",
        "Message-ID": "<owrt-patch-20151216-7@vittgam.net>",
        "Subject": "[OpenWrt-Devel] [PATCH] lantiq: Fix LED handling.",
        "X-BeenThere": "openwrt-devel@lists.openwrt.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "OpenWrt Development List <openwrt-devel.lists.openwrt.org>",
        "List-Unsubscribe": "<https://lists.openwrt.org/cgi-bin/mailman/options/openwrt-devel>,\n\t<mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.openwrt.org/pipermail/openwrt-devel/>",
        "List-Post": "<mailto:openwrt-devel@lists.openwrt.org>",
        "List-Help": "<mailto:openwrt-devel-request@lists.openwrt.org?subject=help>",
        "List-Subscribe": "<https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel>,\n\t<mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "openwrt-devel-bounces@lists.openwrt.org",
        "Sender": "\"openwrt-devel\" <openwrt-devel-bounces@lists.openwrt.org>"
    },
    "content": "- Use common OpenWrt blink patterns instead of custom ones\n- Add preinit_regular hook\n- Handle the TDW89X0 that does not have a configurable power LED\n\nSigned-off-by: Vittorio Gambaletta <openwrt@vittgam.net>\n\n---",
    "diff": "--- a/target/linux/lantiq/base-files/etc/diag.sh\n+++ b/target/linux/lantiq/base-files/etc/diag.sh\n@@ -3,40 +3,48 @@\n \n . /lib/functions/leds.sh\n \n-status_led=\"power\"\n+status_led=power\n+[ ! -d /sys/class/leds/power/ ] && [ ! -d /sys/class/leds/power1/ ] && [ ! -d /sys/class/leds/power2/ ] && [ -d /sys/class/leds/wps/ ] && status_led=wps\n \n set_state() {\n-\t[ -d /sys/class/leds/power2/ ] && {\n-\n-\t\tcase \"$1\" in\n-\t\tpreinit)\n-\t\t\tled_set_attr \"power2\" \"trigger\" \"heartbeat\"\n-\t\t\tstatus_led_on\n-\t\t\t;;\n-\t\tfailsafe)\n-\t\t\tled_off \"power2\"\n-\t\t\tstatus_led_set_timer 100 100\n-\t\t\t;;\n-\t\tdone)\n-\t\t\tled_off \"power2\"\n-\t\t\t;;\n-\t\tesac\n-\t\treturn\n-\t}\n-\n \tcase \"$1\" in\n \tpreinit)\n-\t\tstatus_led_set_heartbeat\n+\t\tif [ -d /sys/class/leds/power2/ ]; then\n+\t\t\tstatus_led_on\n+\t\t\tstatus_led=power2\n+\t\t\tstatus_led_blink_preinit\n+\t\t\tstatus_led=power\n+\t\telse\n+\t\t\tstatus_led_blink_preinit\n+\t\tfi\n \t\t;;\n \tfailsafe)\n-\t\t[ -d /sys/class/leds/power1 ] && {\n+\t\tif [ -d /sys/class/leds/power2/ ]; then\n+\t\t\tled_off power2\n+\t\t\tstatus_led_blink_failsafe\n+\t\telif [ -d /sys/class/leds/power1/ ]; then\n \t\t\tstatus_led_off\n-\t\t\tled_timer \"power1\" 100 100\n-\t\t} || status_led_set_timer 100 100\n+\t\t\tstatus_led=power1\n+\t\t\tstatus_led_blink_failsafe\n+\t\t\tstatus_led=power\n+\t\telse\n+\t\t\tstatus_led_blink_failsafe\n+\t\tfi\n+\t\t;;\n+\tpreinit_regular)\n+\t\tif [ -d /sys/class/leds/power2/ ]; then\n+\t\t\tstatus_led_on\n+\t\t\tstatus_led=power2\n+\t\t\tstatus_led_blink_preinit_regular\n+\t\t\tstatus_led=power\n+\t\telse\n+\t\t\tstatus_led_blink_preinit_regular\n+\t\tfi\n \t\t;;\n \tdone)\n \t\tstatus_led_on\n-\t\tled_off \"power1\"\n+\t\tled_off power1\n+\t\tled_off power2\n \t\t;;\n \tesac\n }\n",
    "prefixes": [
        "OpenWrt-Devel"
    ]
}