From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D19AC41513 for ; Thu, 3 Aug 2023 09:16:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231817AbjHCJQn (ORCPT ); Thu, 3 Aug 2023 05:16:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234073AbjHCJQj (ORCPT ); Thu, 3 Aug 2023 05:16:39 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 016BFE46 for ; Thu, 3 Aug 2023 02:16:38 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-317798b359aso596412f8f.1 for ; Thu, 03 Aug 2023 02:16:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691054196; x=1691658996; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:reply-to:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=3qjTxnd4KtTTOKG14S4/4BnF9x1FwZI+P+SQK+cy1Q0=; b=CNJ2m5qzGE5gwyNdXs1sH6KOgQxlKSIHDjGkj6guZkjEyYkkO/XOqo/bP+FrP1ErPd ezB2MKpzBPnZLymibjrG6yL/pPAXWBRaf1kHrkKZIELELGLRvs0aWl4OEL2NALEGZm6l aAXtdq42NEv4YLPCJ4SKdR1cvpwrQBFAfeNdo93rpxPt3zg64ugXOaGAolNanT8v50w/ Wd+kV0GlBFcvgDfQ22Bqnho/zumP59kxYuxJxJaFQpCn8tXOmVUgfjQOJOCcFOwddr9u iq0vcJtAAJ/oLYWvAbZU2qgu8h7/HoL5DBd4NZg7qfXFmT8gYIz1wI4gqiUn2E8yNjCX 3m/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691054196; x=1691658996; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:reply-to:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=3qjTxnd4KtTTOKG14S4/4BnF9x1FwZI+P+SQK+cy1Q0=; b=Y5UxplnYaMp6VzHPIuerMYGk/e730t8tyq5STtJzICxR7AuBlNdTBCiWCL2ugBUzdC j+aRT7/W+RgSMQKtDKkdQ5kVlLRUFNYRWXSfCdRyYrDDrZIfngKPPkhEnptK/r9xEKyU jJz5ne3+GbgJQuU7quTz8/+9sXJ1bY4O84KjZ+Kfup/LXxfLhQvDviZOQMsu3lnU8mOj iyPkeRdYBa0O44fChPxdF7dfzA5Zd5AhOoQe68xnGiJGcN69iY7sACLGfdGVhO2PdV3x HVpWGdAfe8YqnihyEjMVJmTyUDNruepeTDaxjc39Ko7oolXa9n5pMmBaNvT25PWiZ6/N X9gw== X-Gm-Message-State: ABy/qLZP1V/xmW2AVgnOhR+trTGpV96LbCY4GYsj86MoF8jkFlfj1K8v dfjtCfi9l8F6+NRS9CiRug8jkg== X-Google-Smtp-Source: APBJJlEbMgvuYyt6jh+e+n6VqroGKijmgJQ7xQY+spS0oF/gn/I2gqCbv1hokho+dYSXUMUWKBIkAw== X-Received: by 2002:a5d:69d1:0:b0:316:ff0e:8213 with SMTP id s17-20020a5d69d1000000b00316ff0e8213mr6661940wrw.15.1691054196274; Thu, 03 Aug 2023 02:16:36 -0700 (PDT) Received: from ?IPV6:2a01:e0a:982:cbb0:8656:583:d034:d966? ([2a01:e0a:982:cbb0:8656:583:d034:d966]) by smtp.gmail.com with ESMTPSA id y18-20020a5d6212000000b003143c6e09ccsm21481602wru.16.2023.08.03.02.16.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Aug 2023 02:16:35 -0700 (PDT) Message-ID: <27b8f21c-f705-ba65-5b2e-912fb97a85a9@linaro.org> Date: Thu, 3 Aug 2023 11:16:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Reply-To: neil.armstrong@linaro.org Subject: Re: [PATCH v2 0/1] Add add-maintainer.py script Content-Language: en-US To: Guru Das Srinagesh , Masahiro Yamada , Nick Desaulniers , Andrew Morton , Nicolas Schier , Kees Cook , Bjorn Andersson , robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, Will Deacon , Greg Kroah-Hartman , quic_pkondeti@quicinc.com, u.kleine-koenig@pengutronix.de Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org References: From: Neil Armstrong Organization: Linaro Developer Services In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi, On 03/08/2023 10:23, Guru Das Srinagesh wrote: > When pushing patches to upstream, the `get_maintainer.pl` script is used to > determine whom to send the patches to. Instead of having to manually process > the output of the script, add a wrapper script to do that for you. > > The add-maintainer.py script adds maintainers (and mailing lists) to a patch, > editing it in-place. FYI the b4 prep command does this: https://github.com/mricon/b4/blob/e8045d1353165cc065b2f1b180bf1b0846af510e/b4/ez.py#L2055 Perhaps it could be useful to make sure the output is similar ? So far I've been very satisfied by the output of b4 auto_to_cc. Thanks, Neil > > Thanks to Bjorn for being a sounding board to this idea and for his valuable > suggestions. > > Please try out this script with `--verbosity debug` for verifying that it's > doing "the right thing". I've tested this with a patch series from various > subsystems to ensure variety of maintainers and lists output and found it to be > doing what it is supposed to do. > > I referred to the following links during development of this script: > - https://stackoverflow.com/questions/4427542/how-to-do-sed-like-text-replace-with-python > - https://stackoverflow.com/questions/4146009/python-get-list-indexes-using-regular-expression > - https://stackoverflow.com/questions/10507230/insert-line-at-middle-of-file-with-python > > v1 -> v2: > - Added set-union logic based on Pavan's comments [1] and Bjorn's early suggestion > - Expanded audience and added more mailing lists to get more review comments and feedback > > [1] https://lore.kernel.org/lkml/63764b84-3ebd-4081-836f-4863af196228@quicinc.com/ > > Guru Das Srinagesh (1): > scripts: Add add-maintainer.py > > scripts/add-maintainer.py | 113 ++++++++++++++++++++++++++++++++++++++ > 1 file changed, 113 insertions(+) > create mode 100755 scripts/add-maintainer.py >