From nobody Wed Sep 23 09:02:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1646645851; cv=none; d=zohomail.com; s=zohoarc; b=MdtuxGUsVT0QYayzjEBFTHU+Lr6NGAENPGq8aFeM0Hx6f7hGjjA8SYVJg3oSMLeNlgZs20HA18o/10ib1AJ9noko6jnqbuT/Amt+sJzQKzXp90yhuJLnctOxg3798lSp5fq3MpdPmmyC5nTujdS8guVUQ2PkLrldo4hle1gY9Jo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1646645851; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oH20oScBqgZtQBL7Z8RHAg70RQJ4UGBFClxFWLSCuZo=; b=Wqy7ZQPEGu3/CxiXs0sbqInFBsOHfoYSF4DjEpkyHLy3cCqjQ+AL/JHky4xhwFGUliCYKWfPLIk+aFome9u0xQuM14rvlyT9Lf4emEXyJJBeX+PhguUAF6u3qCF+DnPFZMMUSWyxDQ4TtPP9DOwjXbhUAUZ8x1bHI3J+HHuXECs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1646645851569499.59724903542826; Mon, 7 Mar 2022 01:37:31 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-616-xpcVTF5COzmoil9d0CV0IA-1; Mon, 07 Mar 2022 04:37:27 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3D394185A7A4; Mon, 7 Mar 2022 09:37:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3439C1466C41; Mon, 7 Mar 2022 09:37:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id EF59E1931BE9; Mon, 7 Mar 2022 09:37:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 465511931BE9 for ; Mon, 7 Mar 2022 09:37:25 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 260D4400C849; Mon, 7 Mar 2022 09:37:25 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 21FF040C1247 for ; Mon, 7 Mar 2022 09:37:25 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 09A891097AF2 for ; Mon, 7 Mar 2022 09:37:25 +0000 (UTC) Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-368-W0QfWQ_4N1S-d3cnuskymg-1; Mon, 07 Mar 2022 04:37:23 -0500 Received: by mail-ej1-f42.google.com with SMTP id a8so30497413ejc.8 for ; Mon, 07 Mar 2022 01:37:23 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id g16-20020a170906521000b006d58773e992sm4524340ejm.188.2022.03.07.01.37.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Mar 2022 01:37:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646645850; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=oH20oScBqgZtQBL7Z8RHAg70RQJ4UGBFClxFWLSCuZo=; b=ZohJA04NnoCLJ92NivBimAyvSTZh/+6pWoPqki2kNaYaF/i5A5VZTrGZkq4vGPp0a89EK2 MV65zNsgz7RwXDjtm5PrduiVZFevqk+rT0v73oSFL3r6s6RKb8GxtscB4nH5hzDRhtOUoY OSUCSl91fzIBFeZnj0r018gtakqM9tE= X-MC-Unique: xpcVTF5COzmoil9d0CV0IA-1 X-Original-To: patchew-devel@listman.corp.redhat.com X-MC-Unique: W0QfWQ_4N1S-d3cnuskymg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=W9fRhSaLHOl4YOED+VctGbFMyUAm2xJL0hopPc7Jz9A=; b=E3wrKFg66Z2Mk4z31Uo2/ATgNtF9Qt8ui7gNECg1s/xCsT6GsG+CjVQflkIL8auUY+ GBXLusZWoTb82tGuGZCgUIcgchgrC+3eMJTOtuhqK0An37n/mam2iDVns8FDhsWN9DAG zCbxdBP9VWfz0EHzzBNrtkeDb9mFLRT3CqKk3/zbGPcK5l7/7gblrFHvDd7EQcXER/PN csJmpkKb7X6B9kDLKLwsvVkEU/svOtOGnhj7XCmTw8JHwKJe63ba2IrR4lVtjNl+kGIX 0K/Fcaavy33Op5xnHEhTtN945MSfwMwnbgUFbs6VE3BYWi9CUjAd9+6fmNxKt6yyaNGE 5rgQ== X-Gm-Message-State: AOAM532A+46QR2o3q041VXSbL2VBwHvrPB/uN+FS9vAp10uJz+EYjQLP 5cEwhQmFsAoXuSzGlBT7FoWDrOW9ujk= X-Google-Smtp-Source: ABdhPJxIjUUA1Wq3/umQcwRdFQHsnpu9QaGQ+TsNxWOywCRIPKINMq1/HkkW9gLkC3M6UsrNyT2AEw== X-Received: by 2002:a17:907:94c1:b0:6db:67:7214 with SMTP id dn1-20020a17090794c100b006db00677214mr7864082ejc.180.1646645842122; Mon, 07 Mar 2022 01:37:22 -0800 (PST) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Mon, 7 Mar 2022 10:37:18 +0100 Message-Id: <20220307093719.544203-3-pbonzini@redhat.com> In-Reply-To: <20220307093719.544203-1-pbonzini@redhat.com> References: <20220307093719.544203-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 Subject: [Patchew-devel] [PATCH 2/3] patchew-cli: process headers for project update in Python X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchew-devel-bounces@redhat.com Sender: "Patchew-devel" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1646646753114100017 Content-Type: text/plain; charset="utf-8" This will make it easier to match more cases. Signed-off-by: Paolo Bonzini --- patchew-cli | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/patchew-cli b/patchew-cli index b8ac054..d29b539 100755 --- a/patchew-cli +++ b/patchew-cli @@ -491,14 +491,16 @@ class ProjectCommand(SubCommand): logging.debug("old head: %s", old_head) logging.debug("new commits: \n%s" % "\n".join([" " + x for x in n= ew_commits])) output =3D subprocess.check_output( - """git show --format=3D%%b %s | - awk 'BEGIN{IGNORECASE=3D1} /^message-id:/{print}' - """ - % " ".join(new_commits), - shell=3DTrue, + ["git", "show", "--format=3D%b"] + new_commits, cwd=3Dclone, ).decode() - msgids =3D [x[len("message-id:") :].strip() for x in output.splitl= ines()] + msgid_trailer =3D 'Message-Id:'.casefold() + msgids =3D [] + for x in output.splitlines(): + words =3D x.split() + header =3D x.casefold() + if header.startswith(msgid_trailer): + msgids.append(x[11:].strip()) logging.debug("message ids: \n%s" % "\n".join([" " + x for x in m= sgids])) push_to =3D project["mirror"].get("pushurl") if push_to: --=20 2.34.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://listman.redhat.com/mailman/listinfo/patchew-devel