Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/203521/?format=api
{ "id": 203521, "url": "http://patchwork.ozlabs.org/api/patches/203521/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1354581643-32469-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": "<1354581643-32469-1-git-send-email-dianders@chromium.org>", "list_archive_url": null, "date": "2012-12-04T00:40:42", "name": "[U-Boot,v2,1/2] patman: Cache the CC list from MakeCcFile() for use in ShowActions()", "commit_ref": "d94566a1115d35f87db793d2daaa79823528937c", "pull_url": null, "state": "accepted", "archived": false, "hash": "01abcf478ac0ee3cbc251ed8f1d7d219b197a84e", "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/1354581643-32469-1-git-send-email-dianders@chromium.org/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/203521/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/203521/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 CA73C2C00AA\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 4 Dec 2012 11:48:48 +1100 (EST)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 7B7284A13F;\n\tTue, 4 Dec 2012 01:48:47 +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 U+KFJpAkOy1Z; Tue, 4 Dec 2012 01:48:47 +0100 (CET)", "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id EEF224A132;\n\tTue, 4 Dec 2012 01:48:42 +0100 (CET)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 253FB4A132\n\tfor <u-boot@lists.denx.de>; Tue, 4 Dec 2012 01:48:38 +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 hxOFnXU1+XzT for <u-boot@lists.denx.de>;\n\tTue, 4 Dec 2012 01:48:33 +0100 (CET)", "from mail-qa0-f74.google.com (mail-qa0-f74.google.com\n\t[209.85.216.74]) by theia.denx.de (Postfix) with ESMTPS id 3F5604A12E\n\tfor <u-boot@lists.denx.de>; Tue, 4 Dec 2012 01:48:31 +0100 (CET)", "by mail-qa0-f74.google.com with SMTP id r4so49215qaq.3\n\tfor <u-boot@lists.denx.de>; Mon, 03 Dec 2012 16:48:30 -0800 (PST)", "by 10.236.85.51 with SMTP id t39mr7189122yhe.15.1354581648873;\n\tMon, 03 Dec 2012 16:40:48 -0800 (PST)", "from wpzn3.hot.corp.google.com (216-239-44-65.google.com\n\t[216.239.44.65]) by gmr-mx.google.com with ESMTPS id\n\ts78si64559yhh.3.2012.12.03.16.40.48\n\t(version=TLSv1/SSLv3 cipher=AES128-SHA);\n\tMon, 03 Dec 2012 16:40:48 -0800 (PST)", "from tictac.mtv.corp.google.com (tictac.mtv.corp.google.com\n\t[172.22.73.80])\n\tby wpzn3.hot.corp.google.com (Postfix) with ESMTP id A2A40100048;\n\tMon, 3 Dec 2012 16:40:48 -0800 (PST)", "by tictac.mtv.corp.google.com (Postfix, from userid 121310)\n\tid 42DEE81626; Mon, 3 Dec 2012 16:40:48 -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=AQj9gRWl/QZ1stLi/VRD2YPUQivOqRGRR6RpCTwW0MQ=;\n\tb=D0FbxsSoHW5SacNBdRrA6xSJDpmDyi/4+N6ZX8jLaqpZoxeuzoeVPhGG7lG7Fvrv4n\n\t/cqewDzrOAY6cLVt0Pty4H2JqZ0xheWFfjJMUIPfRNHDA7GzumgTH054Q6zkW/H4hVts\n\t1qIfIW86njP1XPbcwyVwCMzoX2N2JttGf1kQqYUw+uDHimK+kqC1KB7xbBf4kLLeaf1b\n\tqqf99410gSrI1DF9Fu1J9pTrT1/iZYmPn3XNzHvW95WqNcjrJULx0GEXEZgW/iORB0jG\n\tcB0Plq6BfWct4ylVajl7imKsau+VsbgxgqT2b15BJB3QOz0n+SDm66muj2JXc1gKkf1I\n\tKEJA==", "From": "Doug Anderson <dianders@chromium.org>", "To": "Simon Glass <sjg@chromium.org>", "Date": "Mon, 3 Dec 2012 16:40:42 -0800", "Message-Id": "<1354581643-32469-1-git-send-email-dianders@chromium.org>", "X-Mailer": "git-send-email 1.7.7.3", "In-Reply-To": "<1354321543-408-1-git-send-email-dianders@chromium.org>", "References": "<1354321543-408-1-git-send-email-dianders@chromium.org>", "X-Gm-Message-State": "ALoCoQlO4nmIBz3+cRGkwHoFspbSRyhqdba1FC33s9MCHRtTr/E+oFncSH8uELQYt3FVV/nPSpxf73BFgp3T+FA4/NHtP9EqeihXZJemD7/gMsfuE8MT2t4oxYUPeApJbwL8kNZPoeCt+rJc9qlwPjIbyUlm/W1M41n7pZrjMTU03wFdKJFXsTR/DmgQEJPnZRKtLMltJr0q", "Cc": "u-boot@lists.denx.de", "Subject": "[U-Boot] [PATCH v2 1/2] patman: Cache the CC list from MakeCcFile()\n\tfor use in ShowActions()", "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": "Currently we go through and generate the CC list for patches twice.\nThis gets slow when (in a future CL) we add a call to\nget_maintainer.pl on Linux. Instead of doing things twice, just cache\nthe CC list when it is first generated.\n\nSigned-off-by: Doug Anderson <dianders@chromium.org>\n---\nChanges in v2: None\n\n tools/patman/patman.py | 6 ++++--\n tools/patman/series.py | 13 +++++++++----\n 2 files changed, 13 insertions(+), 6 deletions(-)", "diff": "diff --git a/tools/patman/patman.py b/tools/patman/patman.py\nindex cfe06d0..de8314a 100755\n--- a/tools/patman/patman.py\n+++ b/tools/patman/patman.py\n@@ -140,14 +140,16 @@ else:\n options.count + options.start):\n ok = False\n \n+ cc_file = series.MakeCcFile(options.process_tags)\n+\n # Email the patches out (giving the user time to check / cancel)\n cmd = ''\n if ok or options.ignore_errors:\n- cc_file = series.MakeCcFile(options.process_tags)\n cmd = gitutil.EmailPatches(series, cover_fname, args,\n options.dry_run, cc_file)\n- os.remove(cc_file)\n \n # For a dry run, just show our actions as a sanity check\n if options.dry_run:\n series.ShowActions(args, cmd, options.process_tags)\n+\n+ os.remove(cc_file)\ndiff --git a/tools/patman/series.py b/tools/patman/series.py\nindex d2971f4..ad8288d 100644\n--- a/tools/patman/series.py\n+++ b/tools/patman/series.py\n@@ -46,6 +46,11 @@ class Series(dict):\n self.notes = []\n self.changes = {}\n \n+ # Written in MakeCcFile()\n+ # key: name of patch file\n+ # value: list of email addresses\n+ self._generated_cc = {}\n+\n # These make us more like a dictionary\n def __setattr__(self, name, value):\n self[name] = value\n@@ -109,10 +114,7 @@ class Series(dict):\n for upto in range(len(args)):\n commit = self.commits[upto]\n print col.Color(col.GREEN, ' %s' % args[upto])\n- cc_list = []\n- if process_tags:\n- cc_list += gitutil.BuildEmailList(commit.tags)\n- cc_list += gitutil.BuildEmailList(commit.cc_list)\n+ cc_list = list(self._generated_cc[commit.patch])\n \n # Skip items in To list\n if 'to' in self:\n@@ -202,6 +204,8 @@ class Series(dict):\n def MakeCcFile(self, process_tags):\n \"\"\"Make a cc file for us to use for per-commit Cc automation\n \n+ Also stores in self._generated_cc to make ShowActions() faster.\n+\n Args:\n process_tags: Process tags as if they were aliases\n Return:\n@@ -216,6 +220,7 @@ class Series(dict):\n list += gitutil.BuildEmailList(commit.tags)\n list += gitutil.BuildEmailList(commit.cc_list)\n print >>fd, commit.patch, ', '.join(list)\n+ self._generated_cc[commit.patch] = list\n \n fd.close()\n return fname\n", "prefixes": [ "U-Boot", "v2", "1/2" ] }