get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 966463,
    "url": "http://patchwork.ozlabs.org/api/patches/966463/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openwrt/patch/20180905154036.24318-2-yszhou4tech@gmail.com/",
    "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": "<20180905154036.24318-2-yszhou4tech@gmail.com>",
    "list_archive_url": null,
    "date": "2018-09-05T15:40:36",
    "name": "[OpenWrt-Devel,2/2] scripts/package-metadata.pl: prefer $vdep with the same name as $depend",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "d011ae6f6ce90750d31592ac4c8d77c305230de3",
    "submitter": {
        "id": 65295,
        "url": "http://patchwork.ozlabs.org/api/people/65295/?format=api",
        "name": "Yousong Zhou",
        "email": "yszhou4tech@gmail.com"
    },
    "delegate": {
        "id": 54624,
        "url": "http://patchwork.ozlabs.org/api/users/54624/?format=api",
        "username": "yousong",
        "first_name": "Yousong",
        "last_name": "Zhou",
        "email": "yszhou4tech@gmail.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/openwrt/patch/20180905154036.24318-2-yszhou4tech@gmail.com/mbox/",
    "series": [
        {
            "id": 64265,
            "url": "http://patchwork.ozlabs.org/api/series/64265/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/openwrt/list/?series=64265",
            "date": "2018-09-05T15:40:36",
            "name": "[OpenWrt-Devel,1/2] scripts/metadata.pm: avoid adding dup names in provides list",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/64265/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/966463/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/966463/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.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=lists.openwrt.org\n\t(client-ip=198.137.202.133; helo=bombadil.infradead.org;\n\tenvelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=gmail.com",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"J8GPmiix\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"rYPW2Ocq\"; dkim-atps=neutral"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n\t[198.137.202.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4257Gr2bZQz9sD2\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  6 Sep 2018 01:41:40 +1000 (AEST)",
            "from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))\n\tid 1fxZvy-0007YC-5Q; Wed, 05 Sep 2018 15:41:34 +0000",
            "from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642])\n\tby bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat\n\tLinux)) id 1fxZva-0007JH-6J\n\tfor openwrt-devel@lists.openwrt.org; Wed, 05 Sep 2018 15:41:11 +0000",
            "by mail-pl1-x642.google.com with SMTP id b30-v6so1199929pla.0\n\tfor <openwrt-devel@lists.openwrt.org>;\n\tWed, 05 Sep 2018 08:40:59 -0700 (PDT)",
            "from titan.hq.cloud.yunionyun.com ([47.52.22.109])\n\tby smtp.gmail.com with ESMTPSA id\n\tl9-v6sm2987993pgg.79.2018.09.05.08.40.57\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 05 Sep 2018 08:40:58 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:\n\tList-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References:\n\tIn-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=hWDkgTfWI6oFlMtYFEDDggq6zrxih9SsLk1gd6J2tbY=;\n\tb=J8GPmiixzY71gy\n\tvLm23XSwBxAVikCIOaUK2qZFSTWnLqudhdUDQH9TTy4A8HaqVnzlq76rxWwWBiSjhQwIwIPfY2qPS\n\twfdKPjvh6eXEbdDfPxw4rGEBKtkMjW5GuWWIBlC5pmR2pWKkI1kasmI13LJn2rhg702j4WZEm9rYw\n\tEYE7ZFmpFC9DKbSO9eZX9G9S2ZKcaa2GUY7E2EEmNQSLUoy7RI+Iljj6C1u2pZvGEGoDRCoj1e7ur\n\tRSRy66i0OiCVfJYpbONeiKnF2du9UZa8pshFsorQYBYnNlXhjL5d3YIo7CN5TresHs8xA7QcAN7Ld\n\tqq6WVpZjrdz8to8+aZwg==;",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=IfL8SoLSeilnDdSv2nTtS3t0mblcCctT6aL34494rMw=;\n\tb=rYPW2OcqaZLkMxJieW2fm84kiI/On8G4XGL3AoHbiM5L4Am2LnqhYb2tUL/QsF9TjY\n\tqSGB8XB7Pe7tj6d0OyQxWKKQ9n9+VxLPO7BDvC9ewJ5Gk5nSqZaCIj/ZB0BQXkx6jEU6\n\tO7M+lEq1qK0DDb9mXgnnaWCd0BSd9wqFUtdFtwLz13tMHf1Ly41qp/0tfJ2DYBoa6zBl\n\twJherTtjkzMPPTdOT8GN5bsW8kOfkOhvoMiQD54ICMuOTOuFMofSCEnhr+znl3lYTzRA\n\tZoRxplA0udSWXwTQsH3ZbSManUcI8NMyAlkE/+juCYo79vX3+4YiyEZKn+byk1Iufumr\n\tMeOw=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=IfL8SoLSeilnDdSv2nTtS3t0mblcCctT6aL34494rMw=;\n\tb=snYLPzHzd2vz+JuCOp3nq7iXTyABZolFIK0/5pcONDHQQBqznqRH46H6aiA3ktCKbj\n\t5vxp2v3+sS1r+CS50Nuohn9Klu0CtXHzLPHQKphB6iNEIi6M/JST8P9f0q+YfIWapHG7\n\t2vDI2PmJ2RDA3rJZmSMhHsCO22NsyyjJGsdjqQcW4aJb2TGO/FIZICOQaP9NQM4gKxrb\n\tVCDC+2XbmhlE1WE6+K35OJTG0oRRH7VCwbOZbEsE3tnRhkQsQCFD9k5Q5VG6aSZAfExU\n\tNZU5X1lg7EM52l89xfkCEMMTjBCLzXp07Cs7G4G/U3K4zr/hHz2+/jwFpPy3kO0UFMR8\n\t5+kw==",
        "X-Gm-Message-State": "APzg51Buc87zYaZce2UORGDYlEcJY1WHJsiQMo6fUL6LHUT2eftPq6G1\n\t1/mYuR9lJXhcjTAWO5Vx9nR0l37NDuA=",
        "X-Google-Smtp-Source": "ANB0VdaBZVER2RIOkyBHGqPruy+AM362ZPLsbHfPkGiQQXyS0xi8hhK1mZeofvB9nB7gD6XRn3KKZw==",
        "X-Received": "by 2002:a17:902:290a:: with SMTP id\n\tg10-v6mr39594469plb.110.1536162059195; \n\tWed, 05 Sep 2018 08:40:59 -0700 (PDT)",
        "From": "Yousong Zhou <yszhou4tech@gmail.com>",
        "To": "openwrt-devel@lists.openwrt.org",
        "Date": "Wed,  5 Sep 2018 15:40:36 +0000",
        "Message-Id": "<20180905154036.24318-2-yszhou4tech@gmail.com>",
        "In-Reply-To": "<20180905154036.24318-1-yszhou4tech@gmail.com>",
        "References": "<20180905154036.24318-1-yszhou4tech@gmail.com>",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20180905_084110_252494_B0C79CD3 ",
        "X-CRM114-Status": "GOOD (  10.54  )",
        "X-Spam-Score": "-0.1 (/)",
        "X-Spam-Report": "SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-0.1 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2607:f8b0:4864:20:0:0:0:642 listed in] [list.dnswl.org]\n\t0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\n\tprovider (yszhou4tech[at]gmail.com)\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain",
        "Subject": "[OpenWrt-Devel] [PATCH 2/2] scripts/package-metadata.pl: prefer\n\t$vdep with the same name as $depend",
        "X-BeenThere": "openwrt-devel@lists.openwrt.org",
        "X-Mailman-Version": "2.1.21",
        "Precedence": "list",
        "List-Id": "<openwrt-devel.lists.openwrt.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/openwrt-devel>, \n\t<mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.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": "<http://lists.infradead.org/mailman/listinfo/openwrt-devel>, \n\t<mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe>",
        "Cc": "Yousong Zhou <yszhou4tech@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "\"openwrt-devel\" <openwrt-devel-bounces@lists.openwrt.org>",
        "Errors-To": "openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org"
    },
    "content": "The need arises when userspace package \"openvswitch\" selects\n\"kmod-openvswitch\" which will be provided by both \"kmod-openvswitch\" and\n\"kmod-openvswitch-intree\".  In this case, we want it to prefer the\npackage with the same name as with virtual package\n\nSigned-off-by: Yousong Zhou <yszhou4tech@gmail.com>\n---\n scripts/package-metadata.pl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl\nindex 53bb45a62c..54c1a5dc9f 100755\n--- a/scripts/package-metadata.pl\n+++ b/scripts/package-metadata.pl\n@@ -181,7 +181,7 @@ sub mconf_depends {\n \n \t\t\t\tforeach my $v (@$vdep) {\n \t\t\t\t\tnext if $v->{buildonly};\n-\t\t\t\t\tif ($v->{variant_default}) {\n+\t\t\t\t\tif ($v->{variant_default} || $v->{name} eq $depend) {\n \t\t\t\t\t\tunshift @vdeps, $v->{name};\n \t\t\t\t\t} else {\n \t\t\t\t\t\tpush @vdeps, $v->{name};\n",
    "prefixes": [
        "OpenWrt-Devel",
        "2/2"
    ]
}