Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/203520/?format=api
{ "id": 203520, "url": "http://patchwork.ozlabs.org/api/patches/203520/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1354581799-775-1-git-send-email-dianders@chromium.org/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/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": "<1354581799-775-1-git-send-email-dianders@chromium.org>", "list_archive_url": null, "date": "2012-12-04T00:43:16", "name": "[U-Boot,v2,1/4] patman: Add a call to get_maintainer.pl if it exists", "commit_ref": "21a19d70e2c2aa45cfe62c6adf8ceee9fcfbcacb", "pull_url": null, "state": "accepted", "archived": false, "hash": "81756bd016be4519c0424b604bf2d358400a5249", "submitter": { "id": 9763, "url": "http://patchwork.ozlabs.org/api/people/9763/?format=api", "name": "Douglas Anderson", "email": "dianders@chromium.org" }, "delegate": { "id": 3184, "url": "http://patchwork.ozlabs.org/api/users/3184/?format=api", "username": "sjg", "first_name": "Simon", "last_name": "Glass", "email": "sjg@chromium.org" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1354581799-775-1-git-send-email-dianders@chromium.org/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/203520/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/203520/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", "Received": [ "from theia.denx.de (theia.denx.de [85.214.87.163])\n\tby ozlabs.org (Postfix) with ESMTP id 8368B2C008F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 4 Dec 2012 11:44:02 +1100 (EST)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 40FE64A180;\n\tTue, 4 Dec 2012 01:44:01 +0100 (CET)", "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id c0TZntSTgF58; Tue, 4 Dec 2012 01:44:01 +0100 (CET)", "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id E80154A181;\n\tTue, 4 Dec 2012 01:43:39 +0100 (CET)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id D42D84A12D\n\tfor <u-boot@lists.denx.de>; Tue, 4 Dec 2012 01:43:33 +0100 (CET)", "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id BjZhNeshY5e6 for <u-boot@lists.denx.de>;\n\tTue, 4 Dec 2012 01:43:29 +0100 (CET)", "from mail-ea0-f202.google.com (mail-ea0-f202.google.com\n\t[209.85.215.202])\n\tby theia.denx.de (Postfix) with ESMTPS id 8C5A34A158\n\tfor <u-boot@lists.denx.de>; Tue, 4 Dec 2012 01:43:26 +0100 (CET)", "by mail-ea0-f202.google.com with SMTP id j12so406436eaa.3\n\tfor <u-boot@lists.denx.de>; Mon, 03 Dec 2012 16:43:26 -0800 (PST)", "by 10.14.0.196 with SMTP id 44mr12255306eeb.6.1354581805024;\n\tMon, 03 Dec 2012 16:43:25 -0800 (PST)", "from hpza10.eem.corp.google.com ([74.125.121.33])\n\tby gmr-mx.google.com with ESMTPS id\n\tu8si3561090een.1.2012.12.03.16.43.24\n\t(version=TLSv1/SSLv3 cipher=AES128-SHA);\n\tMon, 03 Dec 2012 16:43:25 -0800 (PST)", "from tictac.mtv.corp.google.com (tictac.mtv.corp.google.com\n\t[172.22.73.80])\n\tby hpza10.eem.corp.google.com (Postfix) with ESMTP id 7499820004E;\n\tMon, 3 Dec 2012 16:43:24 -0800 (PST)", "by tictac.mtv.corp.google.com (Postfix, from userid 121310)\n\tid A69AC81626; Mon, 3 Dec 2012 16:43:23 -0800 (PST)" ], "X-Virus-Scanned": [ "Debian amavisd-new at theia.denx.de", "Debian amavisd-new at theia.denx.de" ], "X-policyd-weight": "NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5\n\tNOT_IN_BL_NJABL=-1.5 (only DNSBL check requested)", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=google.com; s=20120113;\n\th=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\n\t:x-gm-message-state;\n\tbh=VvHMoi9Np1Zair5hsmz866PX5tCrdFSZXUqJKX0tj0c=;\n\tb=mkPa7NbtAyC2zoL+Z7EIFHGcwkGQpx1+JqMRzmpWc2rtWEqFgjHS9qJCxleFAJvr3o\n\tj7/mtYlxN1Ydm5xfv4A6EVgxq9mZLnztcA6tjnhaWQFVYZv8B71d4szm0g3N6SpGR6H7\n\tRgXfxqG4U/0t44EdQkfwyVdapHlLedCGlm8ehkYsW7Gwh2uIUUqCxFGvioFFFOrZUivH\n\t3sbVvQO+oqDitDPDwva+2QeTHNgPnhk+ByPPAqKhlXCuAl+b9BjcfBCR6siHn9TQVWXt\n\tFb59TeSR7z49sbCJVNpAsniweMw3CqtnXVzr2v4OqbTgKCT2X4DCahnrVZbmGFOS0Pmi\n\t9sbQ==", "From": "Doug Anderson <dianders@chromium.org>", "To": "Simon Glass <sjg@chromium.org>", "Date": "Mon, 3 Dec 2012 16:43:16 -0800", "Message-Id": "<1354581799-775-1-git-send-email-dianders@chromium.org>", "X-Mailer": "git-send-email 1.7.7.3", "In-Reply-To": "<1354321745-1359-1-git-send-email-dianders@chromium.org>", "References": "<1354321745-1359-1-git-send-email-dianders@chromium.org>", "X-Gm-Message-State": "ALoCoQk7JUqK+m9Yj124D7ZxOYYalfCNKaw+b8i2piSatLz9s/1xYtfQTVbxCx2QnKbmuNXj27nZDfWGtHeZ8dgKNsCBOsMeexfqrBLVnWZy7S4YLBlGOau1/m+iUHKQbk06F0KhCNQA+oZFoKR3Kjd1wz1vMgYgTLEnHGgxdju3vggKgY5DYlI8aMaU5S5NonpuHl60d7xA", "Cc": "u-boot@lists.denx.de", "Subject": "[U-Boot] [PATCH v2 1/4] patman: Add a call to get_maintainer.pl if\n\tit exists", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.11", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<http://lists.denx.de/mailman/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": "<http://lists.denx.de/mailman/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "u-boot-bounces@lists.denx.de", "Errors-To": "u-boot-bounces@lists.denx.de" }, "content": "For Linux the best way to figure out where to send a patch is with the\n\"get_maintainer.pl\" script. Add support for calling it from patman.\nSupport is added unconditionally for \"scripts/get_maintainer.pl\" in\ncase it is helpful for any other projects.\n\nSigned-off-by: Doug Anderson <dianders@chromium.org>\n---\nChanges in v2: None\n\n tools/patman/README | 11 ++++++-\n tools/patman/get_maintainer.py | 63 ++++++++++++++++++++++++++++++++++++++++\n tools/patman/series.py | 2 +\n 3 files changed, 74 insertions(+), 2 deletions(-)\n create mode 100644 tools/patman/get_maintainer.py", "diff": "diff --git a/tools/patman/README b/tools/patman/README\nindex 5b6eba0..16b51eb 100644\n--- a/tools/patman/README\n+++ b/tools/patman/README\n@@ -43,6 +43,9 @@ Series-to: fred.blogs@napier.co.nz\n \n in one of your commits, the series will be sent there.\n \n+In Linux this will also call get_maintainer.pl on each of your\n+patches automatically.\n+\n \n How to use this tool\n ====================\n@@ -65,8 +68,12 @@ will get a consistent result each time.\n How to configure it\n ===================\n \n-For most cases patman will locate and use the file 'doc/git-mailrc' in\n-your U-Boot directory. This contains most of the aliases you will need.\n+For most cases of using patman for U-Boot developement patman will\n+locate and use the file 'doc/git-mailrc' in your U-Boot directory.\n+This contains most of the aliases you will need.\n+\n+For Linux the 'scripts/get_maintainer.pl' handles figuring out where\n+to send patches pretty well.\n \n During the first run patman creates a config file for you by taking the default\n user name and email address from the global .gitconfig file.\ndiff --git a/tools/patman/get_maintainer.py b/tools/patman/get_maintainer.py\nnew file mode 100644\nindex 0000000..cb11373\n--- /dev/null\n+++ b/tools/patman/get_maintainer.py\n@@ -0,0 +1,63 @@\n+# Copyright (c) 2012 The Chromium OS Authors.\n+#\n+# See file CREDITS for list of people who contributed to this\n+# project.\n+#\n+# This program is free software; you can redistribute it and/or\n+# modify it under the terms of the GNU General Public License as\n+# published by the Free Software Foundation; either version 2 of\n+# the License, or (at your option) any later version.\n+#\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, write to the Free Software\n+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,\n+# MA 02111-1307 USA\n+#\n+\n+import command\n+import gitutil\n+import os\n+\n+def FindGetMaintainer():\n+ \"\"\"Look for the get_maintainer.pl script.\n+\n+ Returns:\n+ If the script is found we'll return a path to it; else None.\n+ \"\"\"\n+ try_list = [\n+ os.path.join(gitutil.GetTopLevel(), 'scripts'),\n+ ]\n+ # Look in the list\n+ for path in try_list:\n+ fname = os.path.join(path, 'get_maintainer.pl')\n+ if os.path.isfile(fname):\n+ return fname\n+\n+ return None\n+\n+def GetMaintainer(fname, verbose=False):\n+ \"\"\"Run get_maintainer.pl on a file if we find it.\n+\n+ We look for get_maintainer.pl in the 'scripts' directory at the top of\n+ git. If we find it we'll run it. If we don't find get_maintainer.pl\n+ then we fail silently.\n+\n+ Args:\n+ fname: Path to the patch file to run get_maintainer.pl on.\n+\n+ Returns:\n+ A list of email addresses to CC to.\n+ \"\"\"\n+ get_maintainer = FindGetMaintainer()\n+ if not get_maintainer:\n+ if verbose:\n+ print \"WARNING: Couldn't find get_maintainer.pl\"\n+ return []\n+\n+ stdout = command.Output(get_maintainer, '--norolestats', fname)\n+ return stdout.splitlines()\ndiff --git a/tools/patman/series.py b/tools/patman/series.py\nindex 083af0f..6c5c570 100644\n--- a/tools/patman/series.py\n+++ b/tools/patman/series.py\n@@ -22,6 +22,7 @@\n import itertools\n import os\n \n+import get_maintainer\n import gitutil\n import terminal\n \n@@ -225,6 +226,7 @@ class Series(dict):\n if process_tags:\n list += gitutil.BuildEmailList(commit.tags)\n list += gitutil.BuildEmailList(commit.cc_list)\n+ list += get_maintainer.GetMaintainer(commit.patch)\n all_ccs += list\n print >>fd, commit.patch, ', '.join(list)\n self._generated_cc[commit.patch] = list\n", "prefixes": [ "U-Boot", "v2", "1/4" ] }