public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Lehua Ding" <lehua.ding@rivai.ai>
To: "Jeff&nbsp;Law" <jeffreyalaw@gmail.com>
Cc: "juzhe.zhong" <juzhe.zhong@rivai.ai>, mjambor <mjambor@suse.cz>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] mklog: fix bugs of --append option
Date: Wed, 16 Aug 2023 13:10:16 +0800	[thread overview]
Message-ID: <446241539333142E+tencent_3D3E4E5FBB988F83EBA1191FE4C47A85DD07@qq.com> (raw)
In-Reply-To: <20230726063035.2269978-1-lehua.ding@rivai.ai>

[-- Attachment #1: Type: text/plain, Size: 3282 bytes --]

Hi Jeff,


Can you take a look at this little patch?
It's a bugfix patch that only affects the --apend
option that I added earlier, not anyone else.
And please let me know if there is a more
suitable reviewer as well. Thank you so much.


Best,
Lehua





------------------&nbsp;Original&nbsp;------------------
From:                                                                                                                        "Lehua Ding"                                                                                    <lehua.ding@rivai.ai&gt;;
Date:&nbsp;Wed, Jul 26, 2023 02:30 PM
To:&nbsp;"gcc-patches"<gcc-patches@gcc.gnu.org&gt;;
Cc:&nbsp;"juzhe.zhong"<juzhe.zhong@rivai.ai&gt;;"jeffreyalaw"<jeffreyalaw@gmail.com&gt;;"mjambor"<mjambor@suse.cz&gt;;
Subject:&nbsp;Re: [PATCH] mklog: fix bugs of --append option



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):
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; raise Exception("`-a or --append` option not support standard input")
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; raise Exception("`-a or --append` option not support standard "
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "input")
 lines = []
 with open(args.input, 'r', newline='\n') as f:
 # 1 -&gt; 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
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elif maybe_diff_log == 2 and \
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; re.match("\s[^\s]+\s+\|\s\d+\s[+\-]+\n", line):
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elif (maybe_diff_log == 2 and
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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:
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lines.append("---\n")
 maybe_diff_log = 1
 lines.append(line)
 with open(args.input, "w") as f:
-- 
2.36.1

  reply	other threads:[~2023-08-16  5:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-19  8:21 Lehua Ding
2023-07-26  6:30 ` Lehua Ding
2023-08-16  5:10   ` Lehua Ding [this message]
2023-08-22  3:09   ` PING^^^^ " Lehua Ding
2023-08-28 23:38 ` Jeff Law
2023-08-29  1:43   ` Lehua Ding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=446241539333142E+tencent_3D3E4E5FBB988F83EBA1191FE4C47A85DD07@qq.com \
    --to=lehua.ding@rivai.ai \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=juzhe.zhong@rivai.ai \
    --cc=mjambor@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).