Show a patch.

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

{
    "id": 20871,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/20871/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/20871/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20240810005840.20841-3-laurent.pinchart@ideasonboard.com>",
    "date": "2024-08-10T00:58:40",
    "name": "[3/3] utils: checkstyle.py: Add __repr__ method to Commit class",
    "commit_ref": "2d5cea862dbc369d848fb1b745e61a34658c3a0f",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "b7569c3444ec86c3b9bf3d7afeb5c67b9883af0f",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/20871/mbox/",
    "series": [
        {
            "id": 4508,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4508/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4508",
            "date": "2024-08-10T00:58:38",
            "name": "[1/3] utils: checkstyle.py: Rework commit message parsing",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4508/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/20871/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/20871/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 24870BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 10 Aug 2024 00:59:12 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BAD32633C0;\n\tSat, 10 Aug 2024 02:59:11 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 80B2563398\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 10 Aug 2024 02:59:07 +0200 (CEST)",
            "from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 753E24AB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 10 Aug 2024 02:58:12 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"NBdX1VB+\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1723251492;\n\tbh=Pv76YY4/yvthH5nVweMWTrDdG29zVzp/juhGQSvDS7A=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=NBdX1VB+KNQua93+tymcDbW3S4aiEHqCWx3X7wgTqK8v0hpJCvb88QH2qn4dfUN84\n\tOjIPrL/78450ffmVqJpro9RwDIM8VzwJ9dMVo0Aqb8JlogUcs9GmpTTOfmum5SjEaZ\n\tvNlWDMFFvH/+ODpEifwv1ymlyCDIem+METRKHhfA=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[PATCH 3/3] utils: checkstyle.py: Add __repr__ method to Commit\n\tclass",
        "Date": "Sat, 10 Aug 2024 03:58:40 +0300",
        "Message-ID": "<20240810005840.20841-3-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.44.2",
        "In-Reply-To": "<20240810005840.20841-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20240810005840.20841-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "When debugging issues with the Commit class, a __repr__ method proved to\nbe useful to quickly print all the parsed information about a commit. To\navoid reimplementing the method over and over again in the future, add\nit to the class, even if it is not actually used.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n utils/checkstyle.py | 11 +++++++++++\n 1 file changed, 11 insertions(+)",
    "diff": "diff --git a/utils/checkstyle.py b/utils/checkstyle.py\nindex 2b1e1f6c1b9e..c9e41d4149f7 100755\n--- a/utils/checkstyle.py\n+++ b/utils/checkstyle.py\n@@ -248,6 +248,17 @@ class Commit:\n                              stdout=subprocess.PIPE).stdout.decode('utf-8')\n         self._files = [CommitFile(f) for f in ret.splitlines()]\n \n+    def __repr__(self):\n+        return '\\n'.join([\n+            f'commit {self.commit}',\n+            f'Author: {self.author}',\n+            f'',\n+            f'    {self.title}',\n+            '',\n+            '\\n'.join([line and f'    {line}' or '' for line in self._body]),\n+            'Trailers:',\n+        ] + self.trailers)\n+\n     def files(self, filter='AMR'):\n         return [f.filename for f in self._files if f.status in filter]\n \n",
    "prefixes": [
        "3/3"
    ]
}