get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 797710,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/797710/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20170804093030.73856-1-sjg@chromium.org/",
    "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": "<20170804093030.73856-1-sjg@chromium.org>",
    "list_archive_url": null,
    "date": "2017-08-04T09:30:30",
    "name": "[U-Boot] genconfig.py: Print defconfig next to warnings",
    "commit_ref": "8639f69a61b47971dba47ab5ed72e47436729bb1",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "a0a62b9d505aef23fdf8cbb0d4147c3303a15762",
    "submitter": {
        "id": 6170,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/6170/?format=api",
        "name": "Simon Glass",
        "email": "sjg@chromium.org"
    },
    "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/20170804093030.73856-1-sjg@chromium.org/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/797710/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/797710/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=google.com header.i=@google.com\n\theader.b=\"Gh2AD78e\"; dkim-atps=neutral"
        ],
        "Received": [
            "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xP1rC5hx6z9s7F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  4 Aug 2017 19:30:51 +1000 (AEST)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 8712BC21DF0; Fri,  4 Aug 2017 09:30:44 +0000 (UTC)",
            "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 5122FC21C2B;\n\tFri,  4 Aug 2017 09:30:42 +0000 (UTC)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid C0844C21C2B; Fri,  4 Aug 2017 09:30:40 +0000 (UTC)",
            "from mail-oi0-f41.google.com (mail-oi0-f41.google.com\n\t[209.85.218.41])\n\tby lists.denx.de (Postfix) with ESMTPS id 1B392C21C26\n\tfor <u-boot@lists.denx.de>; Fri,  4 Aug 2017 09:30:40 +0000 (UTC)",
            "by mail-oi0-f41.google.com with SMTP id d71so10336571oih.0\n\tfor <u-boot@lists.denx.de>; Fri, 04 Aug 2017 02:30:40 -0700 (PDT)",
            "from kiwi.bld.corp.google.com ([100.101.164.89])\n\tby smtp.gmail.com with ESMTPSA id\n\tc22sm1142852oig.27.2017.08.04.02.30.37\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 04 Aug 2017 02:30:37 -0700 (PDT)",
            "by kiwi.bld.corp.google.com (Postfix, from userid 121222)\n\tid BB635140B0D; Fri,  4 Aug 2017 03:30:36 -0600 (MDT)"
        ],
        "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=RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\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=google.com;\n\ts=20161025; h=sender:from:to:cc:subject:date:message-id;\n\tbh=PyagD4Y645uEdq8cQJD7kKEuMo2sR5XHnN9D6WURvT8=;\n\tb=Gh2AD78eE76Px4qfPau0MURuzk8GtUyDDHkeewMzgfGTVSPoS5ETOWHSwyxI9kQR1C\n\tSttxFI2Gf6yq2YODrvTq8mQVBFcFXguwOrCnVt0+FLdpvSNYg5GSKSzD3ZIdOGi3UCnx\n\tsH4QEI2HkokLkHFqAQlirOoteWohg/FCyHuxaqPRCuIH11osScOhOEIiFr0Db2cu0thO\n\tBQx7hmnebbeiVfcsp60Z+f4IXa1Ill5hGhiB7g4IMJbCGpxd10M6p7opeScc5v7zVzOj\n\tj2/x/U+jaCvUZonK0y9x5UDeMh7nlydGwHlTeHhUgQV8X0fZW+GyUXcvQqhuyIg3fVp3\n\tMvrg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id;\n\tbh=PyagD4Y645uEdq8cQJD7kKEuMo2sR5XHnN9D6WURvT8=;\n\tb=Dhrno3Ean9SgQp/JOwC8b4wY2+3rltAnXDNyq9rEpAYY/7OiPG7RoIZTobmYIAO5x2\n\tWsJJvbLvqpkEOeO1tWgx8EZER6NilPY5mKYNPecMe68TyADZY1JeyBMH7CMWIYskKDEM\n\tW9wAVP5Mx/bZtmbQM83f1HRFdL1WkCpJPgZDKvsGmfgNnmMOSe5HPymvd9WPTHjesvlD\n\tSKIv2ul2xgmw0DgrBJ7SP2I5MypWqS4if1xgER1DPE5Rsmvw2gXORNmA0aS104AhYr0n\n\tJBF8kCWiH7mAezxlYUi1DqfsUQ/O6PwNVadspt8YKymWwox00VOTrtUu1+mxg+Srpln+\n\tGwXA==",
        "X-Gm-Message-State": "AHYfb5hGNxVRZekoJLwWiqTnFA1uU2QGRDcj7LBJHbapYQJxJLFqcSzY\n\taBJN5oBCTMGPp45o",
        "X-Received": "by 10.202.48.9 with SMTP id w9mr1293008oiw.270.1501839038470;\n\tFri, 04 Aug 2017 02:30:38 -0700 (PDT)",
        "From": "Simon Glass <sjg@chromium.org>",
        "To": "U-Boot Mailing List <u-boot@lists.denx.de>",
        "Date": "Fri,  4 Aug 2017 03:30:30 -0600",
        "Message-Id": "<20170804093030.73856-1-sjg@chromium.org>",
        "X-Mailer": "git-send-email 2.14.0.rc1.383.gd1ce394fe2-goog",
        "Cc": "Tom Rini <trini@konsulko.com>",
        "Subject": "[U-Boot] [PATCH] genconfig.py: Print defconfig next to warnings",
        "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": "At present we sometimes see warnings of the form:\n\n/tmp/tmpMA89kB:36: warning: overriding the value of CMD_SPL.\n\tOld value: \"y\", new value: \"y\".\n\nThis is not very useful as it does not show whch defconfig file it relates\nto. Update the tool to show this.\n\nSigned-off-by: Simon Glass <sjg@chromium.org>\n---\n\n tools/buildman/kconfiglib.py | 22 ++++++++++++++++------\n tools/genboardscfg.py        |  7 +++++--\n 2 files changed, 21 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/tools/buildman/kconfiglib.py b/tools/buildman/kconfiglib.py\nindex d28bbf0b49..352ad438ee 100644\n--- a/tools/buildman/kconfiglib.py\n+++ b/tools/buildman/kconfiglib.py\n@@ -204,6 +204,7 @@ class Config(object):\n \n         self.print_warnings = print_warnings\n         self.print_undef_assign = print_undef_assign\n+        self._warnings = []\n \n         # For parsing routines that stop when finding a line belonging to a\n         # different construct, these holds that line and the tokenized version\n@@ -398,8 +399,12 @@ class Config(object):\n           need to refer to the top-level kernel directory with \"$srctree\".\n \n         replace (default: True): True if the configuration should replace the\n-           old configuration; False if it should add to it.\"\"\"\n+           old configuration; False if it should add to it.\n \n+        Returns a list or warnings (hopefully empty)\n+        \"\"\"\n+\n+        self._warnings = []\n         # Put this first so that a missing file doesn't screw up our state\n         filename = os.path.expandvars(filename)\n         line_feeder = _FileFeed(filename)\n@@ -449,7 +454,7 @@ class Config(object):\n         while 1:\n             line = line_feeder.get_next()\n             if line is None:\n-                return\n+                return self._warnings\n \n             line = line.rstrip()\n \n@@ -1763,8 +1768,10 @@ class Config(object):\n \n     def _warn(self, msg, filename=None, linenr=None):\n         \"\"\"For printing warnings to stderr.\"\"\"\n+        msg = _build_msg(\"warning: \" + msg, filename, linenr)\n         if self.print_warnings:\n-            _stderr_msg(\"warning: \" + msg, filename, linenr)\n+            sys.stderr.write(msg + \"\\n\")\n+        self._warnings.append(msg)\n \n class Item(object):\n \n@@ -3369,10 +3376,13 @@ def _clean_up_path(path):\n         path = path[2:]\n     return path.rstrip(\"/\")\n \n-def _stderr_msg(msg, filename, linenr):\n+def _build_msg(msg, filename, linenr):\n     if filename is not None:\n-        sys.stderr.write(\"{0}:{1}: \".format(_clean_up_path(filename), linenr))\n-    sys.stderr.write(msg + \"\\n\")\n+        msg = \"{0}:{1}: \".format(_clean_up_path(filename), linenr) + msg\n+    return msg\n+\n+def _stderr_msg(msg, filename, linenr):\n+    sys.stderr.write(_build_msg(msg, filename, linenr) + \"\\n\")\n \n def _tokenization_error(s, filename, linenr):\n     loc = \"\" if filename is None else \"{0}:{1}: \".format(filename, linenr)\ndiff --git a/tools/genboardscfg.py b/tools/genboardscfg.py\nindex 2e871feaf4..2345a19798 100755\n--- a/tools/genboardscfg.py\n+++ b/tools/genboardscfg.py\n@@ -124,7 +124,7 @@ class KconfigScanner:\n         os.environ['srctree'] = os.getcwd()\n         os.environ['UBOOTVERSION'] = 'dummy'\n         os.environ['KCONFIG_OBJDIR'] = ''\n-        self._conf = kconfiglib.Config()\n+        self._conf = kconfiglib.Config(print_warnings=False)\n \n     def __del__(self):\n         \"\"\"Delete a leftover temporary file before exit.\n@@ -166,7 +166,10 @@ class KconfigScanner:\n                 else:\n                     f.write(line[colon + 1:])\n \n-        self._conf.load_config(self._tmpfile)\n+        warnings = self._conf.load_config(self._tmpfile)\n+        if warnings:\n+            for warning in warnings:\n+                print '%s: %s' % (defconfig, warning)\n \n         try_remove(self._tmpfile)\n         self._tmpfile = None\n",
    "prefixes": [
        "U-Boot"
    ]
}