From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id fv6qIyi7KGX/ggEAauVa8A:P1 (envelope-from ) for ; Fri, 13 Oct 2023 05:36:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id fv6qIyi7KGX/ggEAauVa8A (envelope-from ) for ; Fri, 13 Oct 2023 05:36:08 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6A7C248072 for ; Fri, 13 Oct 2023 05:36:08 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=GtV9639B; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697168168; a=rsa-sha256; cv=none; b=IjOzpHE8Qdi30GBk+VuOarYfH6KZvKnnoirTyIg9wQ0YUSq+G6nXVJvIVbwlmdZ4NH0ORt DfFgsRDZ46hKAJ1ToZ2JjOR9irbuWjl6r41cabLzbtgQ+vGVZUkvCuSsw12njY7ks4VvS9 VcrPM1nCNwXnvF7riaRzx9fqK9TbieahRV9IQn++OQgnHd50J3X9PB7Uj2MOpqLzil3W54 5WovRV1GILy4KzA5bv5Xu8ZpiNoXL2mIKixpg2ksgeP+z2AxuVlHY+gQ5IXfz6Q9GFz3Sj EvBbCo8Gst6t0tg7/4MM8fPEaIEnEOGX2WRbu2MxGe5FQyVlnrmKplkDP+0JEg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=GtV9639B; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697168168; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=5BJtwCavyKAWFV+qF/ZJIkorZkgFcF7eg1tqdvdqTIM=; b=SIo3WCChSel7jxGU607FA0yhRBIHKBO/rv+Vk5OeKKqUSBnhtkag9Et/q1Kvk7b7vQMylH Pghg+QiYlPzk2ShZjJwA2zS0qLtjk3KD42ZsRL2f/etAIcxSMffIST33q3+KbQn7TPzZfB 2Nuwim7IM2cYcDLqM9KBVXXDJsN+O7Ux1VueewQ0Yb4+TSA21iHBA/2Hx/8ONKZ/+8RA56 B9cRGMYsN8r1k0rYzFQZFpa2UyDIycfovcpdK7p6Ikxpw4nr+R1IJqhZy1hYjBfAF4zXbv QMwk6OmbjROuRAizdmXm/9+jWDICsIZ1l9BPbJ+QHf70dv03Jdq1wiK1AJ3jOQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qr8xi-0001vH-IL; Thu, 12 Oct 2023 23:35:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qr8xh-0001uV-Gr for bug-guix@gnu.org; Thu, 12 Oct 2023 23:35:41 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qr8xg-00018Z-Sg for bug-guix@gnu.org; Thu, 12 Oct 2023 23:35:40 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qr8y2-0007vQ-KO; Thu, 12 Oct 2023 23:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#66027: [PATCH v3 3/3] etc: teams: Parse 'From' commit more leniently. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org, Giovanni Biscuolo Resent-Date: Fri, 13 Oct 2023 03:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66027 X-GNU-PR-Package: guix X-GNU-PR-Keywords: help moreinfo notabug To: 66027@debbugs.gnu.org Cc: Giovanni Biscuolo , Maxim Cournoyer , Simon Tournier Received: via spool by 66027-submit@debbugs.gnu.org id=B66027.169716814830430 (code B ref 66027); Fri, 13 Oct 2023 03:36:02 +0000 Received: (at 66027) by debbugs.gnu.org; 13 Oct 2023 03:35:48 +0000 Received: from localhost ([127.0.0.1]:44529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qr8xi-0007ud-A8 for submit@debbugs.gnu.org; Thu, 12 Oct 2023 23:35:48 -0400 Received: from mail-qv1-xf2b.google.com ([2607:f8b0:4864:20::f2b]:47214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qr8xc-0007tu-TR for 66027@debbugs.gnu.org; Thu, 12 Oct 2023 23:35:41 -0400 Received: by mail-qv1-xf2b.google.com with SMTP id 6a1803df08f44-66d13ac2796so8274126d6.2 for <66027@debbugs.gnu.org>; Thu, 12 Oct 2023 20:35:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697168108; x=1697772908; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5BJtwCavyKAWFV+qF/ZJIkorZkgFcF7eg1tqdvdqTIM=; b=GtV9639BdyHqLBckENadFH6uQU+g3W1ne1MYT+DJ04VPepk4E+zXG77VTkMe7Smybe vp1c7A1a+D7VuiKmpiW+iTnpodwYYvX4kMqmSgORnO0wGIP9D8FtVPrJaSDTXQAgWCEV FkPvSzryEhChotaAjv5mP9zQ+fwUlfQiXB68STyQ31Vtna38knUmev0HULMdSoT2vFP2 uVoh++Di/t3MZekvvSuBVHW8JVIz/EwMf/ZNb/zp7Ea9VdMXYxFuux0lJCXlWAE+Crmt zgn0tgErzQMfZoths0r/81nhJkKxMNvH/JZx0P/+XhHRZ0zoIqz5r5Tdnwl+8ZzZj3cq Y77w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697168108; x=1697772908; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5BJtwCavyKAWFV+qF/ZJIkorZkgFcF7eg1tqdvdqTIM=; b=L8uqWCG7T+JSqZM7qEoJQP8o2Hj1BkXSf6ylHCcfONKA2NriKF4TRbmR98iqcBLxlN +sXs3/mFwi9Lhgh7xGR/0+NORD6BSEK8zgZ6jsmlbZtKRO1h7Lysd3qPeruvNXzNH+CC nL2kUFn0sFG/XBYioQYwBRfYcFJ8C0ssovd3Sh7MCdFcGUsV79YnMkg36ddWE6jQoEox WI9Qs4/+ONLMxu37mudgxzqpqsBK6jQUz+fqZaa3Oh4h+DY52LyCdceCAO6pGfo6eQG1 pyZWPJvBQ4xHm8dyNKSwsVSNlxmfCbxKLSHZdtA3PDEBFd6tj/ZmgN3j11bCQz2WoLSv fSsQ== X-Gm-Message-State: AOJu0Yw2aNM/YjkX5ahobw6yRcqpcmbtzX6fR920cmoHgfYOU9/IgVc3 d49FiQGktN1Y2rTYcZw/MP7gqvAAkpLJig== X-Google-Smtp-Source: AGHT+IGThnWsrLqP+R3aZyIkVMQWUwXmrPTLSk+xAbb4qA+LgiZIFJjKAv+XFrioGupK51gmDdQeuw== X-Received: by 2002:a0c:8c44:0:b0:656:3ed4:ffe9 with SMTP id o4-20020a0c8c44000000b006563ed4ffe9mr23103756qvb.58.1697168108394; Thu, 12 Oct 2023 20:35:08 -0700 (PDT) Received: from localhost.localdomain (dsl-10-128-66.b2b2c.ca. [72.10.128.66]) by smtp.gmail.com with ESMTPSA id v5-20020a0ccd85000000b00655e428604esm329512qvm.137.2023.10.12.20.35.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 20:35:07 -0700 (PDT) From: Maxim Cournoyer Date: Thu, 12 Oct 2023 23:33:45 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <177d9176ef9d06a4ee51c271db982c15d7729a0e.1697168025.git.maxim.cournoyer@gmail.com> References: <177d9176ef9d06a4ee51c271db982c15d7729a0e.1697168025.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: 4.80 X-Spam-Score: 4.80 X-Migadu-Queue-Id: 6A7C248072 X-TUID: DleffhiJqIok When a Change-Id is used, patman prepends a Message-Id field on the first line of the patch, which broke the assumption that the 'From $commit' line must appear on the first line. * etc/teams.scm.in (git-patch->commit-id): Loop each line of the file until a match is found. Update doc. Change-Id: I20400f87469ffb761ffc82dd32e34cd06f619043 --- Changes in v3: - New commit etc/teams.scm.in | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/etc/teams.scm.in b/etc/teams.scm.in index 55242caad1..703d76fe8d 100644 --- a/etc/teams.scm.in +++ b/etc/teams.scm.in @@ -770,13 +770,16 @@ (define (diff-revisions rev-start rev-end) files)) (define (git-patch->commit-id file) - "Parse the commit ID from the first line of FILE, a patch produced with git." + "Parse the commit ID from FILE, a patch produced with git." (call-with-input-file file (lambda (port) - (let ((m (string-match "^From ([0-9a-f]{40})" (read-line port)))) - (unless m - (error "invalid patch file:" file)) - (match:substring m 1))))) + (let loop ((line (read-line port))) + (when (eof-object? line) + (error "could not find 'from' commit in patch" file)) + (let ((m (string-match "^From ([0-9a-f]{40})" line))) + (if m + (match:substring m 1) + (loop (read-line port)))))))) (define (git-patch->revisions file) "Return the start and end revisions of FILE, a patch file produced with git." -- 2.41.0