get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 203532,
    "url": "http://patchwork.ozlabs.org/api/patches/203532/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1354581643-32469-2-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-2-git-send-email-dianders@chromium.org>",
    "list_archive_url": null,
    "date": "2012-12-04T00:40:43",
    "name": "[U-Boot,v2,2/2] patman: Add all CC addresses to the cover letter",
    "commit_ref": "311872551570a6439f62ab476c6fd4836a7a9aa7",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "8dde38496dc3951dd98ff8320265f94f106aa2cc",
    "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-2-git-send-email-dianders@chromium.org/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/203532/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/203532/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 2D66D2C0080\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  4 Dec 2012 12:04:03 +1100 (EST)",
            "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id D352D4A10D;\n\tTue,  4 Dec 2012 02:04: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 9EA3JSgBprvt; Tue,  4 Dec 2012 02:04:01 +0100 (CET)",
            "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id BB5534A11B;\n\tTue,  4 Dec 2012 02:03:57 +0100 (CET)",
            "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 622B84A11B\n\tfor <u-boot@lists.denx.de>; Tue,  4 Dec 2012 02:03:56 +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 VL2ulbZSgAT6 for <u-boot@lists.denx.de>;\n\tTue,  4 Dec 2012 02:03:51 +0100 (CET)",
            "from mail-ye0-f202.google.com (mail-ye0-f202.google.com\n\t[209.85.213.202])\n\tby theia.denx.de (Postfix) with ESMTPS id 56BB74A10D\n\tfor <u-boot@lists.denx.de>; Tue,  4 Dec 2012 02:03:49 +0100 (CET)",
            "by mail-ye0-f202.google.com with SMTP id l7so484267yen.3\n\tfor <u-boot@lists.denx.de>; Mon, 03 Dec 2012 17:03:48 -0800 (PST)",
            "by 10.236.82.9 with SMTP id n9mr7764660yhe.24.1354581648918;\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\tt49si965801yhc.1.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 AED34100049;\n\tMon,  3 Dec 2012 16:40:48 -0800 (PST)",
            "by tictac.mtv.corp.google.com (Postfix, from userid 121310)\n\tid 5DC0181151; 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-Greylist": "delayed 1378 seconds by postgrey-1.27 at theia;\n\tTue, 04 Dec 2012 02:03:49 CET",
        "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=vu/tYqnQ08lKt6FMMytx4MqBqaCiak8EXySFhTTiyMc=;\n\tb=IzLInpiSVGgm7s/7XuANkOCUISIaHUYmt6kvJGWH+zd5VfMXH6dWeNEJVXMf08Uuqm\n\tHw56zZqy1Luim6mtKcpnO0KrpDh+JbU8ztW/1GlnujLxQceuLZ40xz8ZDJpRuWrLqgFz\n\tBSFWpD/P4w6t86OMtzQXlbCoTKZrxOxnx5otgT7KkuxEPHBiU4zNno7IlLDP/Iwpv8Hl\n\toEwmNMi3R8haJ7SVau6bM6GQPTHdqZ2ivi2FM+2sNx3VdxD2/+Dc9CMMVTDYzzOKct4v\n\tNerfimDBKs+40VAOTa5FD0BvmyQko8yRy0gI1FrCrKOhSyncIiIEenENg7Xvb/MIf9k6\n\tu55w==",
        "From": "Doug Anderson <dianders@chromium.org>",
        "To": "Simon Glass <sjg@chromium.org>",
        "Date": "Mon,  3 Dec 2012 16:40:43 -0800",
        "Message-Id": "<1354581643-32469-2-git-send-email-dianders@chromium.org>",
        "X-Mailer": "git-send-email 1.7.7.3",
        "In-Reply-To": "<1354581643-32469-1-git-send-email-dianders@chromium.org>",
        "References": "<1354321543-408-1-git-send-email-dianders@chromium.org>\n\t<1354581643-32469-1-git-send-email-dianders@chromium.org>",
        "X-Gm-Message-State": "ALoCoQmls518ZzfAqqrcYzvRzHL+pLlNeUUNZ47NlriVJHT8AlVUWkk0ddNSIcKgVXqUE5SPUnkx7N/LBp62gO97Ker8SEEjwzJ5SjwgtsX7tTCwShkVLcXU7sRRlf2F8e8rEpIOL54IZsY79bGLtUkZbBg4jItGqE6lAYRRtzauivFL3d0qo5kHad7FGukJra+S8intCWec",
        "Cc": "u-boot@lists.denx.de",
        "Subject": "[U-Boot] [PATCH v2 2/2] patman: Add all CC addresses to the cover\n\tletter",
        "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": "If we're sending a cover letter make sure to CC everyone that we're\nCCing on each of the individual patches.\n\nSigned-off-by: Doug Anderson <dianders@chromium.org>\n---\nChanges in v2:\n- Added requested comment in the README to document this.\n\n tools/patman/README    |    3 +++\n tools/patman/patman.py |    2 +-\n tools/patman/series.py |   12 +++++++++++-\n 3 files changed, 15 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/tools/patman/README b/tools/patman/README\nindex dc3957c..5b6eba0 100644\n--- a/tools/patman/README\n+++ b/tools/patman/README\n@@ -226,6 +226,9 @@ Date:\tMon Nov 7 23:18:44 2011 -0500\n will create a patch which is copied to x86, arm, sandbox, mikef, ag and\n afleming.\n \n+If you have a cover letter it will get sent to the union of the CC lists of\n+all of the other patches.\n+\n \n Example Work Flow\n =================\ndiff --git a/tools/patman/patman.py b/tools/patman/patman.py\nindex de8314a..4181d80 100755\n--- a/tools/patman/patman.py\n+++ b/tools/patman/patman.py\n@@ -140,7 +140,7 @@ else:\n             options.count + options.start):\n         ok = False\n \n-    cc_file = series.MakeCcFile(options.process_tags)\n+    cc_file = series.MakeCcFile(options.process_tags, cover_fname)\n \n     # Email the patches out (giving the user time to check / cancel)\n     cmd = ''\ndiff --git a/tools/patman/series.py b/tools/patman/series.py\nindex ad8288d..083af0f 100644\n--- a/tools/patman/series.py\n+++ b/tools/patman/series.py\n@@ -19,6 +19,7 @@\n # MA 02111-1307 USA\n #\n \n+import itertools\n import os\n \n import gitutil\n@@ -138,6 +139,9 @@ class Series(dict):\n         print 'Prefix:\\t ', self.get('prefix')\n         if self.cover:\n             print 'Cover: %d lines' % len(self.cover)\n+            all_ccs = itertools.chain(*self._generated_cc.values())\n+            for email in set(all_ccs):\n+                    print '      Cc: ',email\n         if cmd:\n             print 'Git command: %s' % cmd\n \n@@ -201,27 +205,33 @@ class Series(dict):\n             str = 'Change log exists, but no version is set'\n             print col.Color(col.RED, str)\n \n-    def MakeCcFile(self, process_tags):\n+    def MakeCcFile(self, process_tags, cover_fname):\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+            cover_fname: If non-None the name of the cover letter.\n         Return:\n             Filename of temp file created\n         \"\"\"\n         # Look for commit tags (of the form 'xxx:' at the start of the subject)\n         fname = '/tmp/patman.%d' % os.getpid()\n         fd = open(fname, 'w')\n+        all_ccs = []\n         for commit in self.commits:\n             list = []\n             if process_tags:\n                 list += gitutil.BuildEmailList(commit.tags)\n             list += gitutil.BuildEmailList(commit.cc_list)\n+            all_ccs += list\n             print >>fd, commit.patch, ', '.join(list)\n             self._generated_cc[commit.patch] = list\n \n+        if cover_fname:\n+            print >>fd, cover_fname, ', '.join(set(all_ccs))\n+\n         fd.close()\n         return fname\n \n",
    "prefixes": [
        "U-Boot",
        "v2",
        "2/2"
    ]
}