Patch Detail
Show a patch.
GET /api/patches/18729/?format=api
{ "id": 18729, "url": "https://patchwork.libcamera.org/api/patches/18729/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18729/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20230612224751.4437-4-laurent.pinchart@ideasonboard.com>", "date": "2023-06-12T22:47:50", "name": "[libcamera-devel,v1,3/4] utils: checkstyle: Don't include commit ID in commit title", "commit_ref": "925ee0ac8ecfd43aa219f6bad04b3b7e90d0b76d", "pull_url": null, "state": "accepted", "archived": false, "hash": "d401c126b72248fedd1e878be0b0cab1beb230bd", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/18729/mbox/", "series": [ { "id": 3920, "url": "https://patchwork.libcamera.org/api/series/3920/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3920", "date": "2023-06-12T22:47:47", "name": "utils: checkstyle: Add a commit message trailers checker", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3920/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18729/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18729/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 0BF94C3290\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 12 Jun 2023 22:47:58 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BF4CC628A2;\n\tTue, 13 Jun 2023 00:47:57 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 09EBE61E59\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Jun 2023 00:47:56 +0200 (CEST)", "from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi\n\t[213.243.189.158])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3FA34D80\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Jun 2023 00:47:26 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1686610077;\n\tbh=He3f3szaxuhPEncGvV+Xel2qkY3nXK9yIB9c71GbCmE=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=3mprioAKHLJeqzOytGepc34f/H1Npk602sHsfm3Me8byfz3fo1nMSwvKFr46iXNQz\n\tGkbBvewOnVWP2rIGCOMLrukp07bMvQ0pMEy9mgb02iqOt1R/lezIQYP4NEZqVWI2/4\n\tYRCk5euwVVud6uMuvJH7Se93jlkI1kCAk/T5PaXI1Rh9KUYts5+j6dv6101NOne1Te\n\tl7q8HLQknajOQUbd+erv/+yZz7cR8Chqr/Az++3zUBLG4GZnnGs5u78Vpy7pYYcAoZ\n\tC2+Vlwl76HHJadjnetrognuYj2VHa/aNcXrXhXLgXRVgWIQi4cRSEf6QTyDZ7S2x36\n\tccKBnlpwi5u3g==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1686610046;\n\tbh=He3f3szaxuhPEncGvV+Xel2qkY3nXK9yIB9c71GbCmE=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=cE6DN1RS3n4OquHuT5TXPWcFoiuTyjNdLDRd7o7aQwZ35x3QGfHceu6esB8j/l2xn\n\tzR6EJn+lycjKNANDKQYTPtdj+Gt5VhOp4d5sDhAj44UGo/1ajlrUIrF8Jn5xpDIYYN\n\tFtX373w/ezw8G4NtomzEwl8G7K5jDxUCaRrvYu6c=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"cE6DN1RS\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 13 Jun 2023 01:47:50 +0300", "Message-Id": "<20230612224751.4437-4-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.39.3", "In-Reply-To": "<20230612224751.4437-1-laurent.pinchart@ideasonboard.com>", "References": "<20230612224751.4437-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v1 3/4] utils: checkstyle: Don't include\n\tcommit ID in commit title", "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>", "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The commit title and commit ID are two different pieces of information.\nDon't include the latter in the former, to simplify code that only needs\nthe commit title. Constructing a string from the ID and title is easier\nthan splitting the combined string back into its elements.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n utils/checkstyle.py | 17 +++++++++--------\n 1 file changed, 9 insertions(+), 8 deletions(-)", "diff": "diff --git a/utils/checkstyle.py b/utils/checkstyle.py\nindex 3104acfa2065..e68c874609bc 100755\n--- a/utils/checkstyle.py\n+++ b/utils/checkstyle.py\n@@ -210,12 +210,12 @@ class Commit:\n \n def _parse(self):\n # Get the commit title and list of files.\n- ret = subprocess.run(['git', 'show', '--pretty=oneline', '--name-status',\n+ ret = subprocess.run(['git', 'show', '--format=%s', '--name-status',\n self.commit],\n stdout=subprocess.PIPE).stdout.decode('utf-8')\n- files = ret.splitlines()\n- self._files = [CommitFile(f) for f in files[1:]]\n- self._title = files[0]\n+ lines = ret.splitlines()\n+ self._files = [CommitFile(f) for f in lines[1:] if f]\n+ self._title = lines[0]\n \n def files(self, filter='AMR'):\n return [f.filename for f in self._files if f.status in filter]\n@@ -358,7 +358,7 @@ class HeaderAddChecker(CommitChecker):\n \n \n class TitleChecker(CommitChecker):\n- prefix_regex = re.compile(r'[0-9a-f]+ (([a-zA-Z0-9_.-]+: )+)')\n+ prefix_regex = re.compile(r'^([a-zA-Z0-9_.-]+: )+')\n release_regex = re.compile(r'libcamera v[0-9]+\\.[0-9]+\\.[0-9]+')\n \n @classmethod\n@@ -388,7 +388,7 @@ class TitleChecker(CommitChecker):\n if not prefix:\n continue\n \n- prefix = prefix.group(1)\n+ prefix = prefix.group(0)\n if prefix in prefixes:\n prefixes[prefix] += 1\n else:\n@@ -846,9 +846,10 @@ def check_file(top_level, commit, filename, checkers):\n \n \n def check_style(top_level, commit, checkers):\n- separator = '-' * len(commit.title)\n+ title = commit.commit + ' ' + commit.title\n+ separator = '-' * len(title)\n print(separator)\n- print(commit.title)\n+ print(title)\n print(separator)\n \n issues = 0\n", "prefixes": [ "libcamera-devel", "v1", "3/4" ] }