From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 43B4FA0C50 for ; Mon, 9 Aug 2021 09:44:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 291E9411A8; Mon, 9 Aug 2021 09:44:26 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2047.outbound.protection.outlook.com [40.107.94.47]) by mails.dpdk.org (Postfix) with ESMTP id 8E5D34068A; Mon, 9 Aug 2021 09:44:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=btwWulQwpwENrGAOmjhBsxbULxG13eLusLNnotYsgxEWsOPKzmtxtb10pWgCtrUoSVUYvKROXmIYu8juRgvXUFp/uwJf9w5Fr+MkzHf0yDiQQIz/FOSCf03brmrFJ1wl0kdUMz1+A8XH20TiEUdvCEG+M16kjq/tyDi6KV0MhoJVsnbQG0QcVtlR0nhUiqgKIaOeBBghpgr74mi0AYGaIVzvZV6Lbbqwhjt1nbnHHM3g5wAn1IWvQP8Heg/Ljj2T1jruP6ukQcEIjACQSV0smkx3NaIbViwU3Nqr6l4ueQSFUwVy7xIWIaYqHd+Z/2BvGV6pIixkrd9/L+7hFV9JAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MyjbMvP4sYd4IHtU74xl1VOoUi7WDRiBVfWm7xwCSCo=; b=mj1KrBifF4zfYrRhbFOFk3aEgV9LfHhWlVkJvHZ/iSYBqhSFk3uyBmidzQN5oRT71/7BwpkW6bTf93q3ELb2igXxstwWcskBQi3P036bTLPUXOsoLTgppHY6OhhHkFbx3KcPzQr8vfxvoQyPt49m5pu7cG/LZAw2IQjZJKI9NkpoklNWogzgbqeG9TNMwffUMNJLaHA6zHlt3zC+MPn4THNdz65SEPVoZJnUXhpSRIs2t8GTmvvdbgYG/R95jdPR7QXUDUVOp7Q4hE7iEBD+x9U0Feoc0iV8I53+TuY7WG0UxCFQxxat4kINp6SUsKYqfXVW54rRCAc0Wn9D7QMNMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MyjbMvP4sYd4IHtU74xl1VOoUi7WDRiBVfWm7xwCSCo=; b=rX0gjKPU42o7MJbXnNpZNHNemTPDPw1dk3vo03875BjTh5ecHx0zFGBdPQaSTmDt3x1MSO6qklb3OUvsHLjSiBX3BQADuSVmhaL1zxqtGtGPizBRyKNfqn8i5FnJRlcI6U9CwLfNsn7eNGT019UJLFydV2OBlKn0zImiFZllLLcolFN8FqCkFg80ryVK9QiV64wuzzi/QAegoOmESO/AMrsvo+rU8muNOo0XojDp9PBiksxxdRsHO/Ps3ugl0COuY28THLZfUKr9yTO7rTPF/wOKKbDHPqlOjCU7s5Ek+vi3OWKIpZUq8mxDXt7pO7Iw4mwuMK2BdJP/wqvXjQuHUw== Received: from DM4PR12MB5373.namprd12.prod.outlook.com (2603:10b6:5:39a::17) by DM4PR12MB5117.namprd12.prod.outlook.com (2603:10b6:5:390::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.17; Mon, 9 Aug 2021 07:44:22 +0000 Received: from DM4PR12MB5373.namprd12.prod.outlook.com ([fe80::20f5:dbdd:64b1:617b]) by DM4PR12MB5373.namprd12.prod.outlook.com ([fe80::20f5:dbdd:64b1:617b%9]) with mapi id 15.20.4394.023; Mon, 9 Aug 2021 07:44:22 +0000 From: "Xueming(Steven) Li" To: NBU-Contact-Thomas Monjalon CC: "dev@dpdk.org" , "stable@dpdk.org" , Christian Ehrhardt , "bluca@debian.org" , "ktraynor@redhat.com" , "david.marchand@redhat.com" Thread-Topic: [dpdk-stable] [PATCH v2 2/2] devtools: fix patches missing if range newer than HEAD Thread-Index: AQHXjEf/FGn4ClZBpkGYijgiLPPQhKtqsB7Q Date: Mon, 9 Aug 2021 07:44:21 +0000 Message-ID: References: <20210616040324.311461-1-xuemingl@nvidia.com> <20210630063416.9550-1-xuemingl@nvidia.com> <20210630063416.9550-2-xuemingl@nvidia.com> <5756416.oaEARKiDCu@thomas> In-Reply-To: <5756416.oaEARKiDCu@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5e45c1fa-b7cb-42c2-7ea1-08d95b0980a8 x-ms-traffictypediagnostic: DM4PR12MB5117: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:635; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: CEug2qT5WcQikYPYyap183mtLHD+5Z/krEQsh4r+o2elRnkaBK2lqYWHKzllBw521a/zw9lQW17g8SDGU9EqcEvNba2Sh+shWSKjuVlzjCIU3FWZTyFtClqslkvKGhdTW3qEd3OvGmgBYMSN/lSClLj0iaZLDSLs9SqyUidhPOH+XL+RzfYs6wd6j0ZTvipZXDqcWLbpA606U9dQ3cXJb9UoTOEqDFsLeUfX1NOCMk0SkNmR02P8rt/KpInD0bw4K8GdceNgWVUpUM8e4QqvcA3EYbWSJEVrBtXoKzt3bIPhFxTLNFqfzJx9Wqgn/qn2UufnEsyCnYth9bQn8tN2yrIdg3Bt5heKj0BQN4JFRf6Z/y4WECTUAH1LQknuNIBbt+6AMcivtmYtjX6xIdQtBd3ZA63i67kIX7WdyXoTLilhhGOIunzv7UInmuusNhBzbaYtHf5UtcuB2+RmjZLtlwGd+ZfomD+UQ9uQ3rG32Q0G50KDpcdwqEDm932MwFvfcfRLRpmFWgZnObq1ywsW8buS7x4eUh75wG8GIGaDJOXrtaBMMgMJtT2Q4iyqh65otENulUdjbJuglMRMZgZvCxOUvFeehKeWq07Fq3JkqcnDKTjTN7Yk9wwyqzWFH7zoOpf+kMMADQQcEYrLrgyEVg/Otiq7QqneEdq1dAhW2F7/koEPvejSngIb1y3xzqPBN7wYoobQ/g2+aH2Dh9gi2Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5373.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(366004)(376002)(396003)(39860400002)(136003)(26005)(76116006)(66476007)(186003)(33656002)(66946007)(5660300002)(66446008)(64756008)(66556008)(54906003)(38070700005)(4326008)(7696005)(83380400001)(316002)(86362001)(53546011)(6916009)(71200400001)(6506007)(9686003)(2906002)(55016002)(52536014)(8676002)(478600001)(38100700002)(122000001)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?1yxQw9DzwiuSuj0b3w+lJQ9RXjEKeHBteVh8BdInPOMmOH1i7v6NwgGIGATG?= =?us-ascii?Q?LmQKoiG0R0ATP0EZ9TbDdg36ze+Gu3556JTm/2hdFinpKVCgOKXxrSQMigrR?= =?us-ascii?Q?H40FEffSRbygfRMBFLf33DcUwlZC1mfF6ZZBbhSrXzq7JbIGQUjfTEQCqtM/?= =?us-ascii?Q?a94WwudqIWpSUQQVdLccMPY8HMnxAurLAelG+13kVoPTUqbxjj16Y3MUsidH?= =?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X7DTG9jS8oC0pF4kjL?= =?us-ascii?Q?CCwytursThqy+COOUYtMZd5xJoOKW9NjcCYbKiIqITe8Kp8Bavvi9/OJMLa4?= =?us-ascii?Q?WlFf0SArLuZ42Ceb2c5pT8R+PmG7hng9KH5peMdhIQz+4rtaEpOmxOKH4YrU?= =?us-ascii?Q?DbzJcaBEmqmyrenVxWWbesO23vdqNNFp2wfT47BypvOBOzPk/4pIjxmctINJ?= =?us-ascii?Q?GdyZbaOSVaVGa+MNefjNGBnY?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5373.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e45c1fa-b7cb-42c2-7ea1-08d95b0980a8 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Aug 2021 07:44:21.9422 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: pG2iJ1AzzzxGGtIcyd06hJNKll6FGVZ2yOadlcb8fnEc3tN7o3dkIQhLxy9QXp37kDhyqUTffs0pBjTExyEoZg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5117 Subject: Re: [dpdk-stable] [PATCH v2 2/2] devtools: fix patches missing if range newer than HEAD X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" > -----Original Message----- > From: Thomas Monjalon > Sent: Sunday, August 8, 2021 7:25 PM > To: Xueming(Steven) Li > Cc: dev@dpdk.org; stable@dpdk.org; Christian Ehrhardt ; bluca@debian.org; > ktraynor@redhat.com; david.marchand@redhat.com > Subject: Re: [dpdk-stable] [PATCH v2 2/2] devtools: fix patches missing i= f range newer than HEAD >=20 > 30/06/2021 08:34, Xueming Li: > > Current fix scan scripts scanned specified range in HEAD branch. >=20 > I cannot parse the above sentence. The scripts scans patches and try to get patch version info from current br= anch. >=20 > > When users ran it in an earlier branch, few patches were scanned due > > to the fixes in the range are newer and not merged to HEAD branch. >=20 > You mean some patches were not scanned? Scanned but failed to retrieve correct version info.=20 >=20 > > > > This patch introduces optional argument, default to HEAD if > > not specified. Checks the specified in parameter must being > > merged in . >=20 > Cannot parse either. >=20 > > Fixes: 752d8e097ec1 ("scripts: show fixes with release version of > > bug") > > Cc: Thomas Monjalon > > Cc: stable@dpdk.org > > Cc: Christian Ehrhardt > > > > Signed-off-by: Xueming Li > [...] > > - echo "usage: $(basename $0) [-h] " > > + echo "usage: $(basename $0) [-h] []" > [...] > > -range=3D"$*" > > +range=3D"$1" >=20 > I think it breaks passing range in multiple parameters without quotes. > But it is not really a problem. >=20 > > +branch=3D"$2" > > + > > +[ -n "$branch" ] || branch=3D"HEAD" > > +refbranch=3D$(git rev-parse --abbrev-ref $branch) >=20 > Why this line is needed? A comment may help. OK > If $branch is not used anymore, we can overwrite it instead of introducin= g one more variable $refbranch. $branch will be used in function commit_version(). > > > +range_last=3D$(git log --oneline $range |head -n1|cut -d' ' -f1) >=20 > spaces missing around pipes. > You can avoid "head" and "cut" by providing the right options to git. Yes, rev-parse will do this efficiently. >=20 > > +if ! git branch -a --contains $range_last |grep -q -e " $refbranch$" -= e " remotes/$refbranch$"; then > > + echo "range $range not included by branch $refbranch" > > + exit 1 > > +fi > > > > # get major release version of a commit commit_version () # > > { > > local VER=3D"v*.*" > > # use current branch as history reference > > - local refbranch=3D$(git rev-parse --abbrev-ref HEAD) >=20 > You move a line but not its comment above. >=20