From nobody Sun Dec 22 11:05:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1646645854; cv=none; d=zohomail.com; s=zohoarc; b=IuTxe+ThaD9dtXagnEQsP8k2IMRdMRi9g9sY3dkINR/vp+NJI5c4zcbWKh5cHjQoQCgJKfZsBfrKhGiLuV9505FyYU2DFlom5s8zq2jYCUB50cgB/A3Vd3DzpsdOXjXIIuxpmUgCJ3C0Gu6pM1W5DnLFgzXVpxlFfK6tpRdRgts= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1646645854; 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=2DHGmdkJNqaeyM+T2YRZnSrvVxBcfGk1Kefa/UCD9UQ=; b=VjoZU+cMZ/PhUDE7J5C5Qq+U/3SOZLT0sR5H7G7OA6TuV75l1dSpHDY4RqAye4wPrYCZEMtkYjapLJ4MPsRXabesZng/l3eo7KJbdH5EyeZD9ti05popZhmNDM16qBv2OYcttmHblEQ2QVb6lp/oLLuor8Q+cAU0LAjxifZpOHo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1646645854443942.9141419154579; Mon, 7 Mar 2022 01:37:34 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-315-A2c2a35uPSqHTtON7K-wZQ-1; Mon, 07 Mar 2022 04:37:30 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 311593811F20; Mon, 7 Mar 2022 09:37:30 +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 294F9401E38; Mon, 7 Mar 2022 09:37:30 +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 046241931BE9; Mon, 7 Mar 2022 09:37:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B84B91931BDD for ; Mon, 7 Mar 2022 09:37:28 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 98E63401E40; Mon, 7 Mar 2022 09:37:28 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 94F18401E38 for ; Mon, 7 Mar 2022 09:37:28 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (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 7C5A0811E75 for ; Mon, 7 Mar 2022 09:37:28 +0000 (UTC) Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-441-8VIrvgUvObihqRJV-iUwiQ-1; Mon, 07 Mar 2022 04:37:24 -0500 Received: by mail-ej1-f48.google.com with SMTP id yy13so21673310ejb.2 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.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Mar 2022 01:37:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646645853; 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=2DHGmdkJNqaeyM+T2YRZnSrvVxBcfGk1Kefa/UCD9UQ=; b=CO9DLPzQ6bxFLmFmknKHFDlfjKKBW6McjlnK+vboAtlPPe6abTh+U7wtUA57CtsQMAEEkf Z2p4lZ8CBZUr1qvuaa61DhUrQU1mIufhb1Rh2L7mLyan6oSp+qmHFV3BS8RRjXdOMcP8vw fJTob5EFHNcTTgQj7CGptLKudPDdrt4= X-MC-Unique: A2c2a35uPSqHTtON7K-wZQ-1 X-Original-To: patchew-devel@listman.corp.redhat.com X-MC-Unique: 8VIrvgUvObihqRJV-iUwiQ-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=6GI+fS0MBu7rh6lPMUrOl/gNaPQ92aDFCvXc/L/HigA=; b=cUWFJce7BIwKAbXz90vocv+eNEfbTPzRsW3I5iNfbKLw7Sf5MlKcHvyDLsocM/kPnN h/PaHqyXV0rarEdw9xYKDvWRnYcq5FSwoUlKyZ8y7r6jKh3glVMy5i3hwNqF2CQDwcHD 5SdY6G+qLvhdpraB9rfOUcbosp9skauyGuCvNg4HeDJ1igUXsEBCCQVXhZIQsY88UVYt QUxmnkuDez9FQsfkdcfdC+c05sbV21Ar7n0iQNMDfVvvPB7CIuRz1PtsBgsLwBOoeP3D llU2S2AGAuDlR7ywZ17Ymr7Qdbw1TLpRoMX1dGyETiUDN6m5RbgjSW9FHjn3ktF4Bnyt nqYg== X-Gm-Message-State: AOAM531uUjwDitTYsHCwI6ciN483K9MHcbvDetodsztwFVLj3dcOLS7E R6H8dHgpspOuQgAyO4xef6YZCHfgz5w= X-Google-Smtp-Source: ABdhPJw4h0SlhCvsTdHV42iqZe0JApQFQLLuuzrvBtGjs0ovZHbayNghqSZJTZbm6hdYsX4XBYVGuA== X-Received: by 2002:a17:907:7e8f:b0:6da:6352:a7be with SMTP id qb15-20020a1709077e8f00b006da6352a7bemr8114728ejc.612.1646645842839; Mon, 07 Mar 2022 01:37:22 -0800 (PST) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Mon, 7 Mar 2022 10:37:19 +0100 Message-Id: <20220307093719.544203-4-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.85 on 10.11.54.10 Subject: [Patchew-devel] [PATCH 3/3] patchew-cli: also match Link headers pointing to lore.kernel.org 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.10 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: 1646645854684100013 Content-Type: text/plain; charset="utf-8" These are a common alternative to the "Message-Id" header provided by "git = am -m", so use them in "patchew project update". Signed-off-by: Paolo Bonzini --- patchew-cli | 3 +++ tests/data/0037-foo-patch-for-git-am.mbox.gz | Bin 0 -> 359 bytes tests/test_import.py | 20 +++++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 tests/data/0037-foo-patch-for-git-am.mbox.gz diff --git a/patchew-cli b/patchew-cli index d29b539..f269413 100755 --- a/patchew-cli +++ b/patchew-cli @@ -495,12 +495,15 @@ class ProjectCommand(SubCommand): cwd=3Dclone, ).decode() msgid_trailer =3D 'Message-Id:'.casefold() + lore_link_trailer =3D 'Link: https://lore.kernel.org/r/'.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()) + elif header.startswith(lore_link_trailer): + msgids.append('%s' % x[32:].rstrip()) logging.debug("message ids: \n%s" % "\n".join([" " + x for x in m= sgids])) push_to =3D project["mirror"].get("pushurl") if push_to: diff --git a/tests/data/0037-foo-patch-for-git-am.mbox.gz b/tests/data/0037= -foo-patch-for-git-am.mbox.gz new file mode 100644 index 0000000000000000000000000000000000000000..ace183aef67739ff82c497825c1= ab8f3c5cab069 GIT binary patch literal 359 zcmV-t0hs(jb}!9UgNI>#=3DyD(x$k5`n|Hl?c>$v`gVthQJZmU@SwUAPP{>Ogl|(7JdVSl zjim~p)*9ems(p&BwZk#>yiOZ(_hb}xa~IEeGn