From: Ian Lance Taylor <iant@golang.org>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Patch RFA: Support non-ASCII file names in git-changelog
Date: Wed, 16 Dec 2020 20:26:22 -0800 [thread overview]
Message-ID: <CAOyqgcVW5o+j+FvOo=9V293A5k46EaBVgJ=SrXB9Wyv2hgYYKw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 411 bytes --]
As discussed at
https://gcc.gnu.org/pipermail/gcc-patches/2020-December/561995.html ,
the ChangeLog checker does not correctly handle files with non-ASCII
file names.
This patch fixes the problem. I have little experience with Python,
so I may have made some foolish mistakes here.
OK to commit?
Thanks.
Ian
* gcc-changelog/git_repository.py: Ignore quotation marks added by git
for non-ASCII file names.
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 774 bytes --]
diff --git a/contrib/gcc-changelog/git_repository.py b/contrib/gcc-changelog/git_repository.py
index 8edcff91ad6..86b470b0881 100755
--- a/contrib/gcc-changelog/git_repository.py
+++ b/contrib/gcc-changelog/git_repository.py
@@ -55,7 +55,10 @@ def parse_git_revisions(repo_path, revisions, strict=True):
t = 'A'
else:
t = 'M'
- modified_files.append((file.b_path, t))
+ path = file.b_path
+ if path.startswith('"') and path.endswith('"'):
+ path = path[1:len(path)-1]
+ modified_files.append((path, t))
date = datetime.utcfromtimestamp(c.committed_date)
author = '%s <%s>' % (c.author.name, c.author.email)
next reply other threads:[~2020-12-17 4:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 4:26 Ian Lance Taylor [this message]
2020-12-18 10:28 ` Martin Liška
2020-12-18 18:30 ` Ian Lance Taylor
2020-12-21 9:39 ` Martin Liška
2020-12-21 9:48 ` Jakub Jelinek
2020-12-21 9:57 ` Martin Liška
2020-12-24 12:16 ` Joel Brobecker
2021-01-04 11:01 ` Martin Liška
2021-01-04 11:47 ` Martin Liška
2021-01-06 7:25 ` Martin Liška
2021-01-06 13:37 ` Martin Liška
2021-01-07 19:03 ` Ian Lance Taylor
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='CAOyqgcVW5o+j+FvOo=9V293A5k46EaBVgJ=SrXB9Wyv2hgYYKw@mail.gmail.com' \
--to=iant@golang.org \
--cc=gcc-patches@gcc.gnu.org \
/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).