get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 808588,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/808588/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20170901085753.7877-1-judge.packham@gmail.com/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170901085753.7877-1-judge.packham@gmail.com>",
    "list_archive_url": null,
    "date": "2017-09-01T08:57:53",
    "name": "[U-Boot,v3] patman: add support for omitting bouncing addresses",
    "commit_ref": "e11aa602abd3e8007dfd3ed23ebb829101abcfec",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "75e8312ceef5f694377784103f8aa6deb9e14fe4",
    "submitter": {
        "id": 6125,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/6125/?format=api",
        "name": "Chris Packham",
        "email": "judge.packham@gmail.com"
    },
    "delegate": {
        "id": 3184,
        "url": "http://patchwork.ozlabs.org/api/1.2/users/3184/?format=api",
        "username": "sjg",
        "first_name": "Simon",
        "last_name": "Glass",
        "email": "sjg@chromium.org"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20170901085753.7877-1-judge.packham@gmail.com/mbox/",
    "series": [
        {
            "id": 976,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/976/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=976",
            "date": "2017-09-01T08:57:53",
            "name": "[U-Boot,v3] patman: add support for omitting bouncing addresses",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/976/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/808588/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/808588/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"DQf3woFe\"; dkim-atps=neutral"
        ],
        "Received": [
            "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xkCnp3Ryfz9t2r\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 18:58:21 +1000 (AEST)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid B9FA3C21ED6; Fri,  1 Sep 2017 08:58:14 +0000 (UTC)",
            "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 7BA3EC21DAA;\n\tFri,  1 Sep 2017 08:58:11 +0000 (UTC)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 76C96C21DAA; Fri,  1 Sep 2017 08:58:10 +0000 (UTC)",
            "from mail-pf0-f194.google.com (mail-pf0-f194.google.com\n\t[209.85.192.194])\n\tby lists.denx.de (Postfix) with ESMTPS id 1AA45C21C51\n\tfor <u-boot@lists.denx.de>; Fri,  1 Sep 2017 08:58:09 +0000 (UTC)",
            "by mail-pf0-f194.google.com with SMTP id a2so1292306pfj.4\n\tfor <u-boot@lists.denx.de>; Fri, 01 Sep 2017 01:58:09 -0700 (PDT)",
            "from chrisp-dl.ws.atlnz.lc ([2001:df5:b000:22:3a2c:4aff:fe70:2b02])\n\tby smtp.gmail.com with ESMTPSA id\n\td196sm2488308pfd.95.2017.09.01.01.58.02\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tFri, 01 Sep 2017 01:58:05 -0700 (PDT)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,\n\tT_DKIM_INVALID autolearn=unavailable\n\tautolearn_force=no version=3.4.0",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=veCxV5qxg99zaUo3u3hWueIi5O60RUymiX64MJc146w=;\n\tb=DQf3woFena8ISvoru9RshNCI3DYXi5N69wJI5rPdtKBUfDel7PMVEW/cwXt2OtZ8WT\n\ta5UgGa5PArqEWLHda2qOzlhRGzwxRNAm5Vhn75wsmvjeUv8rT+t+Dob0iRZv2Pun8ZwV\n\tqFU8L/9ZVCx0wvD2d/lSWUzV35ZM4bT33Go+tDbYfJiVY83a/WSRV5XgE4rl+DJ7RRJ9\n\tLmTfhXurO0c2jQq5y7cvzJsTKu5C/iZWGEYvfmdXuW3XF6YHzmLjOvbUxIxIAvJTqN/O\n\t3OK0v53L7XVnnMH0vU7TCDcB5VZUKtOHW8vD9pznw+HWEXFmkCPb1k0J8wPCg13pJ0k7\n\tkakg==",
        "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;\n\tbh=veCxV5qxg99zaUo3u3hWueIi5O60RUymiX64MJc146w=;\n\tb=Ns7FWtsfc0e6ge9Nu1N9IfrILOZFm9EExT+j35qOdV7ixoqQQ2318aUJzL+gbjNCS2\n\tAIH5VQ04SFwCdw0D8zXtNy9MaPkWXb408c/AibpxeRUgi3MknbnQR6DmelbV+mnOerhy\n\tRKlSnqAJZ8VBgDEve4FEbE9tnVYadapv2o2cwW99W2zlxbqDH8kzf2g2UauRbhDavJYj\n\tEMzQz6ulTQDA2xkWdNFOI/gYi/JoygkEK3+/91498jJGHQLxiCMjxR8bi7wIS1Ex7Hdv\n\tqN8hJI+ccyqeGyZw/qvIYKNZ9OMSQKaTJPFTE9isGOc1li9axIDPwCXEjNDFF7ncw3az\n\t24+Q==",
        "X-Gm-Message-State": "AHPjjUjfGBU9eriemCHWu2bimUtRzYqaJJ4fXAiYJoqphZ10GEMl9GnA\n\tCAQFsDq3sWAeyt/CNak=",
        "X-Google-Smtp-Source": "ADKCNb5C51H/hMQbPpHK/p9r03XjHC1jWv/EcXx77jm/U5cRHkPw7ObbUB0wPgNXO4tAIV/O0xADfg==",
        "X-Received": "by 10.99.96.69 with SMTP id u66mr1525900pgb.265.1504256287139;\n\tFri, 01 Sep 2017 01:58:07 -0700 (PDT)",
        "From": "Chris Packham <judge.packham@gmail.com>",
        "To": "u-boot@lists.denx.de",
        "Date": "Fri,  1 Sep 2017 20:57:53 +1200",
        "Message-Id": "<20170901085753.7877-1-judge.packham@gmail.com>",
        "X-Mailer": "git-send-email 2.14.1",
        "Cc": "Chris Packham <judge.packham@gmail.com>",
        "Subject": "[U-Boot] [PATCH v3] patman: add support for omitting bouncing\n\taddresses",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.18",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>"
    },
    "content": "Add support for reading a list of bouncing addresses from a in-tree file\n(doc/bounces) and from the ~/.patman config file. These addresses are\nstripped from the Cc list.\n\nSigned-off-by: Chris Packham <judge.packham@gmail.com>\nReviewed-by: Simon Glass <sjg@chromium.org>\n---\nThis version supports an in-tree doc/bounces file as well as a section\nin the .patman config file. A slight annoyance is the config file parser\nexpects key: value pairs whereas the bounces file is just a flat list. I\nstarted looking a modeling this after the aliases but then I actually\nthought that if we do want to tag someone as a bouncing address we\nprobably want to be explicit about it.\n\nChanges in v3:\n- print addresses that are skipped\n- add review from Simon\n\nChanges in v2:\n- better integration with existing configuration\n- documentation\n\n doc/bounces              |  3 +++\n tools/patman/README      | 12 ++++++++++++\n tools/patman/series.py   |  5 +++++\n tools/patman/settings.py | 18 ++++++++++++++++++\n 4 files changed, 38 insertions(+)\n create mode 100644 doc/bounces",
    "diff": "diff --git a/doc/bounces b/doc/bounces\nnew file mode 100644\nindex 000000000000..d1c5f0d246eb\n--- /dev/null\n+++ b/doc/bounces\n@@ -0,0 +1,3 @@\n+# List of addresses picked up by patman/get_maintainer.pl that are known to\n+# bounce. Addresses are listed one per line and need to match the author\n+# information recorded in git.\ndiff --git a/tools/patman/README b/tools/patman/README\nindex e36857dedea1..8582ed6ba12c 100644\n--- a/tools/patman/README\n+++ b/tools/patman/README\n@@ -84,6 +84,18 @@ Aliases are recursive.\n The checkpatch.pl in the U-Boot tools/ subdirectory will be located and\n used. Failing that you can put it into your path or ~/bin/checkpatch.pl\n \n+If you want to avoid sending patches to email addresses that are picked up\n+by patman but are known to bounce you can add a [bounces] section to your\n+.patman file. Unlike the [alias] section these are simple key: value pairs\n+that are not recursive.\n+\n+>>>\n+\n+[bounces]\n+gonefishing: Fred Bloggs <f.bloggs@napier.net>\n+\n+<<<\n+\n \n If you want to change the defaults for patman's command-line arguments,\n you can add a [settings] section to your .patman file.  This can be used\ndiff --git a/tools/patman/series.py b/tools/patman/series.py\nindex d3947a7c2ac5..73ee39448614 100644\n--- a/tools/patman/series.py\n+++ b/tools/patman/series.py\n@@ -10,6 +10,7 @@ import os\n \n import get_maintainer\n import gitutil\n+import settings\n import terminal\n \n # Series-xxx tags that we understand\n@@ -218,6 +219,7 @@ class Series(dict):\n         Return:\n             Filename of temp file created\n         \"\"\"\n+        col = terminal.Color()\n         # Look for commit tags (of the form 'xxx:' at the start of the subject)\n         fname = '/tmp/patman.%d' % os.getpid()\n         fd = open(fname, 'w')\n@@ -233,6 +235,9 @@ class Series(dict):\n                 cc += add_maintainers\n             elif add_maintainers:\n                 cc += get_maintainer.GetMaintainer(commit.patch)\n+            for x in set(cc) & set(settings.bounces):\n+                print(col.Color(col.YELLOW, 'Skipping \"%s\"' % x))\n+            cc = set(cc) - set(settings.bounces)\n             cc = [m.encode('utf-8') if type(m) != str else m for m in cc]\n             all_ccs += cc\n             print(commit.patch, ', '.join(set(cc)), file=fd)\ndiff --git a/tools/patman/settings.py b/tools/patman/settings.py\nindex 5f207f5ef1c4..d735ff9ba3c6 100644\n--- a/tools/patman/settings.py\n+++ b/tools/patman/settings.py\n@@ -269,6 +269,19 @@ def _ReadAliasFile(fname):\n         if bad_line:\n             print(bad_line)\n \n+def _ReadBouncesFile(fname):\n+    \"\"\"Read in the bounces file if it exists\n+\n+    Args:\n+        fname: Filename to read.\n+    \"\"\"\n+    if os.path.exists(fname):\n+        with open(fname) as fd:\n+            for line in fd:\n+                if line.startswith('#'):\n+                    continue\n+                bounces.add(line.strip())\n+\n def Setup(parser, project_name, config_fname=''):\n     \"\"\"Set up the settings module by reading config files.\n \n@@ -293,10 +306,15 @@ def Setup(parser, project_name, config_fname=''):\n     for name, value in config.items('alias'):\n         alias[name] = value.split(',')\n \n+    _ReadBouncesFile('doc/bounces')\n+    for name, value in config.items('bounces'):\n+        bounces.add(value)\n+\n     _UpdateDefaults(parser, config)\n \n # These are the aliases we understand, indexed by alias. Each member is a list.\n alias = {}\n+bounces = set()\n \n if __name__ == \"__main__\":\n     import doctest\n",
    "prefixes": [
        "U-Boot",
        "v3"
    ]
}