From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpbgjp3.qq.com (smtpbgjp3.qq.com [54.92.39.34]) by sourceware.org (Postfix) with ESMTPS id 7DDA53858D33 for ; Tue, 22 Aug 2023 03:09:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7DDA53858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai X-QQ-mid: bizesmtp62t1692673749t3dp3u0k Received: from [10.101.11.9] ( [113.104.212.114]) by bizesmtp.qq.com (ESMTP) with SMTP id 0 for ; Tue, 22 Aug 2023 11:09:08 +0800 (CST) X-QQ-SSF: 01400000000000C0F000000A0000000 X-QQ-FEAT: 3M0okmaRx3jyE4ZI2mqP6XFIHTRI3D84FLkuzzLF3O24H2koFWL+N+IcO7CNK g1kyoY+fsxGSD8oMufRdhOuTMtlYoGzPrSRbxDMEP8IjGYN5gaQL6SzEftezeTNWZFczRTB AOBbN/FIooHKNGlX6vEAuJp6Nhm7gBgCgqOlz+WGFBqgnmd7DR8K7/ff6JzR+T3fGMMnM/a mO4n3ejg30nXwCS73L8B4KmCOEF0Yl/7/yuAroV6qUIeW5nNh65Na8K2KSebTl5DZO//EK7 hgdrDcFMXznrzFdd04t47Ay1UnaBJkF+vGWYavIgwEUOO7yBC8DqusKGeON9RVOWntN9Cre 7ihs6cR3HmVGJReA371/ktD6xLcVV9N1N9vj3+KsNe1E6hQEX/rgOuTC2FbOoX20i/Vhe4w X-QQ-GoodBg: 2 X-BIZMAIL-ID: 17942350137189224091 Message-ID: <20DC8A29E7A45633+4a9b7ce7-b92e-4d9f-b2bb-728538423b39@rivai.ai> Date: Tue, 22 Aug 2023 11:09:09 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: PING^^^^ [PATCH] mklog: fix bugs of --append option Content-Language: en-US From: Lehua Ding To: gcc-patches@gcc.gnu.org References: <20230719082126.265155-1-lehua.ding@rivai.ai> <20230726063035.2269978-1-lehua.ding@rivai.ai> In-Reply-To: <20230726063035.2269978-1-lehua.ding@rivai.ai> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvrgz:qybglogicsvrgz6a-0 X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA,GIT_PATCH_0,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Gentle ping this little fix patch. Can anyone help review this patch? Thanks in advance. Best, Lehua On 2023/7/26 14:30, Lehua Ding wrote: > Hi, > > Gentle Ping. > > I sent a V2 patch as below for an additional fix Python code format error, > which Martin reported, thanks. > > Best, > Lehua > > contrib/ChangeLog: > > * mklog.py: Fix bugs. > --- > contrib/mklog.py | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/contrib/mklog.py b/contrib/mklog.py > index 26230b9b4f2..0abefcd9374 100755 > --- a/contrib/mklog.py > +++ b/contrib/mklog.py > @@ -374,7 +374,8 @@ if __name__ == '__main__': > args.fill_up_bug_titles, args.pr_numbers) > if args.append: > if (not args.input): > - raise Exception("`-a or --append` option not support standard input") > + raise Exception("`-a or --append` option not support standard " > + "input") > lines = [] > with open(args.input, 'r', newline='\n') as f: > # 1 -> not find the possible start of diff log > @@ -384,13 +385,14 @@ if __name__ == '__main__': > for line in f: > if maybe_diff_log == 1 and line == "---\n": > maybe_diff_log = 2 > - elif maybe_diff_log == 2 and \ > - re.match("\s[^\s]+\s+\|\s\d+\s[+\-]+\n", line): > + elif (maybe_diff_log == 2 and > + re.match(r"\s[^\s]+\s+\|\s+\d+\s[+\-]+\n", line)): > lines += [output, "---\n", line] > maybe_diff_log = 3 > else: > # the possible start is not the true start. > if maybe_diff_log == 2: > + lines.append("---\n") > maybe_diff_log = 1 > lines.append(line) > with open(args.input, "w") as f: -- Best, Lehua