Show a patch.

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

{
    "id": 17300,
    "url": "https://patchwork.libcamera.org/api/patches/17300/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17300/",
    "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": "<20220905073956.7342-5-naush@raspberrypi.com>",
    "date": "2022-09-05T07:39:53",
    "name": "[libcamera-devel,v2,4/7] ipa: raspberrypi: Add RPiController::Metadata::mergeCopy",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "6811ad2104b7bbd6ba2e1fce635e28255d92b614",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/17300/mbox/",
    "series": [
        {
            "id": 3471,
            "url": "https://patchwork.libcamera.org/api/series/3471/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3471",
            "date": "2022-09-05T07:39:49",
            "name": "Raspberry Pi AGC digial gain fixes",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/3471/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17300/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17300/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 7044EC327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  5 Sep 2022 07:40:09 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 059CB62067;\n\tMon,  5 Sep 2022 09:40:09 +0200 (CEST)",
            "from mail-wm1-x334.google.com (mail-wm1-x334.google.com\n\t[IPv6:2a00:1450:4864:20::334])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7CDBC62058\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  5 Sep 2022 09:40:06 +0200 (CEST)",
            "by mail-wm1-x334.google.com with SMTP id\n\tv7-20020a1cac07000000b003a6062a4f81so7277973wme.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 05 Sep 2022 00:40:06 -0700 (PDT)",
            "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tv16-20020a5d5910000000b00228a6ce17b4sm1342841wrd.37.2022.09.05.00.40.04\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 05 Sep 2022 00:40:04 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662363609;\n\tbh=U7rRLgZNVeakhzpRY7gzpK21lH//TwjRw+pO6UfATzU=;\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=glPjdIuNp0lmXSyIBRUGL6uV6F7XMsk7aXiaPkZYswdyiXt1LTK/9vI9ZLtVk3TIb\n\tCI4g2VelbkDlklzaxlfZaiIKZiEq6dWm5oNKMdOc3Hp6pa8QBdu0pqUidLc5APjnhu\n\tdd+6nGAQCd0pzBh64RKyWGUxQOfOEgILm0axpFNTYjJEF9a/kkhhuEWZaVzX8CAZ7B\n\tYCP6DJted6c6F9BnRZqY/pcENgGbm6ajB0fXHu4LLDekf+rYWC3rQJk4g+Ah/F9G8h\n\t3ahOS5fBZFSV1K0Vvpm/jBhEvNfB/aVpZeFPe7TVw70wUcSOoZ8nOlgaK3W7BS2Kn5\n\tULpmTEFr/Ph7w==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date;\n\tbh=W8bW29zIOyXkNjvwpfgjJZmcaplT23dZq31GBRrrDss=;\n\tb=bsXv9JCjyNwv34Sz2Ey7zDI3QNraMutGQ2XnnH017TI8kvrHGlTe4umjB+Lc9mptzc\n\teX6uRxoWv5DbAE5QxiubjxGyz4lq8IxGjhCAN8ARsSsNh4DVOXfakWbM+6dW39T4xoxt\n\tBEQCnLlFluMWZmHo7+4bXGmYIIoytSjZCR2hqlRlzMkoXWHPo6uATxQBqhszNzqbaQYU\n\tkVj3GTJAF28B80OCl+z83VP5d7gmQ4/AI2xWLop6+rDLKqQsUYQPwt7BRX3zauYRT1Ub\n\trFRKEaAbjmoZKeEtIgZ7jOP+YQZLds4JDAbWcfm3pBnIthft4pCzpB3gxN08HQfdeQK+\n\t+lsQ=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"bsXv9JCj\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date;\n\tbh=W8bW29zIOyXkNjvwpfgjJZmcaplT23dZq31GBRrrDss=;\n\tb=Rt7UNMBIU3OglcinhcVPKxzz2BFZmXHRVVDMpMsDcM3BSmHw6OXfa8nTyVK64sg9D5\n\tisOnDSp48b6RevMc5bJHid5zoGhRUPm3MUgCSDtljj+zBlBSCSGmeQK+5s1EC6nUZefI\n\tfYlSnzwkqXkHFH5aDsYVCqwxOhwY3l2+QuCHNHhCuGM6qA84AnJwBYlmuvfOk+zsADUF\n\tS7pU+n+hudOFvKy9KOWhQ2pvSaaWvV+FsJ7hLDahm8LZp15+G/yZ3OZBToDB5WevM4as\n\tBTDPY3V7XGETfSbTBmrvwp3TLM/TaPXvggGuZvaibA8ssfXV1w4rIF2GRlHMBa0mzL8p\n\toO4g==",
        "X-Gm-Message-State": "ACgBeo23GE3wLvGBX+g4vHt4aGhJguixrbzJXSN9IdWLCcJqoCRof/Ys\n\twh79prPHeRgIoma8lmwa+ikpmLPN1/VadcZS",
        "X-Google-Smtp-Source": "AA6agR59LEvGm9UrPDqinKBKgUQW0iPRvJgHZGbmyGYOfK5/Niy/ip89Rf7Esv/3ALf0dSDUzw4BLw==",
        "X-Received": "by 2002:a05:600c:4148:b0:3a5:4f94:577b with SMTP id\n\th8-20020a05600c414800b003a54f94577bmr10107956wmm.167.1662363605834; \n\tMon, 05 Sep 2022 00:40:05 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon,  5 Sep 2022 08:39:53 +0100",
        "Message-Id": "<20220905073956.7342-5-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220905073956.7342-1-naush@raspberrypi.com>",
        "References": "<20220905073956.7342-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 4/7] ipa: raspberrypi: Add\n\tRPiController::Metadata::mergeCopy",
        "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": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Naushir Patuck <naush@raspberrypi.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add a new member function to RPiController::Metadata that copies unique\nkey/value pairs from one object to the other. This is different from\nstd::map::merge that would remove the key/value pairs from the source object.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/raspberrypi/controller/metadata.h | 12 ++++++++++++\n 1 file changed, 12 insertions(+)",
    "diff": "diff --git a/src/ipa/raspberrypi/controller/metadata.h b/src/ipa/raspberrypi/controller/metadata.h\nindex 0f7ebfaf4c25..3816e9f8536d 100644\n--- a/src/ipa/raspberrypi/controller/metadata.h\n+++ b/src/ipa/raspberrypi/controller/metadata.h\n@@ -78,6 +78,18 @@ public:\n \t\tdata_.merge(other.data_);\n \t}\n \n+\tvoid mergeCopy(Metadata &other)\n+\t{\n+\t\tstd::scoped_lock lock(mutex_, other.mutex_);\n+\t\tfor (auto &kv : other.data_) {\n+\t\t\t/*\n+                        * If the metadata key exists, ignore this item and copy\n+                        * only unique key/value pairs.\n+                        */\n+\t\t\tdata_.insert(kv);\n+\t\t}\n+\t}\n+\n \ttemplate<typename T>\n \tT *getLocked(std::string const &tag)\n \t{\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "4/7"
    ]
}