Show a patch.

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

{
    "id": 12225,
    "url": "https://patchwork.libcamera.org/api/patches/12225/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/12225/",
    "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": "<20210507084042.31879-5-naush@raspberrypi.com>",
    "date": "2021-05-07T08:40:41",
    "name": "[libcamera-devel,v6,4/5] ipa: raspberrypi: Add Overwrite method to RPiController::Metadata",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "bfeb58e0514232d6209424fc535d7997ad7ff4a6",
    "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/12225/mbox/",
    "series": [
        {
            "id": 2010,
            "url": "https://patchwork.libcamera.org/api/series/2010/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2010",
            "date": "2021-05-07T08:40:37",
            "name": "ipa: raspberrypi: Rate-limit the controller algorithms",
            "version": 6,
            "mbox": "https://patchwork.libcamera.org/series/2010/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/12225/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/12225/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 9FF30BF831\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  7 May 2021 08:40:55 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 60DD968919;\n\tFri,  7 May 2021 10:40:55 +0200 (CEST)",
            "from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com\n\t[IPv6:2a00:1450:4864:20::42f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B84EB6890E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  7 May 2021 10:40:51 +0200 (CEST)",
            "by mail-wr1-x42f.google.com with SMTP id x5so8297152wrv.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 07 May 2021 01:40:51 -0700 (PDT)",
            "from naush-laptop.pitowers.org\n\t([2a00:1098:3142:14:81ab:95ee:9715:e9fb])\n\tby smtp.gmail.com with ESMTPSA id\n\tl12sm7604098wrm.76.2021.05.07.01.40.50\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 07 May 2021 01:40:50 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"F0/KH1h0\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=ToAhjL9XFdxjjye6nKRusCeRANLcN15gZaOodjy4LOI=;\n\tb=F0/KH1h0po9NP/XRRJplLAtS8OXJmpfbGBtjJkaB8hq85vvGMwKwAnrVtiZIcuOFNh\n\tXcktEcDnQZzfI1Rcm8uQAXLeF7Uzpxi4ohaIE3JAKHUFott0QrDu6O7cbALBcVJ2QuKc\n\t7zDMrfrEMoX28EeKwueHRlfXQokID1tydBWdaflbKLlL/azBKk1Ydp9kyRM0dvV43WHG\n\ts3P/lWg5kHqTJk6zkIZoqb/e/vI2lp4jXqDu70KtwZMyQuiwn3BGw1b5S1dcth2nlH/Z\n\tsPem+DZMGuTO2uXYugFw/0sXQHJTfndRRJmSGqxkaY0PT/9KuYhd4ZYwsJY92xnzvY5G\n\t2kiw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=ToAhjL9XFdxjjye6nKRusCeRANLcN15gZaOodjy4LOI=;\n\tb=BaXSneB/a7D1zqibPLKmkrEhgdAOspAxFMxILhvrjObOPpe7BKLHJs8G4CuWcBYzo5\n\tKMhDr7JiIhosuUDafPKzykWRpQbNkf9R84LCdIYANLpR9f2LEqgJFxJRC6Ny1wc68BA/\n\t/IzBB6pSjsstpXl/YORE5gT7kbqOsWHp99OQVQf883vykyL2zq/Jg48k9J25atd3HHZJ\n\tM/luGlr+k5eoxDFyMtC2pbOhLw1MxPt60Cd6l0YnjuWewuGd3VoNLboMONox6uophLwm\n\tTPG/WQOXHfNLNcPl74BSxke2ya4FW4ALhZr2IE5pGYyR4JAaQ1Ra3PyvKwZdbJ5R136c\n\tbaBQ==",
        "X-Gm-Message-State": "AOAM532LTDCtaPXm5/KdQ7EwjgRkjMYFcFCzV2jz/XmZUh21Q9ct2TMf\n\tCwjQdl2eRUnU4IbLSzUhGufTZZC2pciv1Q==",
        "X-Google-Smtp-Source": "ABdhPJw8hynxj6NuYoXAa7/TyWDXLDjE+nEg8ztapsVGSjwXP7pZ/WDmX6dILWYpYgAMXk974oCyhw==",
        "X-Received": "by 2002:adf:fa06:: with SMTP id\n\tm6mr10847400wrr.387.1620376851299; \n\tFri, 07 May 2021 01:40:51 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri,  7 May 2021 09:40:41 +0100",
        "Message-Id": "<20210507084042.31879-5-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210507084042.31879-1-naush@raspberrypi.com>",
        "References": "<20210507084042.31879-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v6 4/5] ipa: raspberrypi: Add Overwrite\n\tmethod to RPiController::Metadata",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add a new Overwrite method to the Metadata class. This will overwrite\nall key/value pairs in a destination object that have an identical key\nin the source metadata object. Once complete, the source Metadata\nobject will be empty.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/raspberrypi/controller/metadata.hpp | 20 ++++++++++++++++++++\n 1 file changed, 20 insertions(+)",
    "diff": "diff --git a/src/ipa/raspberrypi/controller/metadata.hpp b/src/ipa/raspberrypi/controller/metadata.hpp\nindex 319f2320fc70..ac64f17f617c 100644\n--- a/src/ipa/raspberrypi/controller/metadata.hpp\n+++ b/src/ipa/raspberrypi/controller/metadata.hpp\n@@ -75,6 +75,26 @@ public:\n \t\treturn *this;\n \t}\n \n+\tvoid Overwrite(Metadata &other)\n+\t{\n+\t\tstd::lock_guard<std::mutex> lock(mutex_);\n+\t\tstd::lock_guard<std::mutex> other_lock(other.mutex_);\n+\n+\t\t/*\n+\t\t * Overwrite any contents of data_ with identical keys from\n+\t\t * other.data_. Any keys from other.data_ that are not preset in\n+\t\t * data_ will simply be copied across.\n+\t\t *\n+\t\t * The reason for the seemingly illogical steps below is because\n+\t\t * std::map::merge() does not overwrite existing keys.\n+\t\t */\n+\t\tother.data_.merge(data_);\n+\t\tstd::swap(data_, other.data_);\n+\n+\t\t/* Render the other object as empty now! */\n+\t\tother.data_.clear();\n+\t}\n+\n \ttemplate<typename T>\n \tT *GetLocked(std::string const &tag)\n \t{\n",
    "prefixes": [
        "libcamera-devel",
        "v6",
        "4/5"
    ]
}